Class BlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
Direct Known Subclasses:
BannerBlockEntity, BeaconBlockEntity, BedBlockEntity, BeehiveBlockEntity, BellBlockEntity, CampfireBlockEntity, CommandBlockBlockEntity, ComparatorBlockEntity, ConduitBlockEntity, DaylightDetectorBlockEntity, EnchantingTableBlockEntity, EnderChestBlockEntity, EndPortalBlockEntity, JigsawBlockEntity, JukeboxBlockEntity, LecternBlockEntity, LockableContainerBlockEntity, MobSpawnerBlockEntity, PistonBlockEntity, SignBlockEntity, SkullBlockEntity, StructureBlockBlockEntity

public abstract class BlockEntity
extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getWorld

      @Nullable public World getWorld()
    • setLocation

      public void setLocation​(World world, BlockPos pos)
    • hasWorld

      public boolean hasWorld()
    • fromTag

      public void fromTag​(BlockState state, CompoundTag tag)
    • toTag

      public CompoundTag toTag​(CompoundTag tag)
    • writeIdentifyingData

      private CompoundTag writeIdentifyingData​(CompoundTag tag)
    • createFromTag

      @Nullable public static BlockEntity createFromTag​(BlockState state, CompoundTag tag)
    • markDirty

      public void markDirty()
    • getSquaredRenderDistance

      @Environment(CLIENT) public double getSquaredRenderDistance()
    • getPos

      public BlockPos getPos()
    • getCachedState

      public BlockState getCachedState()
    • toUpdatePacket

      @Nullable public BlockEntityUpdateS2CPacket toUpdatePacket()
    • toInitialChunkDataTag

      public CompoundTag toInitialChunkDataTag()
    • isRemoved

      public boolean isRemoved()
    • markRemoved

      public void markRemoved()
    • cancelRemoval

      public void cancelRemoval()
    • onSyncedBlockEvent

      public boolean onSyncedBlockEvent​(int type, int data)
    • resetBlock

      public void resetBlock()
    • populateCrashReport

      public void populateCrashReport​(CrashReportSection crashReportSection)
    • setPos

      public void setPos​(BlockPos pos)
    • copyItemDataRequiresOperator

      public boolean copyItemDataRequiresOperator()
    • applyRotation

      public void applyRotation​(BlockRotation rotation)
    • applyMirror

      public void applyMirror​(BlockMirror mirror)
    • getType

      public BlockEntityType<?> getType()
    • markInvalid

      public void markInvalid()