Class DecoratedPotBlockEntity
- Mappings:
Namespace Name official ddk
intermediary net/minecraft/class_8172
named net/minecraft/block/entity/DecoratedPotBlockEntity
-
Nested Class Summary
-
Field Summary
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionasStack()
static ItemStack
void
readNbt
(NbtCompound nbt) Reads data fromnbt
.void
readNbtFromStack
(ItemStack stack) 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, ornull
to not send the packet.protected void
writeNbt
(NbtCompound nbt) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
-
Field Details
-
SHERDS_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lddk;a:Ljava/lang/String;
intermediary field_42782
Lnet/minecraft/class_8172;field_42782:Ljava/lang/String;
named SHERDS_NBT_KEY
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;SHERDS_NBT_KEY:Ljava/lang/String;
-
sherds
- Mappings:
Namespace Name Mixin selector official b
Lddk;b:Lddk$a;
intermediary field_44706
Lnet/minecraft/class_8172;field_44706:Lnet/minecraft/class_8172$class_8526;
named sherds
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;sherds:Lnet/minecraft/block/entity/DecoratedPotBlockEntity$Sherds;
-
-
Constructor Details
-
DecoratedPotBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>
Lddk;<init>(Lgw;Ldfj;)V
intermediary <init>
Lnet/minecraft/class_8172;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
named <init>
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
writeNbt
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.
- Overrides:
writeNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official b
Ldcv;b(Lqw;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)V
named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
readNbt
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.
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.- Overrides:
readNbt
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Ldcv;a(Lqw;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)V
named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
toUpdatePacket
Description copied from class:BlockEntity
Returns the packet to send to nearby players when the block entity's observable state changes, ornull
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 toBlockEntity.readNbt(net.minecraft.nbt.NbtCompound)
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());
.- Overrides:
toUpdatePacket
in classBlockEntity
- 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 official c
Lddk;c()Lxd;
intermediary method_49200
Lnet/minecraft/class_8172;method_49200()Lnet/minecraft/class_2622;
named toUpdatePacket
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
-
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
BlockEntity.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
BlockEntity.createNbt()
.- Overrides:
toInitialChunkDataNbt
in classBlockEntity
- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector official as_
Ldcv;as_()Lqw;
intermediary method_16887
Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;
named toInitialChunkDataNbt
Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
getHorizontalFacing
- Mappings:
Namespace Name Mixin selector official d
Lddk;d()Lha;
intermediary method_49204
Lnet/minecraft/class_8172;method_49204()Lnet/minecraft/class_2350;
named getHorizontalFacing
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getHorizontalFacing()Lnet/minecraft/util/math/Direction;
-
getSherds
- Mappings:
Namespace Name Mixin selector official f
Lddk;f()Lddk$a;
intermediary method_51511
Lnet/minecraft/class_8172;method_51511()Lnet/minecraft/class_8172$class_8526;
named getSherds
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getSherds()Lnet/minecraft/block/entity/DecoratedPotBlockEntity$Sherds;
-
readNbtFromStack
- Mappings:
Namespace Name Mixin selector official a
Lddk;a(Lcjf;)V
intermediary method_49196
Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/class_1799;)V
named readNbtFromStack
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;readNbtFromStack(Lnet/minecraft/item/ItemStack;)V
-
asStack
- Mappings:
Namespace Name Mixin selector official g
Lddk;g()Lcjf;
intermediary method_52578
Lnet/minecraft/class_8172;method_52578()Lnet/minecraft/class_1799;
named asStack
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;asStack()Lnet/minecraft/item/ItemStack;
-
getStackWith
- Mappings:
Namespace Name Mixin selector official a
Lddk;a(Lddk$a;)Lcjf;
intermediary method_52577
Lnet/minecraft/class_8172;method_52577(Lnet/minecraft/class_8172$class_8526;)Lnet/minecraft/class_1799;
named getStackWith
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getStackWith(Lnet/minecraft/block/entity/DecoratedPotBlockEntity$Sherds;)Lnet/minecraft/item/ItemStack;
-