Class BlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
Direct Known Subclasses:
BannerBlockEntity, BeaconBlockEntity, BedBlockEntity, BeehiveBlockEntity, BellBlockEntity, BrushableBlockEntity, CampfireBlockEntity, ChiseledBookshelfBlockEntity, CommandBlockBlockEntity, ComparatorBlockEntity, ConduitBlockEntity, CreakingHeartBlockEntity, DaylightDetectorBlockEntity, DecoratedPotBlockEntity, EnchantingTableBlockEntity, EnderChestBlockEntity, EndPortalBlockEntity, JigsawBlockEntity, JukeboxBlockEntity, LecternBlockEntity, LockableContainerBlockEntity, MobSpawnerBlockEntity, PistonBlockEntity, SculkCatalystBlockEntity, SculkSensorBlockEntity, SculkShriekerBlockEntity, SignBlockEntity, SkullBlockEntity, StructureBlockBlockEntity, TestBlockEntity, TestInstanceBlockEntity, TrialSpawnerBlockEntity, VaultBlockEntity

public abstract class BlockEntity extends Object
A block entity is an object holding extra data about a block in a world. Blocks hold their data using pre-defined, finite sets of BlockState; however, some blocks need to hold data that cannot be pre-defined, such as inventories of chests, texts of signs, or pattern combinations of banners. Block entities can hold these data.

Block entities have two other important additions to normal blocks: they can define custom rendering behaviors, and they can tick on every server tick instead of randomly. Some block entities only use these without any extra data.

Block entities are bound to a world and there is one instance of BlockEntity per the block position, unlike Block or BlockState which are reused. Block entities are created using BlockEntityType, a type of block entities. In most cases, block entities do not have to be constructed manually except in BlockEntityProvider.createBlockEntity(net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState).

To get the block entity at a certain position, use World.getBlockEntity(net.minecraft.util.math.BlockPos). Note that the block entity returned can be, in rare cases, different from the one associated with the block at that position. For this reason the return value should not be cast unsafely.

Block entities, like entities, use NBT for the storage of data. The data is loaded to the instance's fields in

invalid reference
#readNbt
and written to NBT in
invalid reference
#writeNbt
. When a data that needs to be saved has changed, always make sure to call markDirty().

See BlockEntityProvider and BlockEntityType for information on creating a block with block entities.

Block entity's data, unlike block states, are not automatically synced. Block entities declare when and which data to sync. In general, block entities need to sync states observable from the clients without specific interaction (such as opening a container). toUpdatePacket() and toInitialChunkDataNbt(net.minecraft.registry.RegistryWrapper.WrapperLookup) control which data is sent to the client. To sync the block entity to the client, call serverWorld.getChunkManager().markForUpdate(this.getPos());.

Mappings:
Namespace Name
named net/minecraft/block/entity/BlockEntity
intermediary net/minecraft/class_2586
official eaz
  • Field Details

    • TYPE_CODEC

      private static final com.mojang.serialization.Codec<BlockEntityType<?>> TYPE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named TYPE_CODEC Lnet/minecraft/block/entity/BlockEntity;TYPE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_57768 Lnet/minecraft/class_2586;field_57768:Lcom/mojang/serialization/Codec;
      official d Leaz;d:Lcom/mojang/serialization/Codec;
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/block/entity/BlockEntity;LOGGER:Lorg/slf4j/Logger;
      intermediary field_11868 Lnet/minecraft/class_2586;field_11868:Lorg/slf4j/Logger;
      official e Leaz;e:Lorg/slf4j/Logger;
    • type

      private final BlockEntityType<?> type
      Mappings:
      Namespace Name Mixin selector
      named type Lnet/minecraft/block/entity/BlockEntity;type:Lnet/minecraft/block/entity/BlockEntityType;
      intermediary field_11864 Lnet/minecraft/class_2586;field_11864:Lnet/minecraft/class_2591;
      official f Leaz;f:Lebb;
    • world

      @Nullable protected @Nullable World world
      Mappings:
      Namespace Name Mixin selector
      named world Lnet/minecraft/block/entity/BlockEntity;world:Lnet/minecraft/world/World;
      intermediary field_11863 Lnet/minecraft/class_2586;field_11863:Lnet/minecraft/class_1937;
      official n Leaz;n:Ldmu;
    • pos

      protected final BlockPos pos
      Mappings:
      Namespace Name Mixin selector
      named pos Lnet/minecraft/block/entity/BlockEntity;pos:Lnet/minecraft/util/math/BlockPos;
      intermediary field_11867 Lnet/minecraft/class_2586;field_11867:Lnet/minecraft/class_2338;
      official o Leaz;o:Ljb;
    • removed

      protected boolean removed
      Mappings:
      Namespace Name Mixin selector
      named removed Lnet/minecraft/block/entity/BlockEntity;removed:Z
      intermediary field_11865 Lnet/minecraft/class_2586;field_11865:Z
      official p Leaz;p:Z
    • cachedState

      private BlockState cachedState
      Mappings:
      Namespace Name Mixin selector
      named cachedState Lnet/minecraft/block/entity/BlockEntity;cachedState:Lnet/minecraft/block/BlockState;
      intermediary field_11866 Lnet/minecraft/class_2586;field_11866:Lnet/minecraft/class_2680;
      official g Leaz;g:Leeb;
    • components

      private ComponentMap components
      Mappings:
      Namespace Name Mixin selector
      named components Lnet/minecraft/block/entity/BlockEntity;components:Lnet/minecraft/component/ComponentMap;
      intermediary field_50172 Lnet/minecraft/class_2586;field_50172:Lnet/minecraft/class_9323;
      official h Leaz;h:Lkn;
  • Constructor Details

    • BlockEntity

      public BlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary <init> Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official <init> Leaz;<init>(Lebb;Ljb;Leeb;)V
  • Method Details

    • validateSupports

      private void validateSupports(BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named validateSupports Lnet/minecraft/block/entity/BlockEntity;validateSupports(Lnet/minecraft/block/BlockState;)V
      intermediary method_61175 Lnet/minecraft/class_2586;method_61175(Lnet/minecraft/class_2680;)V
      official a Leaz;a(Leeb;)V
    • supports

      public boolean supports(BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named supports Lnet/minecraft/block/entity/BlockEntity;supports(Lnet/minecraft/block/BlockState;)Z
      intermediary method_61176 Lnet/minecraft/class_2586;method_61176(Lnet/minecraft/class_2680;)Z
      official b Leaz;b(Leeb;)Z
    • posFromNbt

      public static BlockPos posFromNbt(ChunkPos chunkPos, NbtCompound nbt)
      Returns the block position from nbt.

      The passed NBT should use lowercase x, y, and z keys to store the position. This is incompatible with

      invalid reference
      net.minecraft.nbt.NbtHelper#fromBlockPos
      that use uppercase keys.
      Returns:
      the block position from nbt
      Mappings:
      Namespace Name Mixin selector
      named posFromNbt Lnet/minecraft/block/entity/BlockEntity;posFromNbt(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/util/math/BlockPos;
      intermediary method_38239 Lnet/minecraft/class_2586;method_38239(Lnet/minecraft/class_1923;Lnet/minecraft/class_2487;)Lnet/minecraft/class_2338;
      official a Leaz;a(Ldlz;Lui;)Ljb;
    • getWorld

      @Nullable public @Nullable World getWorld()
      Returns the world the block entity belongs to.

      This can return null during world generation.

      Returns:
      the world the block entity belongs to
      Mappings:
      Namespace Name Mixin selector
      named getWorld Lnet/minecraft/block/entity/BlockEntity;getWorld()Lnet/minecraft/world/World;
      intermediary method_10997 Lnet/minecraft/class_2586;method_10997()Lnet/minecraft/class_1937;
      official i Leaz;i()Ldmu;
    • setWorld

      public void setWorld(World world)
      Sets the world the block entity belongs to.

      This should not be called manually; however, this can be overridden to initialize fields dependent on the world.

      Mappings:
      Namespace Name Mixin selector
      named setWorld Lnet/minecraft/block/entity/BlockEntity;setWorld(Lnet/minecraft/world/World;)V
      intermediary method_31662 Lnet/minecraft/class_2586;method_31662(Lnet/minecraft/class_1937;)V
      official a Leaz;a(Ldmu;)V
    • hasWorld

      public boolean hasWorld()
      Mappings:
      Namespace Name Mixin selector
      named hasWorld Lnet/minecraft/block/entity/BlockEntity;hasWorld()Z
      intermediary method_11002 Lnet/minecraft/class_2586;method_11002()Z
      official l Leaz;l()Z
    • readData

      protected void readData(ReadView view)
      Reads data from nbt. Subclasses should override this if they store a persistent data.

      NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      See Also:
      • invalid reference
        #writeNbt
      Mappings:
      Namespace Name Mixin selector
      named readData Lnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)V
      official a Leaz;a(Lfda;)V
    • read

      public final void read(ReadView view)
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/block/entity/BlockEntity;read(Lnet/minecraft/storage/ReadView;)V
      intermediary method_58690 Lnet/minecraft/class_2586;method_58690(Lnet/minecraft/class_11368;)V
      official b Leaz;b(Lfda;)V
    • readComponentlessData

      public final void readComponentlessData(ReadView view)
      Mappings:
      Namespace Name Mixin selector
      named readComponentlessData Lnet/minecraft/block/entity/BlockEntity;readComponentlessData(Lnet/minecraft/storage/ReadView;)V
      intermediary method_58691 Lnet/minecraft/class_2586;method_58691(Lnet/minecraft/class_11368;)V
      official c Leaz;c(Lfda;)V
    • writeData

      protected void writeData(WriteView view)
      Writes data to nbt. Subclasses should override this if they store a persistent data.

      NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.

      See Also:
      • invalid reference
        #readNbt
      Mappings:
      Namespace Name Mixin selector
      named writeData Lnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)V
      official a Leaz;a(Lfdc;)V
    • createNbtWithIdentifyingData

      public final NbtCompound createNbtWithIdentifyingData(RegistryWrapper.WrapperLookup registries)
      Returns the block entity's NBT data with identifying data.

      In addition to data written at

      invalid reference
      #writeNbt
      , this also writes the
      invalid reference
      block entity type ID
      and the position of the block entity.
      Returns:
      the block entity's NBT data with identifying data
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named createNbtWithIdentifyingData Lnet/minecraft/block/entity/BlockEntity;createNbtWithIdentifyingData(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_38242 Lnet/minecraft/class_2586;method_38242(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official b Leaz;b(Ljn$a;)Lui;
    • writeFullData

      public void writeFullData(WriteView view)
      Mappings:
      Namespace Name Mixin selector
      named writeFullData Lnet/minecraft/block/entity/BlockEntity;writeFullData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_71399 Lnet/minecraft/class_2586;method_71399(Lnet/minecraft/class_11372;)V
      official c Leaz;c(Lfdc;)V
    • writeDataWithId

      public void writeDataWithId(WriteView view)
      Returns the block entity's NBT data with block entity type ID.

      In addition to data written at

      invalid reference
      #writeNbt
      , this also writes the
      invalid reference
      block entity type ID
      .
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeDataWithId Lnet/minecraft/block/entity/BlockEntity;writeDataWithId(Lnet/minecraft/storage/WriteView;)V
      intermediary method_38243 Lnet/minecraft/class_2586;method_38243(Lnet/minecraft/class_11372;)V
      official d Leaz;d(Lfdc;)V
    • createNbt

      public final NbtCompound createNbt(RegistryWrapper.WrapperLookup registries)
      Returns the block entity's NBT data.

      Internally, this calls

      invalid reference
      #writeNbt
      with a new NbtCompound and returns the compound.
      Returns:
      the block entity's NBT data
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named createNbt Lnet/minecraft/block/entity/BlockEntity;createNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_38244 Lnet/minecraft/class_2586;method_38244(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official c Leaz;c(Ljn$a;)Lui;
    • writeDataWithoutId

      public void writeDataWithoutId(WriteView data)
      Mappings:
      Namespace Name Mixin selector
      named writeDataWithoutId Lnet/minecraft/block/entity/BlockEntity;writeDataWithoutId(Lnet/minecraft/storage/WriteView;)V
      intermediary method_71400 Lnet/minecraft/class_2586;method_71400(Lnet/minecraft/class_11372;)V
      official e Leaz;e(Lfdc;)V
    • createComponentlessNbt

      public final NbtCompound createComponentlessNbt(RegistryWrapper.WrapperLookup registries)
      Mappings:
      Namespace Name Mixin selector
      named createComponentlessNbt Lnet/minecraft/block/entity/BlockEntity;createComponentlessNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_58692 Lnet/minecraft/class_2586;method_58692(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official d Leaz;d(Ljn$a;)Lui;
    • writeComponentlessData

      public void writeComponentlessData(WriteView view)
      Mappings:
      Namespace Name Mixin selector
      named writeComponentlessData Lnet/minecraft/block/entity/BlockEntity;writeComponentlessData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_71401 Lnet/minecraft/class_2586;method_71401(Lnet/minecraft/class_11372;)V
      official f Leaz;f(Lfdc;)V
    • writeId

      private void writeId(WriteView view)
      Writes the block entity type ID to nbt under the id key.
      Throws:
      RuntimeException - if the block entity type is not registered in the registry
      Mappings:
      Namespace Name Mixin selector
      named writeId Lnet/minecraft/block/entity/BlockEntity;writeId(Lnet/minecraft/storage/WriteView;)V
      intermediary method_38241 Lnet/minecraft/class_2586;method_38241(Lnet/minecraft/class_11372;)V
      official g Leaz;g(Lfdc;)V
    • writeId

      public static void writeId(WriteView view, BlockEntityType<?> type)
      Writes the ID of type to nbt under the id key.
      Mappings:
      Namespace Name Mixin selector
      named writeId Lnet/minecraft/block/entity/BlockEntity;writeId(Lnet/minecraft/storage/WriteView;Lnet/minecraft/block/entity/BlockEntityType;)V
      intermediary method_38238 Lnet/minecraft/class_2586;method_38238(Lnet/minecraft/class_11372;Lnet/minecraft/class_2591;)V
      official a Leaz;a(Lfdc;Lebb;)V
    • writeIdentifyingData

      private void writeIdentifyingData(WriteView view)
      Writes to nbt the block entity type ID under the id key, and the block's position under x, y, and z keys.
      Throws:
      RuntimeException - if the block entity type is not registered in the registry
      Mappings:
      Namespace Name Mixin selector
      named writeIdentifyingData Lnet/minecraft/block/entity/BlockEntity;writeIdentifyingData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_10999 Lnet/minecraft/class_2586;method_10999(Lnet/minecraft/class_11372;)V
      official h Leaz;h(Lfdc;)V
    • createFromNbt

      @Nullable public static @Nullable BlockEntity createFromNbt(BlockPos pos, BlockState state, NbtCompound nbt, RegistryWrapper.WrapperLookup registries)
      Returns the new block entity loaded from nbt, or null if it fails.

      This is used during chunk loading. This can fail if nbt has an improper or unregistered id, or if

      invalid reference
      #readNbt
      throws an exception; in these cases, this logs an error and returns null.
      Returns:
      the new block entity loaded from nbt, or null if it fails
      Mappings:
      Namespace Name Mixin selector
      named createFromNbt Lnet/minecraft/block/entity/BlockEntity;createFromNbt(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/block/entity/BlockEntity;
      intermediary method_11005 Lnet/minecraft/class_2586;method_11005(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2586;
      official a Leaz;a(Ljb;Leeb;Lui;Ljn$a;)Leaz;
    • markDirty

      public void markDirty()
      Marks this block entity as dirty and that it needs to be saved. This also triggers comparator update.

      This must be called when something changed in a way that affects the saved NBT; otherwise, the game might not save the block entity.

      Mappings:
      Namespace Name Mixin selector
      named markDirty Lnet/minecraft/block/entity/BlockEntity;markDirty()V
      intermediary method_5431 Lnet/minecraft/class_2586;method_5431()V
      official e Leaz;e()V
    • markDirty

      protected static void markDirty(World world, BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named markDirty Lnet/minecraft/block/entity/BlockEntity;markDirty(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary method_31663 Lnet/minecraft/class_2586;method_31663(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official a Leaz;a(Ldmu;Ljb;Leeb;)V
    • getPos

      public BlockPos getPos()
      Returns the block entity's position.
      Returns:
      the block entity's position
      Mappings:
      Namespace Name Mixin selector
      named getPos Lnet/minecraft/block/entity/BlockEntity;getPos()Lnet/minecraft/util/math/BlockPos;
      intermediary method_11016 Lnet/minecraft/class_2586;method_11016()Lnet/minecraft/class_2338;
      official aA_ Leaz;aA_()Ljb;
    • getCachedState

      public BlockState getCachedState()
      Returns the cached block state at the block entity's position.

      This is faster than calling World.getBlockState(net.minecraft.util.math.BlockPos).

      Returns:
      the cached block state at the block entity's position
      Mappings:
      Namespace Name Mixin selector
      named getCachedState Lnet/minecraft/block/entity/BlockEntity;getCachedState()Lnet/minecraft/block/BlockState;
      intermediary method_11010 Lnet/minecraft/class_2586;method_11010()Lnet/minecraft/class_2680;
      official m Leaz;m()Leeb;
    • toUpdatePacket

      Returns the packet to send to nearby players when the block entity's observable state changes, or null to not send the packet.

      If the data returned by initial chunk data is suitable for updates, the following shortcut can be used to create an update packet: BlockEntityUpdateS2CPacket.create(this). The NBT will be passed to

      invalid reference
      #readNbt
      on the client.

      "Observable state" is a state that clients can observe without specific interaction. For example, CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.

      To sync block entity data using this method, use serverWorld.getChunkManager().markForUpdate(this.getPos());.

      Returns:
      the packet to send to nearby players when the block entity's observable state changes, or null to not send the packet
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named toUpdatePacket Lnet/minecraft/block/entity/BlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/Packet;
      intermediary method_38235 Lnet/minecraft/class_2586;method_38235()Lnet/minecraft/class_2596;
      official ax_ Leaz;ax_()Lzw;
    • toInitialChunkDataNbt

      public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries)
      Returns the serialized state of this block entity that is observable by clients.

      This is sent alongside the initial chunk data, as well as when the block entity implements toUpdatePacket() and decides to use the default BlockEntityUpdateS2CPacket.

      "Observable state" is a state that clients can observe without specific interaction. For example, CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.

      To send all NBT data of this block entity saved to disk, return createNbt(net.minecraft.registry.RegistryWrapper.WrapperLookup).

      Returns:
      the serialized state of this block entity that is observable by clients
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official a Leaz;a(Ljn$a;)Lui;
    • isRemoved

      public boolean isRemoved()
      Mappings:
      Namespace Name Mixin selector
      named isRemoved Lnet/minecraft/block/entity/BlockEntity;isRemoved()Z
      intermediary method_11015 Lnet/minecraft/class_2586;method_11015()Z
      official n Leaz;n()Z
    • markRemoved

      public void markRemoved()
      Mappings:
      Namespace Name Mixin selector
      named markRemoved Lnet/minecraft/block/entity/BlockEntity;markRemoved()V
      intermediary method_11012 Lnet/minecraft/class_2586;method_11012()V
      official av_ Leaz;av_()V
    • cancelRemoval

      public void cancelRemoval()
      Mappings:
      Namespace Name Mixin selector
      named cancelRemoval Lnet/minecraft/block/entity/BlockEntity;cancelRemoval()V
      intermediary method_10996 Lnet/minecraft/class_2586;method_10996()V
      official o Leaz;o()V
    • onBlockReplaced

      public void onBlockReplaced(BlockPos pos, BlockState oldState)
      Mappings:
      Namespace Name Mixin selector
      named onBlockReplaced Lnet/minecraft/block/entity/BlockEntity;onBlockReplaced(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary method_66473 Lnet/minecraft/class_2586;method_66473(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official a Leaz;a(Ljb;Leeb;)V
    • onSyncedBlockEvent

      public boolean onSyncedBlockEvent(int type, int data)
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named onSyncedBlockEvent Lnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
      intermediary method_11004 Lnet/minecraft/class_2586;method_11004(II)Z
      official a_ Leaz;a_(II)Z
    • populateCrashReport

      public void populateCrashReport(CrashReportSection crashReportSection)
      Mappings:
      Namespace Name Mixin selector
      named populateCrashReport Lnet/minecraft/block/entity/BlockEntity;populateCrashReport(Lnet/minecraft/util/crash/CrashReportSection;)V
      intermediary method_11003 Lnet/minecraft/class_2586;method_11003(Lnet/minecraft/class_129;)V
      official a Leaz;a(Lq;)V
    • getNameForReport

      public String getNameForReport()
      Mappings:
      Namespace Name Mixin selector
      named getNameForReport Lnet/minecraft/block/entity/BlockEntity;getNameForReport()Ljava/lang/String;
      intermediary method_61177 Lnet/minecraft/class_2586;method_61177()Ljava/lang/String;
      official p Leaz;p()Ljava/lang/String;
    • getType

      public BlockEntityType<?> getType()
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/block/entity/BlockEntity;getType()Lnet/minecraft/block/entity/BlockEntityType;
      intermediary method_11017 Lnet/minecraft/class_2586;method_11017()Lnet/minecraft/class_2591;
      official q Leaz;q()Lebb;
    • setCachedState

      @Deprecated public void setCachedState(BlockState state)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named setCachedState Lnet/minecraft/block/entity/BlockEntity;setCachedState(Lnet/minecraft/block/BlockState;)V
      intermediary method_31664 Lnet/minecraft/class_2586;method_31664(Lnet/minecraft/class_2680;)V
      official c Leaz;c(Leeb;)V
    • readComponents

      protected void readComponents(ComponentsAccess components)
      Mappings:
      Namespace Name Mixin selector
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentsAccess;)V
      intermediary method_57568 Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9473;)V
      official a Leaz;a(Lkl;)V
    • readComponents

      public final void readComponents(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/item/ItemStack;)V
      intermediary method_58683 Lnet/minecraft/class_2586;method_58683(Lnet/minecraft/class_1799;)V
      official a Leaz;a(Ldcv;)V
    • readComponents

      public final void readComponents(ComponentMap defaultComponents, ComponentChanges components)
      Mappings:
      Namespace Name Mixin selector
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentMap;Lnet/minecraft/component/ComponentChanges;)V
      intermediary method_58685 Lnet/minecraft/class_2586;method_58685(Lnet/minecraft/class_9323;Lnet/minecraft/class_9326;)V
      official a Leaz;a(Lkn;Lko;)V
    • addComponents

      protected void addComponents(ComponentMap.Builder builder)
      Mappings:
      Namespace Name Mixin selector
      named addComponents Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
      intermediary method_57567 Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
      official a Leaz;a(Lkn$a;)V
    • removeFromCopiedStackData

      @Deprecated public void removeFromCopiedStackData(WriteView view)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named removeFromCopiedStackData Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_57569 Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_11372;)V
      official b Leaz;b(Lfdc;)V
    • createComponentMap

      public final ComponentMap createComponentMap()
      Mappings:
      Namespace Name Mixin selector
      named createComponentMap Lnet/minecraft/block/entity/BlockEntity;createComponentMap()Lnet/minecraft/component/ComponentMap;
      intermediary method_57590 Lnet/minecraft/class_2586;method_57590()Lnet/minecraft/class_9323;
      official r Leaz;r()Lkn;
    • getComponents

      public ComponentMap getComponents()
      Mappings:
      Namespace Name Mixin selector
      named getComponents Lnet/minecraft/block/entity/BlockEntity;getComponents()Lnet/minecraft/component/ComponentMap;
      intermediary method_58693 Lnet/minecraft/class_2586;method_58693()Lnet/minecraft/class_9323;
      official s Leaz;s()Lkn;
    • setComponents

      public void setComponents(ComponentMap components)
      Mappings:
      Namespace Name Mixin selector
      named setComponents Lnet/minecraft/block/entity/BlockEntity;setComponents(Lnet/minecraft/component/ComponentMap;)V
      intermediary method_58684 Lnet/minecraft/class_2586;method_58684(Lnet/minecraft/class_9323;)V
      official a Leaz;a(Lkn;)V
    • tryParseCustomName

      @Nullable public static @Nullable Text tryParseCustomName(ReadView view, String key)
      Mappings:
      Namespace Name Mixin selector
      named tryParseCustomName Lnet/minecraft/block/entity/BlockEntity;tryParseCustomName(Lnet/minecraft/storage/ReadView;Ljava/lang/String;)Lnet/minecraft/text/Text;
      intermediary method_59894 Lnet/minecraft/class_2586;method_59894(Lnet/minecraft/class_11368;Ljava/lang/String;)Lnet/minecraft/class_2561;
      official a Leaz;a(Lfda;Ljava/lang/String;)Lxo;
    • getReporterContext

      public ErrorReporter.Context getReporterContext()
      Mappings:
      Namespace Name Mixin selector
      named getReporterContext Lnet/minecraft/block/entity/BlockEntity;getReporterContext()Lnet/minecraft/util/ErrorReporter$Context;
      intermediary method_71402 Lnet/minecraft/class_2586;method_71402()Lnet/minecraft/class_8942$class_11336;
      official t Leaz;t()Lbci$f;