Interface SingleStackInventory

All Superinterfaces:
Clearable, Inventory
All Known Implementing Classes:
JukeboxBlockEntity

public interface SingleStackInventory extends Inventory
An inventory that holds exactly one ItemStack, at slot 0.
Mappings:
Namespace Name
official eit
intermediary net/minecraft/class_8181
named net/minecraft/inventory/SingleStackInventory
  • Method Details

    • size

      default int size()
      Returns the size of the inventory.

      The inventory should support the slot ID from 0 to size() - 1. This should remain constant throughout the inventory's lifetime.

      Specified by:
      size in interface Inventory
      Returns:
      the size of the inventory
      Mappings:
      Namespace Name Mixin selector
      official b Lbgr;b()I
      intermediary method_5439 Lnet/minecraft/class_1263;method_5439()I
      named size Lnet/minecraft/inventory/Inventory;size()I
    • isEmpty

      default boolean isEmpty()
      Returns whether the inventory consists entirely of empty item stacks.
      Specified by:
      isEmpty in interface Inventory
      Returns:
      whether the inventory consists entirely of empty item stacks
      Mappings:
      Namespace Name Mixin selector
      official af_ Lbgr;af_()Z
      intermediary method_5442 Lnet/minecraft/class_1263;method_5442()Z
      named isEmpty Lnet/minecraft/inventory/Inventory;isEmpty()Z
    • clear

      default void clear()
      Specified by:
      clear in interface Clearable
      Mappings:
      Namespace Name Mixin selector
      official a Lbgp;a()V
      intermediary method_5448 Lnet/minecraft/class_3829;method_5448()V
      named clear Lnet/minecraft/util/Clearable;clear()V
    • getStack

      default ItemStack getStack()
      Returns the stack held by the inventory.
      Returns:
      the stack held by the inventory
      Mappings:
      Namespace Name Mixin selector
      official av_ Leit;av_()Lcjf;
      intermediary method_49274 Lnet/minecraft/class_8181;method_49274()Lnet/minecraft/class_1799;
      named getStack Lnet/minecraft/inventory/SingleStackInventory;getStack()Lnet/minecraft/item/ItemStack;
    • removeStack

      default ItemStack removeStack()
      Removes the stack held by the inventory.
      Returns:
      the removed stack
      Mappings:
      Namespace Name Mixin selector
      official j Leit;j()Lcjf;
      intermediary method_49276 Lnet/minecraft/class_8181;method_49276()Lnet/minecraft/class_1799;
      named removeStack Lnet/minecraft/inventory/SingleStackInventory;removeStack()Lnet/minecraft/item/ItemStack;
    • setStack

      default void setStack(ItemStack stack)
      Sets the stack held by the inventory to stack.
      Mappings:
      Namespace Name Mixin selector
      official b Leit;b(Lcjf;)V
      intermediary method_49275 Lnet/minecraft/class_8181;method_49275(Lnet/minecraft/class_1799;)V
      named setStack Lnet/minecraft/inventory/SingleStackInventory;setStack(Lnet/minecraft/item/ItemStack;)V
    • removeStack

      default ItemStack removeStack(int slot)
      Removes the stack currently stored at slot.
      Specified by:
      removeStack in interface Inventory
      Returns:
      the stack previously stored at the indicated slot
      Mappings:
      Namespace Name Mixin selector
      official b Lbgr;b(I)Lcjf;
      intermediary method_5441 Lnet/minecraft/class_1263;method_5441(I)Lnet/minecraft/class_1799;
      named removeStack Lnet/minecraft/inventory/Inventory;removeStack(I)Lnet/minecraft/item/ItemStack;