Interface IEnergyBE

All Superinterfaces:
IBE
All Known Implementing Classes:
AbstractCapacitorBE, AbstractEnergyBE, AbstractGeneratorBE

public interface IEnergyBE extends IBE
Basic methods for block entities with energy.
  • Field Details

    • DEFAULT_MAX_ENERGY

      static final int DEFAULT_MAX_ENERGY
      The default amount of RF that an IEnergyBE can store.
      See Also:
  • Method Details

    • getEnergyStorage

      ProtectiveEnergyStorage getEnergyStorage()
      Gets the energy storage for this block entity.
      Returns:
      The energy storage.
    • getMaxEnergy

      default int getMaxEnergy()
      Gets the energy capacity of the machine
      Returns:
      The capacity.
    • getMaxEnergyExtract

      default int getMaxEnergyExtract()
      Gets the maximum energy extractable per tick for the BE.
      Returns:
      The max energy extractable per tick.
    • getMaxEnergyReceive

      default int getMaxEnergyReceive()
      Gets the maximum energy receivable per tick for the BE.
      Returns:
      The max energy receivable per tick.
    • getEnergyStored

      default int getEnergyStored()
      Gets the amount of energy stored in the block entity.
      Returns:
      The amount.
    • canDistributeInDirection

      default boolean canDistributeInDirection(net.minecraft.core.Direction direction)
      Get whether the block entity can push energy in the given direction.
      Parameters:
      direction - The direction to check.
      Returns:
      `true` if energy can be pushed in the given direction.
    • distributePower

      default void distributePower()
      Distributes power to each direction if able.