Interface IBE

All Known Subinterfaces:
IEnergyBE, IFluidBE, IInventoryBE<T>, ISingleTankBE, IZonedBE
All Known Implementing Classes:
AbstractCapacitorBE, AbstractEnergyBE, AbstractGeneratorBE, AbstractInventoryBE, AbstractSingleTankAndInventoryBE, AbstractSingleTankBE

public interface IBE
Default methods for a block entity.
You should never need to manually implement this since all block entities implement these functions already. This is used by other block entity interfaces (IEnergyBE, IInventoryBE, etc.) to access block entity information without needing to be an abstract class that extends BlockEntity.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.core.BlockPos
    Get the block position of the block entity.
    net.minecraft.world.level.block.state.BlockState
    Get the block state of the block entity.
    @Nullable net.minecraft.world.level.Level
    Get the level of the block entity.
    void
    Mark the block entity as having changed.
  • Method Details

    • getBlockPos

      net.minecraft.core.BlockPos getBlockPos()
      Get the block position of the block entity.
      Returns:
      The block position.
    • getBlockState

      net.minecraft.world.level.block.state.BlockState getBlockState()
      Get the block state of the block entity.
      Returns:
      The block state.
    • getLevel

      @Nullable @Nullable net.minecraft.world.level.Level getLevel()
      Get the level of the block entity.
      Returns:
      The level.
    • setChanged

      void setChanged()
      Mark the block entity as having changed.