Interface BotariumEnergyBlock<T extends EnergyContainer & Updatable>
- Type Parameters:
T- the type of the energy storage object. Botarium provides a default implementation for this withWrappedBlockEnergyContainer.
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface representing an energy block in a Botarium.
-
Method Summary
Modifier and TypeMethodDescriptiongetEnergyStorage(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.world.level.block.entity.BlockEntity entity, @Nullable net.minecraft.core.Direction direction) Retrieves the energy storage object for a given level, position, state, entity, and direction.
-
Method Details
-
getEnergyStorage
T getEnergyStorage(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable net.minecraft.world.level.block.entity.BlockEntity entity, @Nullable @Nullable net.minecraft.core.Direction direction) Retrieves the energy storage object for a given level, position, state, entity, and direction.- Parameters:
level- the levelpos- the block positionstate- the block stateentity- the block entity (may be null)direction- the direction (may be null)- Returns:
- the energy storage object if available, or null if not found
-