Class DecoratedPotBlockEntity
- All Implemented Interfaces:
Inventory,LootableInventory,SingleStackInventory,SingleStackInventory.SingleStackBlockEntityInventory,Clearable
- Mappings:
Namespace Name official docintermediary net/minecraft/class_8172named net/minecraft/block/entity/DecoratedPotBlockEntity
-
Nested Class Summary
Nested ClassesNested 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 TypeMethodDescriptionvoidaddComponents(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).voidreadComponents(ComponentMap components) voidvoidreadNbt(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, createComponentMap, createFromNbt, createNbt, createNbtWithId, createNbtWithIdentifyingData, getCachedState, getPos, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, populateCrashReport, posFromNbt, setCachedState, setStackNbt, setWorld, 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 official dLdoc;d:Ljava/lang/String;intermediary field_42782Lnet/minecraft/class_8172;field_42782:Ljava/lang/String;named SHERDS_NBT_KEYLnet/minecraft/block/entity/DecoratedPotBlockEntity;SHERDS_NBT_KEY:Ljava/lang/String;
-
ITEM_NBT_KEY
- See Also:
- Mappings:
Namespace Name Mixin selector official eLdoc;e:Ljava/lang/String;intermediary field_46659Lnet/minecraft/class_8172;field_46659:Ljava/lang/String;named ITEM_NBT_KEYLnet/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 fLdoc;f:Iintermediary field_46660Lnet/minecraft/class_8172;field_46660:Inamed field_46660Lnet/minecraft/block/entity/DecoratedPotBlockEntity;field_46660:I
-
lastWobbleTime
public long lastWobbleTime- Mappings:
Namespace Name Mixin selector official gLdoc;g:Jintermediary field_46661Lnet/minecraft/class_8172;field_46661:Jnamed lastWobbleTimeLnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleTime:J
-
lastWobbleType
- Mappings:
Namespace Name Mixin selector official hLdoc;h:Ldoc$a;intermediary field_46662Lnet/minecraft/class_8172;field_46662:Lnet/minecraft/class_8172$class_8837;named lastWobbleTypeLnet/minecraft/block/entity/DecoratedPotBlockEntity;lastWobbleType:Lnet/minecraft/block/entity/DecoratedPotBlockEntity$WobbleType;
-
sherds
- Mappings:
Namespace Name Mixin selector official kLdoc;k:Ldoq;intermediary field_44706Lnet/minecraft/class_8172;field_44706:Lnet/minecraft/class_8526;named sherdsLnet/minecraft/block/entity/DecoratedPotBlockEntity;sherds:Lnet/minecraft/block/entity/Sherds;
-
stack
- Mappings:
Namespace Name Mixin selector official lLdoc;l:Lcsz;intermediary field_46663Lnet/minecraft/class_8172;field_46663:Lnet/minecraft/class_1799;named stackLnet/minecraft/block/entity/DecoratedPotBlockEntity;stack:Lnet/minecraft/item/ItemStack;
-
lootTableId
- Mappings:
Namespace Name Mixin selector official iLdoc;i:Lakg;intermediary field_47156Lnet/minecraft/class_8172;field_47156:Lnet/minecraft/class_5321;named lootTableIdLnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableId:Lnet/minecraft/registry/RegistryKey;
-
lootTableSeed
protected long lootTableSeed- Mappings:
Namespace Name Mixin selector official jLdoc;j:Jintermediary field_47157Lnet/minecraft/class_8172;field_47157:Jnamed lootTableSeedLnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableSeed:J
-
-
Constructor Details
-
DecoratedPotBlockEntity
- Mappings:
Namespace Name Mixin selector official <init>Ldoc;<init>(Lin;Ldqh;)Vintermediary <init>Lnet/minecraft/class_8172;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)Vnamed <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:
writeNbtin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official bLdnm;b(Lua;Liy$a;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed writeNbtLnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)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 aLdnm;a(Lua;Liy$a;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)Vnamed readNbtLnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)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 official jLdoc;j()Labt;intermediary method_49200Lnet/minecraft/class_8172;method_49200()Lnet/minecraft/class_2622;named toUpdatePacketLnet/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(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 official aLdnm;a(Liy$a;)Lua;intermediary method_16887Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;named toInitialChunkDataNbtLnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
-
getHorizontalFacing
- Mappings:
Namespace Name Mixin selector official kLdoc;k()Lis;intermediary method_49204Lnet/minecraft/class_8172;method_49204()Lnet/minecraft/class_2350;named getHorizontalFacingLnet/minecraft/block/entity/DecoratedPotBlockEntity;getHorizontalFacing()Lnet/minecraft/util/math/Direction;
-
getSherds
- Mappings:
Namespace Name Mixin selector official lLdoc;l()Ldoq;intermediary method_51511Lnet/minecraft/class_8172;method_51511()Lnet/minecraft/class_8526;named getSherdsLnet/minecraft/block/entity/DecoratedPotBlockEntity;getSherds()Lnet/minecraft/block/entity/Sherds;
-
readFrom
- Mappings:
Namespace Name Mixin selector official cLdoc;c(Lcsz;)Vintermediary method_49196Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/class_1799;)Vnamed readFromLnet/minecraft/block/entity/DecoratedPotBlockEntity;readFrom(Lnet/minecraft/item/ItemStack;)V
-
asStack
- Mappings:
Namespace Name Mixin selector official tLdoc;t()Lcsz;intermediary method_52578Lnet/minecraft/class_8172;method_52578()Lnet/minecraft/class_1799;named asStackLnet/minecraft/block/entity/DecoratedPotBlockEntity;asStack()Lnet/minecraft/item/ItemStack;
-
getStackWith
- Mappings:
Namespace Name Mixin selector official aLdoc;a(Ldoq;)Lcsz;intermediary method_52577Lnet/minecraft/class_8172;method_52577(Lnet/minecraft/class_8526;)Lnet/minecraft/class_1799;named getStackWithLnet/minecraft/block/entity/DecoratedPotBlockEntity;getStackWith(Lnet/minecraft/block/entity/Sherds;)Lnet/minecraft/item/ItemStack;
-
getLootTable
- Specified by:
getLootTablein interfaceLootableInventory- Mappings:
Namespace Name Mixin selector official ax_Lbpu;ax_()Lakg;intermediary method_54869Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/class_5321;named getLootTableLnet/minecraft/inventory/LootableInventory;getLootTable()Lnet/minecraft/registry/RegistryKey;
-
setLootTable
- Specified by:
setLootTablein interfaceLootableInventory- Mappings:
Namespace Name Mixin selector official aLbpu;a(Lakg;)Vintermediary method_11285Lnet/minecraft/class_8934;method_11285(Lnet/minecraft/class_5321;)Vnamed setLootTableLnet/minecraft/inventory/LootableInventory;setLootTable(Lnet/minecraft/registry/RegistryKey;)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 official ay_Lbpu;ay_()Jintermediary method_54870Lnet/minecraft/class_8934;method_54870()Jnamed getLootTableSeedLnet/minecraft/inventory/LootableInventory;getLootTableSeed()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 official aLbpu;a(J)Vintermediary method_54866Lnet/minecraft/class_8934;method_54866(J)Vnamed setLootTableSeedLnet/minecraft/inventory/LootableInventory;setLootTableSeed(J)V
-
addComponents
- Overrides:
addComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector official aLdnm;a(Ljw$a;)Vintermediary method_57567Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)Vnamed addComponentsLnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
-
readComponents
- Overrides:
readComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector official aLdnm;a(Ljw;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9323;)Vnamed readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentMap;)V
-
removeFromCopiedStackNbt
- Overrides:
removeFromCopiedStackNbtin classBlockEntity- Mappings:
Namespace Name Mixin selector official aLdnm;a(Lua;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)Vnamed removeFromCopiedStackNbtLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
-
getStack
- Specified by:
getStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector official fLeva;f()Lcsz;intermediary method_54079Lnet/minecraft/class_8181;method_54079()Lnet/minecraft/class_1799;named getStackLnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;
-
decreaseStack
- Specified by:
decreaseStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector official cLeva;c(I)Lcsz;intermediary method_54078Lnet/minecraft/class_8181;method_54078(I)Lnet/minecraft/class_1799;named decreaseStackLnet/minecraft/inventory/SingleStackInventory;decreaseStack(I)Lnet/minecraft/item/ItemStack;
-
setStack
- Specified by:
setStackin interfaceSingleStackInventory- Mappings:
Namespace Name Mixin selector official bLeva;b(Lcsz;)Vintermediary method_54077Lnet/minecraft/class_8181;method_54077(Lnet/minecraft/class_1799;)Vnamed setStackLnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)V
-
asBlockEntity
- Specified by:
asBlockEntityin interfaceSingleStackInventory.SingleStackBlockEntityInventory- Mappings:
Namespace Name Mixin selector official uLeva$a;u()Ldnm;intermediary method_54080Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;named asBlockEntityLnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;
-
wobble
- Mappings:
Namespace Name Mixin selector official aLdoc;a(Ldoc$a;)Vintermediary method_54301Lnet/minecraft/class_8172;method_54301(Lnet/minecraft/class_8172$class_8837;)Vnamed wobbleLnet/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:
onSyncedBlockEventin classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector official a_Ldnm;a_(II)Zintermediary method_11004Lnet/minecraft/class_2586;method_11004(II)Znamed onSyncedBlockEventLnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z
-