Class DecoratedPotBlockEntity
- All Implemented Interfaces:
Iterable<ItemStack>,Inventory,LootableInventory,SingleStackInventory,SingleStackInventory.SingleStackBlockEntityInventory,Clearable,DebugTrackable
- Mappings:
Namespace Name named net/minecraft/block/entity/DecoratedPotBlockEntityintermediary net/minecraft/class_8172official egz
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.world.debug.DebugTrackable
DebugTrackable.DebugDataSupplier<T>, DebugTrackable.TrackerNested classes/interfaces inherited from interface net.minecraft.inventory.Inventory
Inventory.IteratorNested 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 builder) 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(ComponentsAccess components) protected voidReads data fromnbt.voidvoidsetLootTable(@Nullable RegistryKey<LootTable> lootTable) voidsetLootTableSeed(long lootTableSeed) Sets the loot table's seed.voidtoInitialChunkDataNbt(RegistryWrapper.WrapperLookup registries) 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 voidWrites data tonbt.Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, createComponentlessNbt, createComponentMap, createFromNbt, createNbt, createNbtWithIdentifyingData, getCachedState, getComponents, getNameForReport, getPos, getReporterContext, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onBlockReplaced, populateCrashReport, posFromNbt, read, readComponentlessData, readComponents, readComponents, registerTracking, setCachedState, setComponents, setWorld, supports, tryParseCustomName, writeComponentlessData, writeDataWithId, writeDataWithoutId, writeFullData, writeIdMethods 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, getViewingUsers, isValid, iterator, markDirty, onClose, onOpenMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods 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 dLegz;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 eLegz;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 fLegz;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 gLegz;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 hLegz;h:Legz$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 kLegz;k:Lehq;
-
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 lLegz;l:Ldhp;
-
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 iLegz;i:Lami;
-
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 jLegz;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>Legz;<init>(Lja;Lejm;)V
-
-
Method Details
-
writeData
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:
writeDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named writeDataLnet/minecraft/block/entity/BlockEntity;writeData(Lnet/minecraft/storage/WriteView;)Vintermediary method_11007Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_11372;)Vofficial aLegg;a(Lfir;)V
-
readData
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:
readDatain classBlockEntity- See Also:
- Mappings:
Namespace Name Mixin selector named readDataLnet/minecraft/block/entity/BlockEntity;readData(Lnet/minecraft/storage/ReadView;)Vintermediary method_11014Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_11368;)Vofficial aLegg;a(Lfip;)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 toon the client.invalid reference
#readNbt"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 kLegz;k()Lacx;
-
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 aLegg;a(Ljm$a;)Lup;
-
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 lLegz;l()Ljg;
-
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 mLegz;m()Lehq;
-
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 aLegz;a(Lehq;)Ldhp;
-
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 az_Lcbx;az_()Lami;
-
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 aLcbx;a(Lami;)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_Lcbx;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 aLcbx;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 aLegg;a(Lkm$a;)V
-
readComponents
- Overrides:
readComponentsin classBlockEntity- Mappings:
Namespace Name Mixin selector named readComponentsLnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57568Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9473;)Vofficial aLegg;a(Lkk;)V
-
removeFromCopiedStackData
- Overrides:
removeFromCopiedStackDatain classBlockEntity- Mappings:
Namespace Name Mixin selector named removeFromCopiedStackDataLnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackData(Lnet/minecraft/storage/WriteView;)Vintermediary method_57569Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_11372;)Vofficial bLegg;b(Lfir;)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 gLfpu;g()Ldhp;
-
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 cLfpu;c(I)Ldhp;
-
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 bLfpu;b(Ldhp;)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 wLfpu$a;w()Legg;
-
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 aLegz;a(Legz$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_Legg;a_(II)Z
-