Class JigsawBlockEntity
- Mappings:
Namespace Name official dakintermediary net/minecraft/class_3751named net/minecraft/block/entity/JigsawBlockEntity
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate Stringprivate JigsawBlockEntity.Jointstatic final Stringprivate Identifierstatic final Stringprivate RegistryKey<StructurePool>static final Stringprivate Identifierstatic final StringFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate(ServerWorld world, int maxDepth, boolean keepJigsaws) getJoint()getName()getPool()voidreadNbt(NbtCompound nbt) Reads data fromnbt.voidsetFinalState(String finalState) voidsetJoint(JigsawBlockEntity.Joint joint) voidsetName(Identifier name) voidsetPool(RegistryKey<StructurePool> pool) voidsetTarget(Identifier target) 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.protected voidwriteNbt(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
-
TARGET_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official aLdak;a:Ljava/lang/String;intermediary field_31343Lnet/minecraft/class_3751;field_31343:Ljava/lang/String;named TARGET_KEYLnet/minecraft/block/entity/JigsawBlockEntity;TARGET_KEY:Ljava/lang/String;
-
POOL_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official bLdak;b:Ljava/lang/String;intermediary field_31344Lnet/minecraft/class_3751;field_31344:Ljava/lang/String;named POOL_KEYLnet/minecraft/block/entity/JigsawBlockEntity;POOL_KEY:Ljava/lang/String;
-
JOINT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official cLdak;c:Ljava/lang/String;intermediary field_31345Lnet/minecraft/class_3751;field_31345:Ljava/lang/String;named JOINT_KEYLnet/minecraft/block/entity/JigsawBlockEntity;JOINT_KEY:Ljava/lang/String;
-
NAME_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official dLdak;d:Ljava/lang/String;intermediary field_31346Lnet/minecraft/class_3751;field_31346:Ljava/lang/String;named NAME_KEYLnet/minecraft/block/entity/JigsawBlockEntity;NAME_KEY:Ljava/lang/String;
-
FINAL_STATE_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official eLdak;e:Ljava/lang/String;intermediary field_31347Lnet/minecraft/class_3751;field_31347:Ljava/lang/String;named FINAL_STATE_KEYLnet/minecraft/block/entity/JigsawBlockEntity;FINAL_STATE_KEY:Ljava/lang/String;
-
name
- Mappings:
Namespace Name Mixin selector official fLdak;f:Lacq;intermediary field_16550Lnet/minecraft/class_3751;field_16550:Lnet/minecraft/class_2960;named nameLnet/minecraft/block/entity/JigsawBlockEntity;name:Lnet/minecraft/util/Identifier;
-
target
- Mappings:
Namespace Name Mixin selector official gLdak;g:Lacq;intermediary field_16552Lnet/minecraft/class_3751;field_16552:Lnet/minecraft/class_2960;named targetLnet/minecraft/block/entity/JigsawBlockEntity;target:Lnet/minecraft/util/Identifier;
-
pool
- Mappings:
Namespace Name Mixin selector official hLdak;h:Lacp;intermediary field_23327Lnet/minecraft/class_3751;field_23327:Lnet/minecraft/class_5321;named poolLnet/minecraft/block/entity/JigsawBlockEntity;pool:Lnet/minecraft/registry/RegistryKey;
-
joint
- Mappings:
Namespace Name Mixin selector official iLdak;i:Ldak$a;intermediary field_23328Lnet/minecraft/class_3751;field_23328:Lnet/minecraft/class_3751$class_4991;named jointLnet/minecraft/block/entity/JigsawBlockEntity;joint:Lnet/minecraft/block/entity/JigsawBlockEntity$Joint;
-
finalState
- Mappings:
Namespace Name Mixin selector official jLdak;j:Ljava/lang/String;intermediary field_16551Lnet/minecraft/class_3751;field_16551:Ljava/lang/String;named finalStateLnet/minecraft/block/entity/JigsawBlockEntity;finalState:Ljava/lang/String;
-
-
Constructor Details
-
JigsawBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Ldak;<init>(Lgu;Ldbz;)Vintermediary <init>Lnet/minecraft/class_3751;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <init>Lnet/minecraft/block/entity/JigsawBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
-
-
Method Details
-
getName
- Mappings:
Namespace Name Mixin selector official cLdak;c()Lacq;intermediary method_16381Lnet/minecraft/class_3751;method_16381()Lnet/minecraft/class_2960;named getNameLnet/minecraft/block/entity/JigsawBlockEntity;getName()Lnet/minecraft/util/Identifier;
-
getTarget
- Mappings:
Namespace Name Mixin selector official dLdak;d()Lacq;intermediary method_26399Lnet/minecraft/class_3751;method_26399()Lnet/minecraft/class_2960;named getTargetLnet/minecraft/block/entity/JigsawBlockEntity;getTarget()Lnet/minecraft/util/Identifier;
-
getPool
- Mappings:
Namespace Name Mixin selector official fLdak;f()Lacp;intermediary method_16382Lnet/minecraft/class_3751;method_16382()Lnet/minecraft/class_5321;named getPoolLnet/minecraft/block/entity/JigsawBlockEntity;getPool()Lnet/minecraft/registry/RegistryKey;
-
getFinalState
- Mappings:
Namespace Name Mixin selector official gLdak;g()Ljava/lang/String;intermediary method_16380Lnet/minecraft/class_3751;method_16380()Ljava/lang/String;named getFinalStateLnet/minecraft/block/entity/JigsawBlockEntity;getFinalState()Ljava/lang/String;
-
getJoint
- Mappings:
Namespace Name Mixin selector official iLdak;i()Ldak$a;intermediary method_26400Lnet/minecraft/class_3751;method_26400()Lnet/minecraft/class_3751$class_4991;named getJointLnet/minecraft/block/entity/JigsawBlockEntity;getJoint()Lnet/minecraft/block/entity/JigsawBlockEntity$Joint;
-
setName
- Mappings:
Namespace Name Mixin selector official aLdak;a(Lacq;)Vintermediary method_16379Lnet/minecraft/class_3751;method_16379(Lnet/minecraft/class_2960;)Vnamed setNameLnet/minecraft/block/entity/JigsawBlockEntity;setName(Lnet/minecraft/util/Identifier;)V
-
setTarget
- Mappings:
Namespace Name Mixin selector official bLdak;b(Lacq;)Vintermediary method_16378Lnet/minecraft/class_3751;method_16378(Lnet/minecraft/class_2960;)Vnamed setTargetLnet/minecraft/block/entity/JigsawBlockEntity;setTarget(Lnet/minecraft/util/Identifier;)V
-
setPool
- Mappings:
Namespace Name Mixin selector official aLdak;a(Lacp;)Vintermediary method_26398Lnet/minecraft/class_3751;method_26398(Lnet/minecraft/class_5321;)Vnamed setPoolLnet/minecraft/block/entity/JigsawBlockEntity;setPool(Lnet/minecraft/registry/RegistryKey;)V
-
setFinalState
- Mappings:
Namespace Name Mixin selector official aLdak;a(Ljava/lang/String;)Vintermediary method_16377Lnet/minecraft/class_3751;method_16377(Ljava/lang/String;)Vnamed setFinalStateLnet/minecraft/block/entity/JigsawBlockEntity;setFinalState(Ljava/lang/String;)V
-
setJoint
- Mappings:
Namespace Name Mixin selector official aLdak;a(Ldak$a;)Vintermediary method_26396Lnet/minecraft/class_3751;method_26396(Lnet/minecraft/class_3751$class_4991;)Vnamed setJointLnet/minecraft/block/entity/JigsawBlockEntity;setJoint(Lnet/minecraft/block/entity/JigsawBlockEntity$Joint;)V
-
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:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official bLczl;b(Lqr;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;)Vnamed writeNbtLnet/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.
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.- Overrides:
readNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official aLczl;a(Lqr;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
toUpdatePacket
Description copied from class:BlockEntityReturns 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 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:
toUpdatePacketin classBlockEntity- 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 official jLdak;j()Luz;intermediary method_38248Lnet/minecraft/class_3751;method_38248()Lnet/minecraft/class_2622;named toUpdatePacketLnet/minecraft/block/entity/JigsawBlockEntity;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:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector official ap_Lczl;ap_()Lqr;intermediary method_16887Lnet/minecraft/class_2586;method_16887()Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt()Lnet/minecraft/nbt/NbtCompound;
-
generate
- Mappings:
Namespace Name Mixin selector official aLdak;a(Laif;IZ)Vintermediary method_27191Lnet/minecraft/class_3751;method_27191(Lnet/minecraft/class_3218;IZ)Vnamed generateLnet/minecraft/block/entity/JigsawBlockEntity;generate(Lnet/minecraft/server/world/ServerWorld;IZ)V
-