Class DecoratedPotBlockEntity
- All Implemented Interfaces:
Inventory,LootableInventory,SingleStackInventory,SingleStackInventory.SingleStackBlockEntityInventory,Clearable
- Mappings:
Namespace Name named net/minecraft/block/entity/DecoratedPotBlockEntityintermediary net/minecraft/class_8172official dqx
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.block.entity.BlockEntity
BlockEntity.ComponentsAccessNested classes/interfaces inherited from interface net.minecraft.inventory.SingleStackInventory
SingleStackInventory.SingleStackBlockEntityInventory -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringlongprotected @Nullable RegistryKey<LootTable> protected longprivate Sherdsstatic final Stringprivate ItemStackFields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, worldFields inherited from interface net.minecraft.inventory.Inventory
DEFAULT_MAX_INTERACTION_RANGEFields inherited from interface net.minecraft.inventory.LootableInventory
LOOT_TABLE_KEY, LOOT_TABLE_SEED_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddComponents(ComponentMap.Builder componentMapBuilder) asStack()decreaseStack(int count) longReturns the loot table's seed.getStack()static ItemStackgetStackWith(Sherds sherds) booleanonSyncedBlockEvent(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 voidreadComponents(BlockEntity.ComponentsAccess components) voidprotected voidreadNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) Reads data fromnbt.voidvoidsetLootTable(@Nullable RegistryKey<LootTable> lootTable) voidsetLootTableSeed(long lootTableSeed) Sets the loot table's seed.voidtoInitialChunkDataNbt(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, ornullto not send the packet.voidwobble(DecoratedPotBlockEntity.WobbleType wobbleType) protected voidwriteNbt(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, writeIdToNbtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.inventory.Inventory
canTransferTo, containsAny, containsAny, count, getMaxCount, getMaxCountPerStack, isValid, markDirty, onClose, onOpenMethods inherited from interface net.minecraft.inventory.LootableInventory
generateLoot, getPos, getWorld, readLootTable, setLootTable, writeLootTableMethods inherited from interface net.minecraft.inventory.SingleStackInventory
clear, emptyStack, getStack, isEmpty, removeStack, removeStack, setStack, sizeMethods inherited from interface net.minecraft.inventory.SingleStackInventory.SingleStackBlockEntityInventory
canPlayerUse
-
Field Details
-
SHERDS_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named SHERDS_NBT_KEYLnet/minecraft/block/entity/DecoratedPotBlockEntity;SHERDS_NBT_KEY:Ljava/lang/String;intermediary field_42782Lnet/minecraft/class_8172;field_42782:Ljava/lang/String;official dLdqx;d:Ljava/lang/String;
-
ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector named ITEM_NBT_KEYLnet/minecraft/block/entity/DecoratedPotBlockEntity;ITEM_NBT_KEY:Ljava/lang/String;intermediary field_46659Lnet/minecraft/class_8172;field_46659:Ljava/lang/String;official eLdqx;e:Ljava/lang/String;
-
field_46660
public static final int field_46660- See Also:
- Mappings:
Namespace Name Mixin selector named field_46660Lnet/minecraft/block/entity/DecoratedPotBlockEntity;field_46660:Iintermediary field_46660Lnet/minecraft/class_8172;field_46660:Iofficial fLdqx;f:I
-
lastWobbleTime
public long lastWobbleTime- Mappings:
Namespace Name Mixin selector named lastWobbleTimeLnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleTime:Jintermediary field_46661Lnet/minecraft/class_8172;field_46661:Jofficial gLdqx;g:J
-
lastWobbleType
- Mappings:
Namespace Name Mixin selector named lastWobbleTypeLnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleType:Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;intermediary field_46662Lnet/minecraft/class_8172;field_46662:Lnet/minecraft/class_8172$class_8837;official hLdqx;h:Ldqx$a;
-
sherds
- Mappings:
Namespace Name Mixin selector named sherdsLnet/minecraft/block/entity/DecoratedPotBlockEntity;sherds:Lnet/minecraft/block/entity/Sherds;intermediary field_44706Lnet/minecraft/class_8172;field_44706:Lnet/minecraft/class_8526;official kLdqx;k:Ldrm;
-
stack
- Mappings:
Namespace Name Mixin selector named stackLnet/minecraft/block/entity/DecoratedPotBlockEntity;stack:Lnet/minecraft/item/ItemStack;intermediary field_46663Lnet/minecraft/class_8172;field_46663:Lnet/minecraft/class_1799;official lLdqx;l:Lcuq;
-
lootTableId
- Mappings:
Namespace Name Mixin selector named lootTableIdLnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableId:Lnet/minecraft/registry/RegistryKey;intermediary field_47156Lnet/minecraft/class_8172;field_47156:Lnet/minecraft/class_5321;official iLdqx;i:Lakq;
-
lootTableSeed
protected long lootTableSeed- Mappings:
Namespace Name Mixin selector named lootTableSeedLnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableSeed:Jintermediary field_47157Lnet/minecraft/class_8172;field_47157:Jofficial jLdqx;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;)Vintermediary <init>Lnet/minecraft/class_8172;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vofficial <init>Ldqx;<init>(Ljd;Ldtc;)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:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial bLdqh;b(Lub;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.
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 named readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vofficial aLdqh;a(Lub;Ljo$a;)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, 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:
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 named toUpdatePacketLnet/minecraft/block/entity/DecoratedPotBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;intermediary method_49200Lnet/minecraft/class_8172;method_49200()Lnet/minecraft/class_2622;official jLdqx;j()Lacb;
-
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:
toInitialChunkDataNbtin classBlockEntity- Returns:
- the serialized state of this block entity that is observable by clients
- See Also:
- Mappings:
Namespace Name Mixin selector named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;official aLdqh;a(Ljo$a;)Lub;
-
getHorizontalFacing
- Mappings:
Namespace Name Mixin selector named getHorizontalFacingLnet/minecraft/block/entity/DecoratedPotBlockEntity;getHorizontalFacing()Lnet/minecraft/util/math/Direction;intermediary method_49204Lnet/minecraft/class_8172;method_49204()Lnet/minecraft/class_2350;official kLdqx;k()Lji;
-
getSherds
- Mappings:
Namespace Name Mixin selector named getSherdsLnet/minecraft/block/entity/DecoratedPotBlockEntity;getSherds()Lnet/minecraft/block/entity/Sherds;intermediary method_51511Lnet/minecraft/class_8172;method_51511()Lnet/minecraft/class_8526;official lLdqx;l()Ldrm;
-
readFrom
- Mappings:
Namespace Name Mixin selector named readFromLnet/minecraft/block/entity/DecoratedPotBlockEntity;readFrom(Lnet/minecraft/item/ItemStack;)Vintermediary method_49196Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/class_1799;)Vofficial cLdqx;c(Lcuq;)V
-
asStack
- Mappings:
Namespace Name Mixin selector named asStackLnet/minecraft/block/entity/DecoratedPotBlockEntity;asStack()Lnet/minecraft/item/ItemStack;intermediary method_52578Lnet/minecraft/class_8172;method_52578()Lnet/minecraft/class_1799;official uLdqx;u()Lcuq;
-
getStackWith
- Mappings:
Namespace Name Mixin selector named getStackWithLnet/minecraft/block/entity/DecoratedPotBlockEntity;getStackWith(Lnet/minecraft/block/entity/Sherds;)Lnet/minecraft/item/ItemStack;intermediary method_52577Lnet/minecraft/class_8172;method_52577(Lnet/minecraft/class_8526;)Lnet/minecraft/class_1799;official aLdqx;a(Ldrm;)Lcuq;
-
getLootTable
- Specified by:
getLootTablein interfaceLootableInventory- Mappings:
Namespace Name Mixin selector named getLootTableLnet/minecraft/inventory/LootableInventory;getLootTable()Lnet/minecraft/registry/RegistryKey;intermediary method_54869Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/class_5321;official aB_Lbqz;aB_()Lakq;
-
setLootTable
- Specified by:
setLootTablein interfaceLootableInventory- Mappings:
Namespace Name Mixin selector named setLootTableLnet/minecraft/inventory/LootableInventory;setLootTable(Lnet/minecraft/registry/RegistryKey;)Vintermediary method_11285Lnet/minecraft/class_8934;method_11285(Lnet/minecraft/class_5321;)Vofficial aLbqz;a(Lakq;)V
-
getLootTableSeed
public long getLootTableSeed()Returns the loot table's seed.Vanilla implementations return
0when 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:
getLootTableSeedin interfaceLootableInventory- Returns:
- the loot table's seed
- Mappings:
Namespace Name Mixin selector named getLootTableSeedLnet/minecraft/inventory/LootableInventory;getLootTableSeed()Jintermediary method_54870Lnet/minecraft/class_8934;method_54870()Jofficial aC_Lbqz;aC_()J
-
setLootTableSeed
public void setLootTableSeed(long lootTableSeed) Sets the loot table's seed.Vanilla implementations return
0when 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:
setLootTableSeedin interfaceLootableInventory- Mappings:
Namespace Name Mixin selector named setLootTableSeedLnet/minecraft/inventory/LootableInventory;setLootTableSeed(J)Vintermediary method_54866Lnet/minecraft/class_8934;method_54866(J)Vofficial aLbqz;a(J)V
-
addComponents
- Overrides:
addComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named addComponentsLnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)Vintermediary method_57567Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)Vofficial aLdqh;a(Lkm$a;)V
-
readComponents
- Overrides:
readComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_2586$class_9473;)Vofficial aLdqh;a(Ldqh$b;)V
-
removeFromCopiedStackNbt
- Overrides:
removeFromCopiedStackNbtin classBlockEntity- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackNbtLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)Vofficial aLdqh;a(Lub;)V
-
getStack
- Specified by:
getStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector named getStackLnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;intermediary method_54079Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;official fLeyn;f()Lcuq;
-
decreaseStack
- Specified by:
decreaseStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector named decreaseStackLnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;intermediary method_54078Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;official cLeyn;c(I)Lcuq;
-
setStack
- Specified by:
setStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector named setStackLnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)Vintermediary method_54077Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)Vofficial bLeyn;b(Lcuq;)V
-
asBlockEntity
- Specified by:
asBlockEntityin interfaceSingleStackInventory.SingleStackBlockEntityInventory- Mappings:
Namespace Name Mixin selector named asBlockEntityLnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;intermediary method_54080Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;official vLeyn$a;v()Ldqh;
-
wobble
- Mappings:
Namespace Name Mixin selector named wobbleLnet/minecraft/block/entity/DecoratedPotBlockEntity;wobble(Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;)Vintermediary method_54301Lnet/minecraft/class_8172;method_54301(Lnet/minecraft/class_8172$class_8837;)Vofficial aLdqx;a(Ldqx$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:
onSyncedBlockEventin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named onSyncedBlockEventLnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Zintermediary method_11004Lnet/minecraft/class_2586;method_11004(II)Zofficial a_Ldqh;a_(II)Z
-