Package net.minecraft.block.entity
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,SculkCatalystBlockEntity,SculkSensorBlockEntity,SculkShriekerBlockEntity,SignBlockEntity,SkullBlockEntity,StructureBlockBlockEntity
- Mappings:
Namespace Name official crjintermediary net/minecraft/class_2586named net/minecraft/block/entity/BlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BlockStateprivate static final org.slf4j.Loggerprotected final BlockPosprotected booleanprivate final BlockEntityType<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanstatic @Nullable BlockEntitycreateFromNbt(BlockPos pos, BlockState state, NbtCompound nbt) final NbtCompoundfinal NbtCompoundfinal NbtCompoundgetPos()getType()getWorld()booleanhasWorld()booleanvoidprotected static voidmarkDirty(World world, BlockPos pos, BlockState state) voidbooleanonSyncedBlockEvent(int type, int data) voidpopulateCrashReport(CrashReportSection crashReportSection) static BlockPosposFromNbt(NbtCompound nbt) voidreadNbt(NbtCompound nbt) voidsetCachedState(BlockState state) Deprecated.voidsetStackNbt(ItemStack stack) voidSerializes the state of this block entity that is observable by clients.Implement and return a packet that should be sent to players nearby when the observable state of this block entity changes.private voidprivate voidwriteIdToNbt(NbtCompound nbt) static voidwriteIdToNbt(NbtCompound nbt, BlockEntityType<?> type) protected voidwriteNbt(NbtCompound nbt)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER- Mappings:
Namespace Name Mixin selector official bLcrj;b:Lorg/slf4j/Logger;intermediary field_11868Lnet/minecraft/class_2586;field_11868:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/block/entity/BlockEntity;LOGGER:Lorg/slf4j/Logger;
-
type
- Mappings:
Namespace Name Mixin selector official cLcrj;c:Lcrl;intermediary field_11864Lnet/minecraft/class_2586;field_11864:Lnet/minecraft/class_2591;named typeLnet/minecraft/block/entity/BlockEntity;type:Lnet/minecraft/block/entity/BlockEntityType;
-
world
- Mappings:
Namespace Name Mixin selector official nLcrj;n:Lcfa;intermediary field_11863Lnet/minecraft/class_2586;field_11863:Lnet/minecraft/class_1937;named worldLnet/minecraft/block/entity/BlockEntity;world:Lnet/minecraft/world/World;
-
pos
- Mappings:
Namespace Name Mixin selector official oLcrj;o:Lgp;intermediary field_11867Lnet/minecraft/class_2586;field_11867:Lnet/minecraft/class_2338;named posLnet/minecraft/block/entity/BlockEntity;pos:Lnet/minecraft/util/math/BlockPos;
-
removed
protected boolean removed- Mappings:
Namespace Name Mixin selector official pLcrj;p:Zintermediary field_11865Lnet/minecraft/class_2586;field_11865:Znamed removedLnet/minecraft/block/entity/BlockEntity;removed:Z
-
cachedState
- Mappings:
Namespace Name Mixin selector official dLcrj;d:Lctp;intermediary field_11866Lnet/minecraft/class_2586;field_11866:Lnet/minecraft/class_2680;named cachedStateLnet/minecraft/block/entity/BlockEntity;cachedState:Lnet/minecraft/block/BlockState;
-
-
Constructor Details
-
BlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Lcrj;<init>(Lcrl;Lgp;Lctp;)Vintermediary <init>Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
posFromNbt
- Mappings:
Namespace Name Mixin selector official cLcrj;c(Lpe;)Lgp;intermediary method_38239Lnet/minecraft/class_2586;method_38239(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2338;named posFromNbtLnet/minecraft/block/entity/BlockEntity;posFromNbt(Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/util/math/BlockPos;
-
getWorld
- Mappings:
Namespace Name Mixin selector official kLcrj;k()Lcfa;intermediary method_10997Lnet/minecraft/class_2586;method_10997()Lnet/minecraft/class_1937;named getWorldLnet/minecraft/block/entity/BlockEntity;getWorld()Lnet/minecraft/world/World;
-
setWorld
- Mappings:
Namespace Name Mixin selector official aLcrj;a(Lcfa;)Vintermediary method_31662Lnet/minecraft/class_2586;method_31662(Lnet/minecraft/class_1937;)Vnamed setWorldLnet/minecraft/block/entity/BlockEntity;setWorld(Lnet/minecraft/world/World;)V
-
hasWorld
public boolean hasWorld()- Mappings:
Namespace Name Mixin selector official lLcrj;l()Zintermediary method_11002Lnet/minecraft/class_2586;method_11002()Znamed hasWorldLnet/minecraft/block/entity/BlockEntity;hasWorld()Z
-
readNbt
- Mappings:
Namespace Name Mixin selector official aLcrj;a(Lpe;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
writeNbt
- Mappings:
Namespace Name Mixin selector official bLcrj;b(Lpe;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
createNbtWithIdentifyingData
- Mappings:
Namespace Name Mixin selector official mLcrj;m()Lpe;intermediary method_38242Lnet/minecraft/class_2586;method_38242()Lnet/minecraft/class_2487;named createNbtWithIdentifyingDataLnet/minecraft/block/entity/BlockEntity;createNbtWithIdentifyingData()Lnet/minecraft/nbt/NbtCompound;
-
createNbtWithId
- Mappings:
Namespace Name Mixin selector official nLcrj;n()Lpe;intermediary method_38243Lnet/minecraft/class_2586;method_38243()Lnet/minecraft/class_2487;named createNbtWithIdLnet/minecraft/block/entity/BlockEntity;createNbtWithId()Lnet/minecraft/nbt/NbtCompound;
-
createNbt
- Mappings:
Namespace Name Mixin selector official oLcrj;o()Lpe;intermediary method_38244Lnet/minecraft/class_2586;method_38244()Lnet/minecraft/class_2487;named createNbtLnet/minecraft/block/entity/BlockEntity;createNbt()Lnet/minecraft/nbt/NbtCompound;
-
writeIdToNbt
- Mappings:
Namespace Name Mixin selector official dLcrj;d(Lpe;)Vintermediary method_38241Lnet/minecraft/class_2586;method_38241(Lnet/minecraft/class_2487;)Vnamed writeIdToNbtLnet/minecraft/block/entity/BlockEntity;writeIdToNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
writeIdToNbt
- Mappings:
Namespace Name Mixin selector official aLcrj;a(Lpe;Lcrl;)Vintermediary method_38238Lnet/minecraft/class_2586;method_38238(Lnet/minecraft/class_2487;Lnet/minecraft/class_2591;)Vnamed writeIdToNbtLnet/minecraft/block/entity/BlockEntity;writeIdToNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/block/entity/BlockEntityType;)V
-
setStackNbt
- Mappings:
Namespace Name Mixin selector official eLcrj;e(Lbza;)Vintermediary method_38240Lnet/minecraft/class_2586;method_38240(Lnet/minecraft/class_1799;)Vnamed setStackNbtLnet/minecraft/block/entity/BlockEntity;setStackNbt(Lnet/minecraft/item/ItemStack;)V
-
writeIdentifyingData
- Mappings:
Namespace Name Mixin selector official eLcrj;e(Lpe;)Vintermediary method_10999Lnet/minecraft/class_2586;method_10999(Lnet/minecraft/class_2487;)Vnamed writeIdentifyingDataLnet/minecraft/block/entity/BlockEntity;writeIdentifyingData(Lnet/minecraft/nbt/NbtCompound;)V
-
createFromNbt
@Nullable public static @Nullable BlockEntity createFromNbt(BlockPos pos, BlockState state, NbtCompound nbt) - Mappings:
Namespace Name Mixin selector official aLcrj;a(Lgp;Lctp;Lpe;)Lcrj;intermediary method_11005Lnet/minecraft/class_2586;method_11005(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2487;)Lnet/minecraft/class_2586;named createFromNbtLnet/minecraft/block/entity/BlockEntity;createFromNbt(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/nbt/NbtCompound;)Lnet/minecraft/block/entity/BlockEntity;
-
markDirty
public void markDirty()- Mappings:
Namespace Name Mixin selector official eLcrj;e()Vintermediary method_5431Lnet/minecraft/class_2586;method_5431()Vnamed markDirtyLnet/minecraft/block/entity/BlockEntity;markDirty()V
-
markDirty
- Mappings:
Namespace Name Mixin selector official aLcrj;a(Lcfa;Lgp;Lctp;)Vintermediary method_31663Lnet/minecraft/class_2586;method_31663(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed markDirtyLnet/minecraft/block/entity/BlockEntity;markDirty(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
getPos
- Mappings:
Namespace Name Mixin selector official pLcrj;p()Lgp;intermediary method_11016Lnet/minecraft/class_2586;method_11016()Lnet/minecraft/class_2338;named getPosLnet/minecraft/block/entity/BlockEntity;getPos()Lnet/minecraft/util/math/BlockPos;
-
getCachedState
- Mappings:
Namespace Name Mixin selector official qLcrj;q()Lctp;intermediary method_11010Lnet/minecraft/class_2586;method_11010()Lnet/minecraft/class_2680;named getCachedStateLnet/minecraft/block/entity/BlockEntity;getCachedState()Lnet/minecraft/block/BlockState;
-
toUpdatePacket
Implement and return a packet that should be sent to players nearby when the observable state of this block entity changes. Return null to not send an update 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 to
readNbt(net.minecraft.nbt.NbtCompound)on the client.- Mappings:
Namespace Name Mixin selector official hLcrj;h()Lsh;intermediary method_38235Lnet/minecraft/class_2586;method_38235()Lnet/minecraft/class_2596;named toUpdatePacketLnet/minecraft/block/entity/BlockEntity;toUpdatePacket()Lnet/minecraft/network/Packet;
-
toInitialChunkDataNbt
Serializes the state of this block entity that is observable by clients. It is sent alongside the initial chunk data, as well as when the block entity implementstoUpdatePacket()and decides to use the defaultBlockEntityUpdateS2CPacket.- Mappings:
Namespace Name Mixin selector official ab_Lcrj;ab_()Lpe;intermediary method_16887Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
isRemoved
public boolean isRemoved()- Mappings:
Namespace Name Mixin selector official rLcrj;r()Zintermediary method_11015Lnet/minecraft/class_2586;method_11015()Znamed isRemovedLnet/minecraft/block/entity/BlockEntity;isRemoved()Z
-
markRemoved
public void markRemoved()- Mappings:
Namespace Name Mixin selector official ac_Lcrj;ac_()Vintermediary method_11012Lnet/minecraft/class_2586;method_11012()Vnamed markRemovedLnet/minecraft/block/entity/BlockEntity;markRemoved()V
-
cancelRemoval
public void cancelRemoval()- Mappings:
Namespace Name Mixin selector official sLcrj;s()Vintermediary method_10996Lnet/minecraft/class_2586;method_10996()Vnamed cancelRemovalLnet/minecraft/block/entity/BlockEntity;cancelRemoval()V
-
onSyncedBlockEvent
public boolean onSyncedBlockEvent(int type, int data) - Mappings:
Namespace Name Mixin selector official a_Lcrj;a_(II)Zintermediary method_11004Lnet/minecraft/class_2586;method_11004(II)Znamed onSyncedBlockEventLnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
-
populateCrashReport
- Mappings:
Namespace Name Mixin selector official aLcrj;a(Lr;)Vintermediary method_11003Lnet/minecraft/class_2586;method_11003(Lnet/minecraft/class_129;)Vnamed populateCrashReportLnet/minecraft/block/entity/BlockEntity;populateCrashReport(Lnet/minecraft/util/crash/CrashReportSection;)V
-
copyItemDataRequiresOperator
public boolean copyItemDataRequiresOperator()- Mappings:
Namespace Name Mixin selector official uLcrj;u()Zintermediary method_11011Lnet/minecraft/class_2586;method_11011()Znamed copyItemDataRequiresOperatorLnet/minecraft/block/entity/BlockEntity;copyItemDataRequiresOperator()Z
-
getType
- Mappings:
Namespace Name Mixin selector official vLcrj;v()Lcrl;intermediary method_11017Lnet/minecraft/class_2586;method_11017()Lnet/minecraft/class_2591;named getTypeLnet/minecraft/block/entity/BlockEntity;getType()Lnet/minecraft/block/entity/BlockEntityType;
-
setCachedState
Deprecated.- Mappings:
Namespace Name Mixin selector official bLcrj;b(Lctp;)Vintermediary method_31664Lnet/minecraft/class_2586;method_31664(Lnet/minecraft/class_2680;)Vnamed setCachedStateLnet/minecraft/block/entity/BlockEntity;setCachedState(Lnet/minecraft/block/BlockState;)V
-