Interface ContainerSingleItem

All Superinterfaces:
Clearable, Container, Iterable<ItemStack>
All Known Subinterfaces:
ContainerSingleItem.BlockContainerSingleItem
All Known Implementing Classes:
DecoratedPotBlockEntity, JukeboxBlockEntity

public interface ContainerSingleItem extends Container
  • Method Details

    • getTheItem

      ItemStack getTheItem()
    • splitTheItem

      default ItemStack splitTheItem(int pAmount)
    • setTheItem

      void setTheItem(ItemStack pItem)
    • removeTheItem

      default ItemStack removeTheItem()
    • getContainerSize

      default int getContainerSize()
      Specified by:
      getContainerSize in interface Container
    • isEmpty

      default boolean isEmpty()
      Specified by:
      isEmpty in interface Container
    • clearContent

      default void clearContent()
      Specified by:
      clearContent in interface Clearable
    • removeItemNoUpdate

      default ItemStack removeItemNoUpdate(int p_273409_)
      Description copied from interface: Container
      Removes a stack from the given slot and returns it.
      Specified by:
      removeItemNoUpdate in interface Container
    • getItem

      default ItemStack getItem(int p_304882_)
      Description copied from interface: Container
      Returns the stack in the given slot.
      Specified by:
      getItem in interface Container
    • removeItem

      default ItemStack removeItem(int p_304944_, int p_304791_)
      Description copied from interface: Container
      Removes up to a specified number of items from an inventory slot and returns them in a new stack.
      Specified by:
      removeItem in interface Container
    • setItem

      default void setItem(int p_304434_, ItemStack p_304854_)
      Description copied from interface: Container
      Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
      Specified by:
      setItem in interface Container