Package top.girlkisser.lazuli.api.block
Interface IEnergyBE
- All Superinterfaces:
IBE
- All Known Implementing Classes:
AbstractCapacitorBE,AbstractEnergyBE,AbstractGeneratorBE
Basic methods for block entities with energy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default amount of RF that an IEnergyBE can store. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanDistributeInDirection(net.minecraft.core.Direction direction) Get whether the block entity can push energy in the given direction.default voidDistributes power to each direction if able.Gets the energy storage for this block entity.default intGets the amount of energy stored in the block entity.default intGets the energy capacity of the machinedefault intGets the maximum energy extractable per tick for the BE.default intGets the maximum energy receivable per tick for the BE.Methods inherited from interface top.girlkisser.lazuli.api.block.IBE
getBlockPos, getBlockState, getLevel, setChanged
-
Field Details
-
DEFAULT_MAX_ENERGY
static final int DEFAULT_MAX_ENERGYThe 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.
-