Interface Slot

All Superinterfaces:
Inventory, ValueContainer
All Known Subinterfaces:
CraftingOutput, EquipmentSlot, FilteringSlot, FuelSlot, InputSlot, OutputSlot, SidedSlot

public interface Slot extends Inventory
A slot is an Inventory with only a single stack.
  • Method Details

    • viewedSlot

      Slot viewedSlot()
      Returns the slot in a Containers viewed inventory or itself.
      the viewed inventory slot or itself if not a container slot
    • set

      Adds the ItemStack to this slot overwriting the existing item.

      Stacks bigger than the max stack size will be partially rejected.

      stack - The stack to add to this slot.
      A SUCCESS transaction-result if the entire stack was added and FAILURE when the stack was not or only partially added to the inventory.