Interface ContainerSingleItem

All Superinterfaces:
Clearable, Container
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 amount)
    • setTheItem

      void setTheItem(ItemStack item)
    • 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 slot)
      Removes a stack from the given slot and returns it.
      Specified by:
      removeItemNoUpdate in interface Container
    • getItem

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

      default ItemStack removeItem(int slot, int amount)
      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 slot, ItemStack stack)
      Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
      Specified by:
      setItem in interface Container