Class DecoratedPotBlockEntity
- All Implemented Interfaces:
Inventory
,LootableInventory
,SingleStackInventory
,SingleStackInventory.SingleStackBlockEntityInventory
,Clearable
- Mappings:
Namespace Name named net/minecraft/block/entity/DecoratedPotBlockEntity
intermediary net/minecraft/class_8172
official dqv
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccess
Nested classes/interfaces inherited from interface net.minecraft.inventory.SingleStackInventory
SingleStackInventory.SingleStackBlockEntityInventory
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
long
protected @Nullable RegistryKey
<LootTable> protected long
private Sherds
static final String
private ItemStack
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
Fields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGE
Fields inherited from interface net.minecraft.inventory.LootableInventory
LOOT_TABLE_KEY, LOOT_TABLE_SEED_KEY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addComponents
(ComponentMap.Builder componentMapBuilder) asStack()
decreaseStack
(int count) long
Returns the loot table's seed.getStack()
static ItemStack
getStackWith
(Sherds sherds) 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)
.protected void
readComponents
(BlockEntity.ComponentsAccess components) void
protected void
readNbt
(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt
.void
void
setLootTable
(@Nullable RegistryKey<LootTable> lootTable) void
setLootTableSeed
(long lootTableSeed) Sets the loot table's seed.void
toInitialChunkDataNbt
(RegistryWrapper.WrapperLookup registryLookup) 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, RegistryWrapper.WrapperLookup registryLookup) Writes data tonbt
.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createComponentlessNbt, createComponentlessNbtWithIdentifyingData, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getComponents, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, populateCrashReport, posFromNbt, read, readComponentlessNbt, readComponents, readComponents, setCachedState, setComponents, setStackNbt, setWorld, tryParseCustomName, 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.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, isValid, markDirty, onClose, onOpen
Methods inherited from interface net.minecraft.inventory.LootableInventory
generateLoot, getPos, getWorld, readLootTable, setLootTable, writeLootTable
Methods inherited from interface net.minecraft.inventory.SingleStackInventory
clear, emptyStack, getStack, isEmpty, removeStack, removeStack, setStack, size
Methods inherited from interface net.minecraft.inventory.SingleStackInventory.SingleStackBlockEntityInventory
canPlayerUse
-
Field Details
-
SHERDS_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named SHERDS_NBT_KEY
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;SHERDS_NBT_KEY:Ljava/lang/String;
intermediary field_42782
Lnet/minecraft/class_8172;field_42782:Ljava/lang/String;
official d
Ldqv;d:Ljava/lang/String;
-
ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named ITEM_NBT_KEY
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;ITEM_NBT_KEY:Ljava/lang/String;
intermediary field_46659
Lnet/minecraft/class_8172;field_46659:Ljava/lang/String;
official e
Ldqv;e:Ljava/lang/String;
-
field_46660
public static final int field_46660- See Also:
- Mappings:
Namespace Name Mixin selector named field_46660
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;field_46660:I
intermediary field_46660
Lnet/minecraft/class_8172;field_46660:I
official f
Ldqv;f:I
-
lastWobbleTime
public long lastWobbleTime- Mappings:
Namespace Name Mixin selector named lastWobbleTime
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleTime:J
intermediary field_46661
Lnet/minecraft/class_8172;field_46661:J
official g
Ldqv;g:J
-
lastWobbleType
- Mappings:
Namespace Name Mixin selector named lastWobbleType
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleType:Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;
intermediary field_46662
Lnet/minecraft/class_8172;field_46662:Lnet/minecraft/class_8172$class_8837;
official h
Ldqv;h:Ldqv$a;
-
sherds
- Mappings:
Namespace Name Mixin selector named sherds
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;sherds:Lnet/minecraft/block/entity/Sherds;
intermediary field_44706
Lnet/minecraft/class_8172;field_44706:Lnet/minecraft/class_8526;
official k
Ldqv;k:Ldrk;
-
stack
- Mappings:
Namespace Name Mixin selector named stack
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;stack:Lnet/minecraft/item/ItemStack;
intermediary field_46663
Lnet/minecraft/class_8172;field_46663:Lnet/minecraft/class_1799;
official l
Ldqv;l:Lcuo;
-
lootTableId
- Mappings:
Namespace Name Mixin selector named lootTableId
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableId:Lnet/minecraft/registry/RegistryKey;
intermediary field_47156
Lnet/minecraft/class_8172;field_47156:Lnet/minecraft/class_5321;
official i
Ldqv;i:Lakp;
-
lootTableSeed
protected long lootTableSeed- Mappings:
Namespace Name Mixin selector named lootTableSeed
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableSeed:J
intermediary field_47157
Lnet/minecraft/class_8172;field_47157:J
official j
Ldqv;j:J
-
-
Constructor Details
-
DecoratedPotBlockEntity
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
intermediary <init>
Lnet/minecraft/class_8172;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
official <init>
Ldqv;<init>(Ljd;Ldta;)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 named writeNbt
Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11007
Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official b
Ldqf;b(Lua;Ljo$a;)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 named readNbt
Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
intermediary method_11014
Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
official a
Ldqf;a(Lua;Ljo$a;)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, net.minecraft.registry.RegistryWrapper.WrapperLookup)
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 named toUpdatePacket
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
intermediary method_49200
Lnet/minecraft/class_8172;method_49200()Lnet/minecraft/class_2622;
official j
Ldqv;j()Laca;
-
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
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(net.minecraft.registry.RegistryWrapper.WrapperLookup)
.- Overrides:
toInitialChunkDataNbt
in classBlockEntity
- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector named toInitialChunkDataNbt
Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
intermediary method_16887
Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
official a
Ldqf;a(Ljo$a;)Lua;
-
getHorizontalFacing
- Mappings:
Namespace Name Mixin selector named getHorizontalFacing
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getHorizontalFacing()Lnet/minecraft/util/math/Direction;
intermediary method_49204
Lnet/minecraft/class_8172;method_49204()Lnet/minecraft/class_2350;
official k
Ldqv;k()Lji;
-
getSherds
- Mappings:
Namespace Name Mixin selector named getSherds
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getSherds()Lnet/minecraft/block/entity/Sherds;
intermediary method_51511
Lnet/minecraft/class_8172;method_51511()Lnet/minecraft/class_8526;
official l
Ldqv;l()Ldrk;
-
readFrom
- Mappings:
Namespace Name Mixin selector named readFrom
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;readFrom(Lnet/minecraft/item/ItemStack;)V
intermediary method_49196
Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/class_1799;)V
official c
Ldqv;c(Lcuo;)V
-
asStack
- Mappings:
Namespace Name Mixin selector named asStack
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;asStack()Lnet/minecraft/item/ItemStack;
intermediary method_52578
Lnet/minecraft/class_8172;method_52578()Lnet/minecraft/class_1799;
official u
Ldqv;u()Lcuo;
-
getStackWith
- Mappings:
Namespace Name Mixin selector named getStackWith
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getStackWith(Lnet/minecraft/block/entity/Sherds;)Lnet/minecraft/item/ItemStack;
intermediary method_52577
Lnet/minecraft/class_8172;method_52577(Lnet/minecraft/class_8526;)Lnet/minecraft/class_1799;
official a
Ldqv;a(Ldrk;)Lcuo;
-
getLootTable
- Specified by:
getLootTable
in interfaceLootableInventory
- Mappings:
Namespace Name Mixin selector named getLootTable
Lnet/minecraft/inventory/LootableInventory;getLootTable()Lnet/minecraft/registry/RegistryKey;
intermediary method_54869
Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/class_5321;
official ax_
Lbqy;ax_()Lakp;
-
setLootTable
- Specified by:
setLootTable
in interfaceLootableInventory
- Mappings:
Namespace Name Mixin selector named setLootTable
Lnet/minecraft/inventory/LootableInventory;setLootTable(Lnet/minecraft/registry/RegistryKey;)V
intermediary method_11285
Lnet/minecraft/class_8934;method_11285(Lnet/minecraft/class_5321;)V
official a
Lbqy;a(Lakp;)V
-
getLootTableSeed
public long getLootTableSeed()Returns the loot table's seed.Vanilla implementations return
0
when there is no loot table associated with the inventory, although it is not necessary.This is usually stored under the "LootTableSeed" NBT key.
- Specified by:
getLootTableSeed
in interfaceLootableInventory
- Returns:
- the loot table's seed
- Mappings:
Namespace Name Mixin selector named getLootTableSeed
Lnet/minecraft/inventory/LootableInventory;getLootTableSeed()J
intermediary method_54870
Lnet/minecraft/class_8934;method_54870()J
official ay_
Lbqy;ay_()J
-
setLootTableSeed
public void setLootTableSeed(long lootTableSeed) Sets the loot table's seed.Vanilla implementations return
0
when there is no loot table associated with the inventory, although it is not necessary.This is usually stored under the "LootTableSeed" NBT key.
- Specified by:
setLootTableSeed
in interfaceLootableInventory
- Mappings:
Namespace Name Mixin selector named setLootTableSeed
Lnet/minecraft/inventory/LootableInventory;setLootTableSeed(J)V
intermediary method_54866
Lnet/minecraft/class_8934;method_54866(J)V
official a
Lbqy;a(J)V
-
addComponents
- Overrides:
addComponents
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named addComponents
Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
intermediary method_57567
Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
official a
Ldqf;a(Lkm$a;)V
-
readComponents
- Overrides:
readComponents
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named readComponents
Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;)V
intermediary method_57568
Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_2586$class_9473;)V
official a
Ldqf;a(Ldqf$b;)V
-
removeFromCopiedStackNbt
- Overrides:
removeFromCopiedStackNbt
in classBlockEntity
- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackNbt
Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
intermediary method_57569
Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)V
official a
Ldqf;a(Lua;)V
-
getStack
- Specified by:
getStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector named getStack
Lnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;
intermediary method_54079
Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;
official f
Leyh;f()Lcuo;
-
decreaseStack
- Specified by:
decreaseStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector named decreaseStack
Lnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;
intermediary method_54078
Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;
official c
Leyh;c(I)Lcuo;
-
setStack
- Specified by:
setStack
in interfaceSingleStackInventory
- Mappings:
Namespace Name Mixin selector named setStack
Lnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)V
intermediary method_54077
Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)V
official b
Leyh;b(Lcuo;)V
-
asBlockEntity
- Specified by:
asBlockEntity
in interfaceSingleStackInventory.SingleStackBlockEntityInventory
- Mappings:
Namespace Name Mixin selector named asBlockEntity
Lnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;
intermediary method_54080
Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;
official v
Leyh$a;v()Ldqf;
-
wobble
- Mappings:
Namespace Name Mixin selector named wobble
Lnet/minecraft/block/entity/DecoratedPotBlockEntity;wobble(Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;)V
intermediary method_54301
Lnet/minecraft/class_8172;method_54301(Lnet/minecraft/class_8172$class_8837;)V
official a
Ldqv;a(Ldqv$a;)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 named onSyncedBlockEvent
Lnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
intermediary method_11004
Lnet/minecraft/class_2586;method_11004(II)Z
official a_
Ldqf;a_(II)Z
-