Class DecoratedPotBlockEntity
- All Implemented Interfaces:
class_8934
,Inventory
,SingleStackInventory
,Clearable
- Mappings:
Namespace Name official dfy
intermediary net/minecraft/class_8172
named net/minecraft/block/entity/DecoratedPotBlockEntity
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected @Nullable Identifier
protected long
static final String
long
private DecoratedPotBlockEntity.Sherds
static final String
private ItemStack
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.class_8934
field_47154, field_47155
Fields inherited from interface net.minecraft.inventory.Inventory
field_42619, MAX_COUNT_PER_STACK
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasStack()
decreaseStack
(int count) getStack()
static ItemStack
void
method_54866
(long long2) long
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)
.void
readNbt
(NbtCompound nbt) Reads data fromnbt
.void
readNbtFromStack
(ItemStack stack) void
setLootTable
(@Nullable Identifier identifier) void
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.void
wobble
(DecoratedPotBlockEntity.WobbleType wobbleType) 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, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, writeIdToNbt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.class_8934
getPos, getWorld, method_54867, method_54871, method_54872, method_54873
Methods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCountPerStack, isValid, markDirty, onClose, onOpen
Methods inherited from interface net.minecraft.inventory.SingleStackInventory
canPlayerUse, clear, emptyStack, getStack, isEmpty, removeStack, removeStack, setStack, size
-
Field Details
-
SHERDS_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official e
Ldfy;e: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;
-
ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official f
Ldfy;f:Ljava/lang/String;
intermediary field_46659
Lnet/minecraft/class_8172;field_46659:Ljava/lang/String;
named ITEM_NBT_KEY
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;ITEM_NBT_KEY:Ljava/lang/String;
-
field_46660
public static final int field_46660- See Also:
- Mappings:
Namespace Name Mixin selector official g
Ldfy;g:I
intermediary field_46660
Lnet/minecraft/class_8172;field_46660:I
named field_46660
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;field_46660:I
-
lastWobbleTime
public long lastWobbleTime- Mappings:
Namespace Name Mixin selector official h
Ldfy;h:J
intermediary field_46661
Lnet/minecraft/class_8172;field_46661:J
named lastWobbleTime
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleTime:J
-
lastWobbleType
- Mappings:
Namespace Name Mixin selector official i
Ldfy;i:Ldfy$b;
intermediary field_46662
Lnet/minecraft/class_8172;field_46662:Lnet/minecraft/class_8172$class_8837;
named lastWobbleType
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleType:Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;
-
sherds
- Mappings:
Namespace Name Mixin selector official l
Ldfy;l:Ldfy$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;
-
stack
- Mappings:
Namespace Name Mixin selector official m
Ldfy;m:Lclo;
intermediary field_46663
Lnet/minecraft/class_8172;field_46663:Lnet/minecraft/class_1799;
named stack
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;stack:Lnet/minecraft/item/ItemStack;
-
field_47156
- Mappings:
Namespace Name Mixin selector official j
Ldfy;j:Lagm;
intermediary field_47156
Lnet/minecraft/class_8172;field_47156:Lnet/minecraft/class_2960;
named field_47156
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;field_47156:Lnet/minecraft/util/Identifier;
-
field_47157
protected long field_47157- Mappings:
Namespace Name Mixin selector official k
Ldfy;k:J
intermediary field_47157
Lnet/minecraft/class_8172;field_47157:J
named field_47157
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;field_47157:J
-
-
Constructor Details
-
DecoratedPotBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>
Ldfy;<init>(Lhx;Ldhn;)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
Ldfi;b(Lsd;)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
Ldfi;a(Lsd;)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 k
Ldfy;k()Lyo;
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 ay_
Ldfi;ay_()Lsd;
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 l
Ldfy;l()Lib;
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 m
Ldfy;m()Ldfy$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
Ldfy;a(Lclo;)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 w
Ldfy;w()Lclo;
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
Ldfy;a(Ldfy$a;)Lclo;
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;
-
method_54869
- Specified by:
method_54869
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official aA_
Lbji;aA_()Lagm;
intermediary method_54869
Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/class_2960;
named method_54869
Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/util/Identifier;
-
setLootTable
- Specified by:
setLootTable
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official a
Lbji;a(Lagm;)V
intermediary method_11285
Lnet/minecraft/class_8934;method_11285(Lnet/minecraft/class_2960;)V
named setLootTable
Lnet/minecraft/class_8934;setLootTable(Lnet/minecraft/util/Identifier;)V
-
method_54870
public long method_54870()- Specified by:
method_54870
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official aB_
Lbji;aB_()J
intermediary method_54870
Lnet/minecraft/class_8934;method_54870()J
named method_54870
Lnet/minecraft/class_8934;method_54870()J
-
method_54866
public void method_54866(long long2) - Specified by:
method_54866
in interfaceclass_8934
- Mappings:
Namespace Name Mixin selector official a
Lbji;a(J)V
intermediary method_54866
Lnet/minecraft/class_8934;method_54866(J)V
named method_54866
Lnet/minecraft/class_8934;method_54866(J)V
-
getStack
- Specified by:
getStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector official x
Lelf;x()Lclo;
intermediary method_54079
Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;
named getStack
Lnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;
-
decreaseStack
- Specified by:
decreaseStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector official c
Lelf;c(I)Lclo;
intermediary method_54078
Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;
named decreaseStack
Lnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
- Specified by:
setStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector official b
Lelf;b(Lclo;)V
intermediary method_54077
Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)V
named setStack
Lnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)V
-
asBlockEntity
- Specified by:
asBlockEntity
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector official y
Lelf;y()Ldfi;
intermediary method_54080
Lnet/minecraft/class_8181;method_54080()Lnet/minecraft/class_2586;
named asBlockEntity
Lnet/minecraft/inventory/SingleStackInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;
-
wobble
- Mappings:
Namespace Name Mixin selector official a
Ldfy;a(Ldfy$b;)V
intermediary method_54301
Lnet/minecraft/class_8172;method_54301(Lnet/minecraft/class_8172$class_8837;)V
named wobble
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;wobble(Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;)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)
.- Overrides:
onSyncedBlockEvent
in classBlockEntity
- See Also:
- Mappings:
Namespace Name Mixin selector official a_
Ldfi;a_(II)Z
intermediary method_11004
Lnet/minecraft/class_2586;method_11004(II)Z
named onSyncedBlockEvent
Lnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
-