Class LootableContainerBlockEntity

All Implemented Interfaces:
Inventory, LootableInventory, NamedScreenHandlerFactory, ScreenHandlerFactory, Clearable, Nameable
Direct Known Subclasses:
BarrelBlockEntity, ChestBlockEntity, CrafterBlockEntity, DispenserBlockEntity, HopperBlockEntity, ShulkerBoxBlockEntity

public abstract class LootableContainerBlockEntity extends LockableContainerBlockEntity implements LootableInventory
Mappings:
Namespace Name
named net/minecraft/block/entity/LootableContainerBlockEntity
intermediary net/minecraft/class_2621
official drn
  • Field Details

    • lootTable

      @Nullable protected @Nullable RegistryKey<LootTable> lootTable
      Mappings:
      Namespace Name Mixin selector
      named lootTable Lnet/minecraft/block/entity/LootableContainerBlockEntity;lootTable:Lnet/minecraft/registry/RegistryKey;
      intermediary field_12037 Lnet/minecraft/class_2621;field_12037:Lnet/minecraft/class_5321;
      official l Ldrn;l:Lakq;
    • lootTableSeed

      protected long lootTableSeed
      Mappings:
      Namespace Name Mixin selector
      named lootTableSeed Lnet/minecraft/block/entity/LootableContainerBlockEntity;lootTableSeed:J
      intermediary field_12036 Lnet/minecraft/class_2621;field_12036:J
      official m Ldrn;m:J
  • Constructor Details

    • LootableContainerBlockEntity

      protected LootableContainerBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/entity/BlockEntity;<init>(Lnet/minecraft/block/entity/BlockEntityType;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary <init> Lnet/minecraft/class_2586;<init>(Lnet/minecraft/class_2591;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official <init> Ldqh;<init>(Ldqj;Ljd;Ldtc;)V
  • Method Details

    • getLootTable

      @Nullable public @Nullable RegistryKey<LootTable> getLootTable()
      Specified by:
      getLootTable in interface LootableInventory
      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 aB_ Lbqz;aB_()Lakq;
    • setLootTable

      public void setLootTable(@Nullable @Nullable RegistryKey<LootTable> lootTable)
      Specified by:
      setLootTable in interface LootableInventory
      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 Lbqz;a(Lakq;)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
      named getLootTableSeed Lnet/minecraft/inventory/LootableInventory;getLootTableSeed()J
      intermediary method_54870 Lnet/minecraft/class_8934;method_54870()J
      official aC_ Lbqz;aC_()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
      named setLootTableSeed Lnet/minecraft/inventory/LootableInventory;setLootTableSeed(J)V
      intermediary method_54866 Lnet/minecraft/class_8934;method_54866(J)V
      official a Lbqz;a(J)V
    • isEmpty

      public boolean isEmpty()
      Returns whether the inventory consists entirely of empty item stacks.
      Specified by:
      isEmpty in interface Inventory
      Overrides:
      isEmpty in class LockableContainerBlockEntity
      Returns:
      whether the inventory consists entirely of empty item stacks
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/inventory/Inventory;isEmpty()Z
      intermediary method_5442 Lnet/minecraft/class_1263;method_5442()Z
      official c Lbqk;c()Z
    • getStack

      public ItemStack getStack(int slot)
      Returns the stack currently stored at slot.

      If the slot is empty, or is outside the bounds of this inventory, this returns ItemStack.EMPTY.

      Specified by:
      getStack in interface Inventory
      Overrides:
      getStack in class LockableContainerBlockEntity
      Returns:
      the stack currently stored at slot
      Mappings:
      Namespace Name Mixin selector
      named getStack Lnet/minecraft/inventory/Inventory;getStack(I)Lnet/minecraft/item/ItemStack;
      intermediary method_5438 Lnet/minecraft/class_1263;method_5438(I)Lnet/minecraft/class_1799;
      official a Lbqk;a(I)Lcuq;
    • removeStack

      public ItemStack removeStack(int slot, int amount)
      Removes a specific number of items from slot.
      Specified by:
      removeStack in interface Inventory
      Overrides:
      removeStack in class LockableContainerBlockEntity
      Returns:
      the removed items as a stack
      Mappings:
      Namespace Name Mixin selector
      named removeStack Lnet/minecraft/inventory/Inventory;removeStack(II)Lnet/minecraft/item/ItemStack;
      intermediary method_5434 Lnet/minecraft/class_1263;method_5434(II)Lnet/minecraft/class_1799;
      official a Lbqk;a(II)Lcuq;
    • removeStack

      public ItemStack removeStack(int slot)
      Removes the stack currently stored at slot.
      Specified by:
      removeStack in interface Inventory
      Overrides:
      removeStack in class LockableContainerBlockEntity
      Returns:
      the stack previously stored at the indicated slot
      Mappings:
      Namespace Name Mixin selector
      named removeStack Lnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;
      intermediary method_5441 Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;
      official b Lbqk;b(I)Lcuq;
    • setStack

      public void setStack(int slot, ItemStack stack)
      Sets the stack stored at slot to stack.
      Specified by:
      setStack in interface Inventory
      Overrides:
      setStack in class LockableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      named setStack Lnet/minecraft/inventory/Inventory;setStack(ILnet/minecraft/item/ItemStack;)V
      intermediary method_5447 Lnet/minecraft/class_1263;method_5447(ILnet/minecraft/class_1799;)V
      official a Lbqk;a(ILcuq;)V
    • checkUnlocked

      public boolean checkUnlocked(PlayerEntity player)
      Overrides:
      checkUnlocked in class LockableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      named checkUnlocked Lnet/minecraft/block/entity/LockableContainerBlockEntity;checkUnlocked(Lnet/minecraft/entity/player/PlayerEntity;)Z
      intermediary method_17489 Lnet/minecraft/class_2624;method_17489(Lnet/minecraft/class_1657;)Z
      official d Ldqb;d(Lcmx;)Z
    • createMenu

      @Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player)
      Specified by:
      createMenu in interface ScreenHandlerFactory
      Overrides:
      createMenu in class LockableContainerBlockEntity
      Mappings:
      Namespace Name Mixin selector
      named createMenu Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
      intermediary createMenu Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;
      official createMenu Lcrb;createMenu(ILcmw;Lcmx;)Lcpu;
    • readComponents

      protected void readComponents(BlockEntity.ComponentsAccess components)
      Overrides:
      readComponents in class LockableContainerBlockEntity
      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 Ldqh;a(Ldqh$b;)V
    • addComponents

      protected void addComponents(ComponentMap.Builder componentMapBuilder)
      Overrides:
      addComponents in class LockableContainerBlockEntity
      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 Ldqh;a(Lkm$a;)V
    • removeFromCopiedStackNbt

      public void removeFromCopiedStackNbt(NbtCompound nbt)
      Overrides:
      removeFromCopiedStackNbt in class LockableContainerBlockEntity
      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 Ldqh;a(Lub;)V