Class DecoratedPotBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.DecoratedPotBlockEntity
All Implemented Interfaces:
Inventory, LootableInventory, SingleStackInventory, SingleStackInventory.SingleStackBlockEntityInventory, Clearable

public class DecoratedPotBlockEntity extends BlockEntity implements LootableInventory, SingleStackInventory.SingleStackBlockEntityInventory
Mappings:
Namespace Name
official doc
intermediary net/minecraft/class_8172
named net/minecraft/block/entity/DecoratedPotBlockEntity
  • Field Details

    • SHERDS_NBT_KEY

      public static final String SHERDS_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Ldoc;d: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

      public static final String ITEM_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official e Ldoc;e: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 f Ldoc;f: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 g Ldoc;g: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 h Ldoc;h:Ldoc$a;
      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

      private Sherds sherds
      Mappings:
      Namespace Name Mixin selector
      official k Ldoc;k:Ldoq;
      intermediary field_44706 Lnet/minecraft/class_8172;field_44706:Lnet/minecraft/class_8526;
      named sherds Lnet/minecraft/block/entity/DecoratedPotBlockEntity;sherds:Lnet/minecraft/block/entity/Sherds;
    • stack

      private ItemStack stack
      Mappings:
      Namespace Name Mixin selector
      official l Ldoc;l:Lcsz;
      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;
    • lootTableId

      @Nullable protected @Nullable RegistryKey<LootTable> lootTableId
      Mappings:
      Namespace Name Mixin selector
      official i Ldoc;i:Lakg;
      intermediary field_47156 Lnet/minecraft/class_8172;field_47156:Lnet/minecraft/class_5321;
      named lootTableId Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableId:Lnet/minecraft/registry/RegistryKey;
    • lootTableSeed

      protected long lootTableSeed
      Mappings:
      Namespace Name Mixin selector
      official j Ldoc;j:J
      intermediary field_47157 Lnet/minecraft/class_8172;field_47157:J
      named lootTableSeed Lnet/minecraft/block/entity/DecoratedPotBlockEntity;lootTableSeed:J
  • Constructor Details

    • DecoratedPotBlockEntity

      public DecoratedPotBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldoc;<init>(Lin;Ldqh;)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

      protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup)
      Writes data to nbt. 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 class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Ldnm;b(Lua;Liy$a;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
      named writeNbt Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
    • readNbt

      public void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup)
      Reads data from nbt. 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 class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldnm;a(Lua;Liy$a;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
      named readNbt Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
    • toUpdatePacket

      public BlockEntityUpdateS2CPacket toUpdatePacket()
      Description copied from class: BlockEntity
      Returns the packet to send to nearby players when the block entity's observable state changes, or null 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 to BlockEntity.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 class BlockEntity
      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 j Ldoc;j()Labt;
      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

      public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registryLookup)
      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 default BlockEntityUpdateS2CPacket.

      "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 class BlockEntity
      Returns:
      the serialized state of this block entity that is observable by clients
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Ldnm;a(Liy$a;)Lua;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
    • getHorizontalFacing

      public Direction getHorizontalFacing()
      Mappings:
      Namespace Name Mixin selector
      official k Ldoc;k()Lis;
      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

      public Sherds getSherds()
      Mappings:
      Namespace Name Mixin selector
      official l Ldoc;l()Ldoq;
      intermediary method_51511 Lnet/minecraft/class_8172;method_51511()Lnet/minecraft/class_8526;
      named getSherds Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getSherds()Lnet/minecraft/block/entity/Sherds;
    • readFrom

      public void readFrom(ItemStack stack)
      Mappings:
      Namespace Name Mixin selector
      official c Ldoc;c(Lcsz;)V
      intermediary method_49196 Lnet/minecraft/class_8172;method_49196(Lnet/minecraft/class_1799;)V
      named readFrom Lnet/minecraft/block/entity/DecoratedPotBlockEntity;readFrom(Lnet/minecraft/item/ItemStack;)V
    • asStack

      public ItemStack asStack()
      Mappings:
      Namespace Name Mixin selector
      official t Ldoc;t()Lcsz;
      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

      public static ItemStack getStackWith(Sherds sherds)
      Mappings:
      Namespace Name Mixin selector
      official a Ldoc;a(Ldoq;)Lcsz;
      intermediary method_52577 Lnet/minecraft/class_8172;method_52577(Lnet/minecraft/class_8526;)Lnet/minecraft/class_1799;
      named getStackWith Lnet/minecraft/block/entity/DecoratedPotBlockEntity;getStackWith(Lnet/minecraft/block/entity/Sherds;)Lnet/minecraft/item/ItemStack;
    • getLootTable

      @Nullable public @Nullable RegistryKey<LootTable> getLootTable()
      Specified by:
      getLootTable in interface LootableInventory
      Mappings:
      Namespace Name Mixin selector
      official ax_ Lbpu;ax_()Lakg;
      intermediary method_54869 Lnet/minecraft/class_8934;method_54869()Lnet/minecraft/class_5321;
      named getLootTable Lnet/minecraft/inventory/LootableInventory;getLootTable()Lnet/minecraft/registry/RegistryKey;
    • setLootTable

      public void setLootTable(@Nullable @Nullable RegistryKey<LootTable> lootTable)
      Specified by:
      setLootTable in interface LootableInventory
      Mappings:
      Namespace Name Mixin selector
      official a Lbpu;a(Lakg;)V
      intermediary method_11285 Lnet/minecraft/class_8934;method_11285(Lnet/minecraft/class_5321;)V
      named setLootTable Lnet/minecraft/inventory/LootableInventory;setLootTable(Lnet/minecraft/registry/RegistryKey;)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 interface LootableInventory
      Returns:
      the loot table's seed
      Mappings:
      Namespace Name Mixin selector
      official ay_ Lbpu;ay_()J
      intermediary method_54870 Lnet/minecraft/class_8934;method_54870()J
      named getLootTableSeed Lnet/minecraft/inventory/LootableInventory;getLootTableSeed()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 interface LootableInventory
      Mappings:
      Namespace Name Mixin selector
      official a Lbpu;a(J)V
      intermediary method_54866 Lnet/minecraft/class_8934;method_54866(J)V
      named setLootTableSeed Lnet/minecraft/inventory/LootableInventory;setLootTableSeed(J)V
    • addComponents

      public void addComponents(ComponentMap.Builder componentMapBuilder)
      Overrides:
      addComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      official a Ldnm;a(Ljw$a;)V
      intermediary method_57567 Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
      named addComponents Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
    • readComponents

      public void readComponents(ComponentMap components)
      Overrides:
      readComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      official a Ldnm;a(Ljw;)V
      intermediary method_57568 Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_9323;)V
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/component/ComponentMap;)V
    • removeFromCopiedStackNbt

      public void removeFromCopiedStackNbt(NbtCompound nbt)
      Overrides:
      removeFromCopiedStackNbt in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      official a Ldnm;a(Lua;)V
      intermediary method_57569 Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)V
      named removeFromCopiedStackNbt Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
    • getStack

      public ItemStack getStack()
      Specified by:
      getStack in interface SingleStackInventory
      Mappings:
      Namespace Name Mixin selector
      official f Leva;f()Lcsz;
      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

      public ItemStack decreaseStack(int count)
      Specified by:
      decreaseStack in interface SingleStackInventory
      Mappings:
      Namespace Name Mixin selector
      official c Leva;c(I)Lcsz;
      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

      public void setStack(ItemStack stack)
      Specified by:
      setStack in interface SingleStackInventory
      Mappings:
      Namespace Name Mixin selector
      official b Leva;b(Lcsz;)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

      public BlockEntity asBlockEntity()
      Specified by:
      asBlockEntity in interface SingleStackInventory.SingleStackBlockEntityInventory
      Mappings:
      Namespace Name Mixin selector
      official u Leva$a;u()Ldnm;
      intermediary method_54080 Lnet/minecraft/class_8181$class_9210;method_54080()Lnet/minecraft/class_2586;
      named asBlockEntity Lnet/minecraft/inventory/SingleStackInventory$SingleStackBlockEntityInventory;asBlockEntity()Lnet/minecraft/block/entity/BlockEntity;
    • wobble

      public void wobble(DecoratedPotBlockEntity.WobbleType wobbleType)
      Mappings:
      Namespace Name Mixin selector
      official a Ldoc;a(Ldoc$a;)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)
      Overrides:
      onSyncedBlockEvent in class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a_ Ldnm;a_(II)Z
      intermediary method_11004 Lnet/minecraft/class_2586;method_11004(II)Z
      named onSyncedBlockEvent Lnet/minecraft/block/entity/BlockEntity;onSyncedBlockEvent(II)Z