Class BlockEntity
- All Implemented Interfaces:
DebugTrackable
- Direct Known Subclasses:
BannerBlockEntity,BeaconBlockEntity,BedBlockEntity,BeehiveBlockEntity,BellBlockEntity,BrushableBlockEntity,CampfireBlockEntity,ChiseledBookshelfBlockEntity,CommandBlockBlockEntity,ComparatorBlockEntity,ConduitBlockEntity,CopperGolemStatueBlockEntity,CreakingHeartBlockEntity,DaylightDetectorBlockEntity,DecoratedPotBlockEntity,EnchantingTableBlockEntity,EnderChestBlockEntity,EndPortalBlockEntity,JigsawBlockEntity,JukeboxBlockEntity,LecternBlockEntity,LockableContainerBlockEntity,MobSpawnerBlockEntity,PistonBlockEntity,SculkCatalystBlockEntity,SculkSensorBlockEntity,SculkShriekerBlockEntity,ShelfBlockEntity,SignBlockEntity,SkullBlockEntity,StructureBlockBlockEntity,TestBlockEntity,TestInstanceBlockEntity,TrialSpawnerBlockEntity,VaultBlockEntity
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
#readNbtinvalid reference
#writeNbtmarkDirty().
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/BlockEntityintermediary net/minecraft/class_2586official egg
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.world.debug.DebugTrackable
DebugTrackable.DebugDataSupplier<T>, DebugTrackable.Tracker -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BlockStateprivate ComponentMapprivate static final Loggerprotected final BlockPosprotected booleanprivate final BlockEntityType<?> private static final com.mojang.serialization.Codec<BlockEntityType<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddComponents(ComponentMap.Builder builder) voidfinal NbtCompoundcreateComponentlessNbt(RegistryWrapper.WrapperLookup registries) final ComponentMapstatic @Nullable BlockEntitycreateFromNbt(BlockPos pos, BlockState state, NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Returns the new block entity loaded fromnbt, ornullif it fails.final NbtCompoundcreateNbt(RegistryWrapper.WrapperLookup registries) Returns the block entity's NBT data.final NbtCompoundReturns the block entity's NBT data with identifying data.Returns the cached block state at the block entity's position.getPos()Returns the block entity's position.getType()getWorld()Returns the world the block entity belongs to.booleanhasWorld()booleanvoidMarks this block entity as dirty and that it needs to be saved.protected static voidmarkDirty(World world, BlockPos pos, BlockState state) voidvoidonBlockReplaced(BlockPos pos, BlockState oldState) booleanonSyncedBlockEvent(int type, int data) If this block entity's block extendsBlockWithEntity, this is called insideAbstractBlock.onSyncedBlockEvent(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, int, int).voidpopulateCrashReport(CrashReportSection crashReportSection) static BlockPosposFromNbt(ChunkPos chunkPos, NbtCompound nbt) Returns the block position fromnbt.final voidfinal voidfinal voidreadComponents(ComponentMap defaultComponents, ComponentChanges components) protected voidreadComponents(ComponentsAccess components) final voidreadComponents(ItemStack stack) protected voidReads data fromnbt.voidregisterTracking(ServerWorld world, DebugTrackable.Tracker tracker) voidDeprecated.voidsetCachedState(BlockState state) Deprecated.voidsetComponents(ComponentMap components) voidSets the world the block entity belongs to.booleansupports(BlockState state) toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries) Returns the serialized state of this block entity that is observable by clients.Returns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.tryParseCustomName(ReadView view, String key) private voidvalidateSupports(BlockState state) voidprotected voidWrites data tonbt.voidwriteDataWithId(WriteView view) Returns the block entity's NBT data with block entity type ID.voidwriteDataWithoutId(WriteView data) voidwriteFullData(WriteView view) private voidWrites the block entity type ID tonbtunder theidkey.static voidwriteId(WriteView view, BlockEntityType<?> type) Writes the ID oftypetonbtunder theidkey.private voidWrites tonbtthe block entity type ID under theidkey, and the block's position underx,y, andzkeys.
-
Field Details
-
TYPE_CODEC
- Mappings:
Namespace Name Mixin selector named TYPE_CODECLnet/minecraft/block/entity/BlockEntity;TYPE_CODEC:Lcom/mojang/serialization/Codec;intermediary field_57768Lnet/minecraft/class_2586;field_57768:Lcom/mojang/serialization/Codec;official dLegg;d:Lcom/mojang/serialization/Codec;
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/block/entity/BlockEntity;LOGGER:Lorg/slf4j/Logger;intermediary field_11868Lnet/minecraft/class_2586;field_11868:Lorg/slf4j/Logger;official eLegg;e:Lorg/slf4j/Logger;
-
type
- Mappings:
Namespace Name Mixin selector named typeLnet/minecraft/block/entity/BlockEntity;type:Lnet/minecraft/block/entity/BlockEntityType;intermediary field_11864Lnet/minecraft/class_2586;field_11864:Lnet/minecraft/class_2591;official fLegg;f:Legi;
-
world
- Mappings:
Namespace Name Mixin selector named worldLnet/minecraft/block/entity/BlockEntity;world:Lnet/minecraft/world/World;intermediary field_11863Lnet/minecraft/class_2586;field_11863:Lnet/minecraft/class_1937;official nLegg;n:Ldrq;
-
pos
- Mappings:
Namespace Name Mixin selector named posLnet/minecraft/block/entity/BlockEntity;pos:Lnet/minecraft/util/math/BlockPos;intermediary field_11867Lnet/minecraft/class_2586;field_11867:Lnet/minecraft/class_2338;official oLegg;o:Lja;
-
removed
protected boolean removed- Mappings:
Namespace Name Mixin selector named removedLnet/minecraft/block/entity/BlockEntity;removed:Zintermediary field_11865Lnet/minecraft/class_2586;field_11865:Zofficial pLegg;p:Z
-
cachedState
- Mappings:
Namespace Name Mixin selector named cachedStateLnet/minecraft/block/entity/BlockEntity;cachedState:Lnet/minecraft/block/BlockState;intermediary field_11866Lnet/minecraft/class_2586;field_11866:Lnet/minecraft/class_2680;official gLegg;g:Lejm;
-
components
- Mappings:
Namespace Name Mixin selector named componentsLnet/minecraft/block/entity/BlockEntity;components:Lnet/minecraft/component/ComponentMap;intermediary field_50172Lnet/minecraft/class_2586;field_50172:Lnet/minecraft/class_9323;official hLegg;h:Lkm;
-
-
Constructor Details
-
BlockEntity
- 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;)Vintermediary <init>Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Legg;<init>(Legi;Lja;Lejm;)V
-
-
Method Details
-
validateSupports
- Mappings:
Namespace Name Mixin selector named validateSupportsLnet/minecraft/block/entity/BlockEntity;validateSupports(Lnet/minecraft/block/BlockState;)Vintermediary method_61175Lnet/minecraft/class_2586;method_61175(Lnet/minecraft/class_2680;)Vofficial aLegg;a(Lejm;)V
-
supports
- Mappings:
Namespace Name Mixin selector named supportsLnet/minecraft/block/entity/BlockEntity;supports(Lnet/minecraft/block/BlockState;)Zintermediary method_61176Lnet/minecraft/class_2586;method_61176(Lnet/minecraft/class_2680;)Zofficial bLegg;b(Lejm;)Z
-
posFromNbt
Returns the block position fromnbt.The passed NBT should use lowercase
x,y, andzkeys to store the position. This is incompatible withthat use uppercase keys.invalid reference
net.minecraft.nbt.NbtHelper#fromBlockPos- Returns:
- the block position from
nbt - Mappings:
Namespace Name Mixin selector named posFromNbtLnet/minecraft/block/entity/BlockEntity;posFromNbt(Lnet/minecraft/util/math/ChunkPos;Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/util/math/BlockPos;intermediary method_38239Lnet/minecraft/class_2586;method_38239(Lnet/minecraft/class_1923;Lnet/minecraft/class_2487;)Lnet/minecraft/class_2338;official aLegg;a(Ldqv;Lup;)Lja;
-
getWorld
Returns the world the block entity belongs to.This can return
nullduring world generation.- Returns:
- the world the block entity belongs to
- Mappings:
Namespace Name Mixin selector named getWorldLnet/minecraft/block/entity/BlockEntity;getWorld()Lnet/minecraft/world/World;intermediary method_10997Lnet/minecraft/class_2586;method_10997()Lnet/minecraft/class_1937;official jLegg;j()Ldrq;
-
setWorld
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 setWorldLnet/minecraft/block/entity/BlockEntity;setWorld(Lnet/minecraft/world/World;)Vintermediary method_31662Lnet/minecraft/class_2586;method_31662(Lnet/minecraft/class_1937;)Vofficial aLegg;a(Ldrq;)V
-
hasWorld
public boolean hasWorld()- Mappings:
Namespace Name Mixin selector named hasWorldLnet/minecraft/block/entity/BlockEntity;hasWorld()Zintermediary method_11002Lnet/minecraft/class_2586;method_11002()Zofficial nLegg;n()Z
-
readData
Reads data fromnbt. 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.
nbtmight 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:
- Mappings:
Namespace Name Mixin selector named readDataLnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)Vofficial aLegg;a(Lfip;)V
-
read
- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/block/entity/BlockEntity;read(Lnet/minecraft/storage/ReadView;)Vintermediary method_58690Lnet/minecraft/class_2586;method_58690(Lnet/minecraft/class_11368;)Vofficial bLegg;b(Lfip;)V
-
readComponentlessData
- Mappings:
Namespace Name Mixin selector named readComponentlessDataLnet/minecraft/block/entity/BlockEntity;readComponentlessData(Lnet/minecraft/storage/ReadView;)Vintermediary method_58691Lnet/minecraft/class_2586;method_58691(Lnet/minecraft/class_11368;)Vofficial cLegg;c(Lfip;)V
-
writeData
Writes data tonbt. 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:
- Mappings:
Namespace Name Mixin selector named writeDataLnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)Vofficial aLegg;a(Lfir;)V
-
createNbtWithIdentifyingData
Returns the block entity's NBT data with identifying data.In addition to data written at
, this also writes theinvalid reference
#writeNbtand the position of the block entity.invalid reference
block entity type ID
- Returns:
- the block entity's NBT data with identifying data
- See Also:
- Mappings:
Namespace Name Mixin selector named createNbtWithIdentifyingDataLnet/minecraft/block/entity/BlockEntity;createNbtWithIdentifyingData(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_38242Lnet/minecraft/class_2586;method_38242(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official bLegg;b(Ljm$a;)Lup;
-
writeFullData
- Mappings:
Namespace Name Mixin selector named writeFullDataLnet/minecraft/block/entity/BlockEntity;writeFullData(Lnet/minecraft/storage/WriteView;)Vintermediary method_71399Lnet/minecraft/class_2586;method_71399(Lnet/minecraft/class_11372;)Vofficial cLegg;c(Lfir;)V
-
writeDataWithId
Returns the block entity's NBT data with block entity type ID.In addition to data written at
, this also writes theinvalid reference
#writeNbt.invalid reference
block entity type ID
- See Also:
- Mappings:
Namespace Name Mixin selector named writeDataWithIdLnet/minecraft/block/entity/BlockEntity;writeDataWithId(Lnet/minecraft/storage/WriteView;)Vintermediary method_38243Lnet/minecraft/class_2586;method_38243(Lnet/minecraft/class_11372;)Vofficial dLegg;d(Lfir;)V
-
createNbt
Returns the block entity's NBT data.Internally, this calls
with a newinvalid reference
#writeNbtNbtCompoundand returns the compound.- Returns:
- the block entity's NBT data
- See Also:
- Mappings:
Namespace Name Mixin selector named createNbtLnet/minecraft/block/entity/BlockEntity;createNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_38244Lnet/minecraft/class_2586;method_38244(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official cLegg;c(Ljm$a;)Lup;
-
writeDataWithoutId
- Mappings:
Namespace Name Mixin selector named writeDataWithoutIdLnet/minecraft/block/entity/BlockEntity;writeDataWithoutId(Lnet/minecraft/storage/WriteView;)Vintermediary method_71400Lnet/minecraft/class_2586;method_71400(Lnet/minecraft/class_11372;)Vofficial eLegg;e(Lfir;)V
-
createComponentlessNbt
- Mappings:
Namespace Name Mixin selector named createComponentlessNbtLnet/minecraft/block/entity/BlockEntity;createComponentlessNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_58692Lnet/minecraft/class_2586;method_58692(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official dLegg;d(Ljm$a;)Lup;
-
writeComponentlessData
- Mappings:
Namespace Name Mixin selector named writeComponentlessDataLnet/minecraft/block/entity/BlockEntity;writeComponentlessData(Lnet/minecraft/storage/WriteView;)Vintermediary method_71401Lnet/minecraft/class_2586;method_71401(Lnet/minecraft/class_11372;)Vofficial fLegg;f(Lfir;)V
-
writeId
Writes the block entity type ID tonbtunder theidkey.- Throws:
RuntimeException- if the block entity type is not registered in the registry- Mappings:
Namespace Name Mixin selector named writeIdLnet/minecraft/block/entity/BlockEntity;writeId(Lnet/minecraft/storage/WriteView;)Vintermediary method_38241Lnet/minecraft/class_2586;method_38241(Lnet/minecraft/class_11372;)Vofficial gLegg;g(Lfir;)V
-
writeId
Writes the ID oftypetonbtunder theidkey.- Mappings:
Namespace Name Mixin selector named writeIdLnet/minecraft/block/entity/BlockEntity;writeId(Lnet/minecraft/storage/WriteView;Lnet/minecraft/block/entity/BlockEntityType;)Vintermediary method_38238Lnet/minecraft/class_2586;method_38238(Lnet/minecraft/class_11372;Lnet/minecraft/class_2591;)Vofficial aLegg;a(Lfir;Legi;)V
-
writeIdentifyingData
Writes tonbtthe block entity type ID under theidkey, and the block's position underx,y, andzkeys.- Throws:
RuntimeException- if the block entity type is not registered in the registry- Mappings:
Namespace Name Mixin selector named writeIdentifyingDataLnet/minecraft/block/entity/BlockEntity;writeIdentifyingData(Lnet/minecraft/storage/WriteView;)Vintermediary method_10999Lnet/minecraft/class_2586;method_10999(Lnet/minecraft/class_11372;)Vofficial hLegg;h(Lfir;)V
-
createFromNbt
@Nullable public static @Nullable BlockEntity createFromNbt(BlockPos pos, BlockState state, NbtCompound nbt, RegistryWrapper.WrapperLookup registries) Returns the new block entity loaded fromnbt, ornullif it fails.This is used during chunk loading. This can fail if
nbthas an improper or unregisteredid, or ifthrows an exception; in these cases, this logs an error and returnsinvalid reference
#readNbtnull.- Returns:
- the new block entity loaded from
nbt, ornullif it fails - Mappings:
Namespace Name Mixin selector named createFromNbtLnet/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_11005Lnet/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 aLegg;a(Lja;Lejm;Lup;Ljm$a;)Legg;
-
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 markDirtyLnet/minecraft/block/entity/BlockEntity;markDirty()Vintermediary method_5431Lnet/minecraft/class_2586;method_5431()Vofficial eLegg;e()V
-
markDirty
- Mappings:
Namespace Name Mixin selector named markDirtyLnet/minecraft/block/entity/BlockEntity;markDirty(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_31663Lnet/minecraft/class_2586;method_31663(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial aLegg;a(Ldrq;Lja;Lejm;)V
-
getPos
Returns the block entity's position.- Returns:
- the block entity's position
- Mappings:
Namespace Name Mixin selector named getPosLnet/minecraft/block/entity/BlockEntity;getPos()Lnet/minecraft/util/math/BlockPos;intermediary method_11016Lnet/minecraft/class_2586;method_11016()Lnet/minecraft/class_2338;official aD_Legg;aD_()Lja;
-
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 getCachedStateLnet/minecraft/block/entity/BlockEntity;getCachedState()Lnet/minecraft/block/BlockState;intermediary method_11010Lnet/minecraft/class_2586;method_11010()Lnet/minecraft/class_2680;official oLegg;o()Lejm;
-
toUpdatePacket
Returns the packet to send to nearby players when the block entity's observable state changes, ornullto not send the packet.If the data returned by
initial chunk datais suitable for updates, the following shortcut can be used to create an update packet:BlockEntityUpdateS2CPacket.create(this). The NBT will be passed toon the client.invalid reference
#readNbt"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
nullto not send the packet - See Also:
- Mappings:
Namespace Name Mixin selector named toUpdatePacketLnet/minecraft/block/entity/BlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/Packet;intermediary method_38235Lnet/minecraft/class_2586;method_38235()Lnet/minecraft/class_2596;official ax_Legg;ax_()Laao;
-
toInitialChunkDataNbt
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 defaultBlockEntityUpdateS2CPacket."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 toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official aLegg;a(Ljm$a;)Lup;
-
isRemoved
public boolean isRemoved()- Mappings:
Namespace Name Mixin selector named isRemovedLnet/minecraft/block/entity/BlockEntity;isRemoved()Zintermediary method_11015Lnet/minecraft/class_2586;method_11015()Zofficial pLegg;p()Z
-
markRemoved
public void markRemoved()- Mappings:
Namespace Name Mixin selector named markRemovedLnet/minecraft/block/entity/BlockEntity;markRemoved()Vintermediary method_11012Lnet/minecraft/class_2586;method_11012()Vofficial ay_Legg;ay_()V
-
cancelRemoval
public void cancelRemoval()- Mappings:
Namespace Name Mixin selector named cancelRemovalLnet/minecraft/block/entity/BlockEntity;cancelRemoval()Vintermediary method_10996Lnet/minecraft/class_2586;method_10996()Vofficial qLegg;q()V
-
onBlockReplaced
- Mappings:
Namespace Name Mixin selector named onBlockReplacedLnet/minecraft/block/entity/BlockEntity;onBlockReplaced(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Vintermediary method_66473Lnet/minecraft/class_2586;method_66473(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial aLegg;a(Lja;Lejm;)V
-
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data) If this block entity's block extendsBlockWithEntity, this is called insideAbstractBlock.onSyncedBlockEvent(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, int, int).- See Also:
- Mappings:
Namespace Name Mixin selector named onSyncedBlockEventLnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Zintermediary method_11004Lnet/minecraft/class_2586;method_11004(II)Zofficial a_Legg;a_(II)Z
-
populateCrashReport
- Mappings:
Namespace Name Mixin selector named populateCrashReportLnet/minecraft/block/entity/BlockEntity;populateCrashReport(Lnet/minecraft/util/crash/CrashReportSection;)Vintermediary method_11003Lnet/minecraft/class_2586;method_11003(Lnet/minecraft/class_129;)Vofficial aLegg;a(Lq;)V
-
getNameForReport
- Mappings:
Namespace Name Mixin selector named getNameForReportLnet/minecraft/block/entity/BlockEntity;getNameForReport()Ljava/lang/String;intermediary method_61177Lnet/minecraft/class_2586;method_61177()Ljava/lang/String;official rLegg;r()Ljava/lang/String;
-
getType
- Mappings:
Namespace Name Mixin selector named getTypeLnet/minecraft/block/entity/BlockEntity;getType()Lnet/minecraft/block/entity/BlockEntityType;intermediary method_11017Lnet/minecraft/class_2586;method_11017()Lnet/minecraft/class_2591;official sLegg;s()Legi;
-
setCachedState
Deprecated.- Mappings:
Namespace Name Mixin selector named setCachedStateLnet/minecraft/block/entity/BlockEntity;setCachedState(Lnet/minecraft/block/BlockState;)Vintermediary method_31664Lnet/minecraft/class_2586;method_31664(Lnet/minecraft/class_2680;)Vofficial cLegg;c(Lejm;)V
-
readComponents
- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9473;)Vofficial aLegg;a(Lkk;)V
-
readComponents
- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/item/ItemStack;)Vintermediary method_58683Lnet/minecraft/class_2586;method_58683(Lnet/minecraft/class_1799;)Vofficial aLegg;a(Ldhp;)V
-
readComponents
- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentMap;Lnet/minecraft/component/ComponentChanges;)Vintermediary method_58685Lnet/minecraft/class_2586;method_58685(Lnet/minecraft/class_9323;Lnet/minecraft/class_9326;)Vofficial aLegg;a(Lkm;Lkn;)V
-
addComponents
- Mappings:
Namespace Name Mixin selector named addComponentsLnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)Vintermediary method_57567Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)Vofficial aLegg;a(Lkm$a;)V
-
removeFromCopiedStackData
Deprecated.- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackDataLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackData(Lnet/minecraft/storage/WriteView;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_11372;)Vofficial bLegg;b(Lfir;)V
-
createComponentMap
- Mappings:
Namespace Name Mixin selector named createComponentMapLnet/minecraft/block/entity/BlockEntity;createComponentMap()Lnet/minecraft/component/ComponentMap;intermediary method_57590Lnet/minecraft/class_2586;method_57590()Lnet/minecraft/class_9323;official tLegg;t()Lkm;
-
getComponents
- Mappings:
Namespace Name Mixin selector named getComponentsLnet/minecraft/block/entity/BlockEntity;getComponents()Lnet/minecraft/component/ComponentMap;intermediary method_58693Lnet/minecraft/class_2586;method_58693()Lnet/minecraft/class_9323;official uLegg;u()Lkm;
-
setComponents
- Mappings:
Namespace Name Mixin selector named setComponentsLnet/minecraft/block/entity/BlockEntity;setComponents(Lnet/minecraft/component/ComponentMap;)Vintermediary method_58684Lnet/minecraft/class_2586;method_58684(Lnet/minecraft/class_9323;)Vofficial aLegg;a(Lkm;)V
-
tryParseCustomName
- Mappings:
Namespace Name Mixin selector named tryParseCustomNameLnet/minecraft/block/entity/BlockEntity;tryParseCustomName(Lnet/minecraft/storage/ReadView;Ljava/lang/String;)Lnet/minecraft/text/Text;intermediary method_59894Lnet/minecraft/class_2586;method_59894(Lnet/minecraft/class_11368;Ljava/lang/String;)Lnet/minecraft/class_2561;official aLegg;a(Lfip;Ljava/lang/String;)Lxx;
-
getReporterContext
- Mappings:
Namespace Name Mixin selector named getReporterContextLnet/minecraft/block/entity/BlockEntity;getReporterContext()Lnet/minecraft/util/ErrorReporter$Context;intermediary method_71402Lnet/minecraft/class_2586;method_71402()Lnet/minecraft/class_8942$class_11336;official vLegg;v()Lbfo$f;
-
registerTracking
- Specified by:
registerTrackingin interfaceDebugTrackable- Mappings:
Namespace Name Mixin selector named registerTrackingLnet/minecraft/world/debug/DebugTrackable;registerTracking(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/debug/DebugTrackable$Tracker;)Vintermediary method_74589Lnet/minecraft/class_12023;method_74589(Lnet/minecraft/class_3218;Lnet/minecraft/class_12023$class_12024;)Vofficial aLbvv;a(Lawx;Lbvv$a;)V
-