Package noppes.npcs.api.gui
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description net.minecraft.inventory.Slot
getMCSlot()
Returns the underlying Minecraft slot object.IItemStack
getStack()
Returns the item stack contained in this slot.boolean
hasStack()
Checks if the slot currently contains an item stack.IItemSlot
setStack(IItemStack itemStack)
Sets the item stack for this slot.-
Methods inherited from interface noppes.npcs.api.gui.ICustomGuiComponent
fromNBT, getAlpha, getColor, getHoverText, getID, getPosX, getPosY, getRotation, hasHoverText, setAlpha, setColor, setHoverText, setHoverText, setID, setPos, setRotation, toNBT
-
-
-
-
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.
-
-