Class class_8172
- Mappings:
Namespace Name official czo
intermediary net/minecraft/class_8172
named net/minecraft/class_8172
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final int
private boolean
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
method_49196
(ItemStack itemStack) void
method_49197
(World world, BlockPos blockPos, ItemStack itemStack, PlayerEntity playerEntity) static void
method_49199
(List<Item> list, NbtCompound nbtCompound) boolean
void
readNbt
(NbtCompound nbt) Reads data fromnbt
.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
-
field_42782
- See Also:
- Mappings:
Namespace Name Mixin selector official a
Lczo;a:Ljava/lang/String;
intermediary field_42782
Lnet/minecraft/class_8172;field_42782:Ljava/lang/String;
named field_42782
Lnet/minecraft/class_8172;field_42782:Ljava/lang/String;
-
field_42783
private static final int field_42783- See Also:
- Mappings:
Namespace Name Mixin selector official b
Lczo;b:I
intermediary field_42783
Lnet/minecraft/class_8172;field_42783:I
named field_42783
Lnet/minecraft/class_8172;field_42783:I
-
field_42784
private boolean field_42784- Mappings:
Namespace Name Mixin selector official c
Lczo;c:Z
intermediary field_42784
Lnet/minecraft/class_8172;field_42784:Z
named field_42784
Lnet/minecraft/class_8172;field_42784:Z
-
field_42785
- Mappings:
Namespace Name Mixin selector official d
Lczo;d:Ljava/util/List;
intermediary field_42785
Lnet/minecraft/class_8172;field_42785:Ljava/util/List;
named field_42785
Lnet/minecraft/class_8172;field_42785:Ljava/util/List;
-
-
Constructor Details
-
class_8172
-
-
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
Lczb;b(Lrc;)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
Lczb;a(Lrc;)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
Lczo;c()Lvk;
intermediary method_49200
Lnet/minecraft/class_8172;method_49200()Lnet/minecraft/class_2622;
named toUpdatePacket
Lnet/minecraft/class_8172;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 ao_
Lczb;ao_()Lrc;
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;
-
method_49199
- Mappings:
Namespace Name Mixin selector official a
Lczo;a(Ljava/util/List;Lrc;)V
intermediary method_49199
Lnet/minecraft/class_8172;method_49199(Ljava/util/List;Lnet/minecraft/class_2487;)V
named method_49199
Lnet/minecraft/class_8172;method_49199(Ljava/util/List;Lnet/minecraft/nbt/NbtCompound;)V
-
method_49201
- Mappings:
Namespace Name Mixin selector official d
Lczo;d()Lcfu;
intermediary method_49201
Lnet/minecraft/class_8172;method_49201()Lnet/minecraft/class_1799;
named method_49201
Lnet/minecraft/class_8172;method_49201()Lnet/minecraft/item/ItemStack;
-
method_49202
- Mappings:
Namespace Name Mixin selector official f
Lczo;f()Ljava/util/List;
intermediary method_49202
Lnet/minecraft/class_8172;method_49202()Ljava/util/List;
named method_49202
Lnet/minecraft/class_8172;method_49202()Ljava/util/List;
-
method_49197
public void method_49197(World world, BlockPos blockPos, ItemStack itemStack, PlayerEntity playerEntity) - Mappings:
Namespace Name Mixin selector official a
Lczo;a(Lcmh;Lgr;Lcfu;Lbyl;)V
intermediary method_49197
Lnet/minecraft/class_8172;method_49197(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1799;Lnet/minecraft/class_1657;)V
named method_49197
Lnet/minecraft/class_8172;method_49197(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/player/PlayerEntity;)V
-
method_49203
public boolean method_49203()- Mappings:
Namespace Name Mixin selector official g
Lczo;g()Z
intermediary method_49203
Lnet/minecraft/class_8172;method_49203()Z
named method_49203
Lnet/minecraft/class_8172;method_49203()Z
-
method_49204
- Mappings:
Namespace Name Mixin selector official i
Lczo;i()Lgx;
intermediary method_49204
Lnet/minecraft/class_8172;method_49204()Lnet/minecraft/class_2350;
named method_49204
Lnet/minecraft/class_8172;method_49204()Lnet/minecraft/util/math/Direction;
-
method_49196
- Mappings:
Namespace Name Mixin selector official a
Lczo;a(Lcfu;)V
intermediary method_49196
Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/class_1799;)V
named method_49196
Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/item/ItemStack;)V
-