Interface BotariumEnergyBlock<T extends EnergyContainer & Updatable>

Type Parameters:
T - the type of the energy storage object. Botarium provides a default implementation for this with WrappedBlockEnergyContainer.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface BotariumEnergyBlock<T extends EnergyContainer & Updatable>
A functional interface representing an energy block in a Botarium.
  • Method Summary

    Modifier and Type
    Method
    Description
    getEnergyStorage(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 level
      pos - the block position
      state - the block state
      entity - the block entity (may be null)
      direction - the direction (may be null)
      Returns:
      the energy storage object if available, or null if not found