Interface IItemSlot

  • All Superinterfaces:
    ICustomGuiComponent

    public interface IItemSlot
    extends ICustomGuiComponent
    Represents an item slot component in a custom GUI. Provides methods to get or set the contained item.
    • Method Detail

      • hasStack

        boolean hasStack()
        Checks if the slot currently contains an item stack.
        Returns:
        true if a stack exists; false otherwise.
      • getStack

        IItemStack getStack()
        Returns the item stack contained in this slot.
        Returns:
        the item stack.
      • setStack

        IItemSlot setStack​(IItemStack itemStack)
        Sets the item stack for this slot.
        Parameters:
        itemStack - the item stack to set.
        Returns:
        this item slot instance.
      • getMCSlot

        net.minecraft.inventory.Slot getMCSlot()
        Returns the underlying Minecraft slot object.
        Returns:
        the Minecraft Slot.