This commit is contained in:
Kam committed 2025-03-06 01:53:19 -05:00
1 parent 8c2c226d34
commit a876b4d191
9 files changed
+933 -193

No files matched your search

+40 -14
View File
@@ -1,14 +1,40 @@
package noppes.npcs.api.gui;
import net.minecraft.inventory.Slot;
import noppes.npcs.api.item.IItemStack;
public interface IItemSlot extends ICustomGuiComponent {
boolean hasStack();
IItemStack getStack();
IItemSlot setStack(IItemStack itemStack);
Slot getMCSlot();
}
package noppes.npcs.api.gui;
import net.minecraft.inventory.Slot;
import noppes.npcs.api.item.IItemStack;
/**
* Represents an item slot component in a custom GUI.
* Provides methods to get or set the contained item.
*/
public interface IItemSlot extends ICustomGuiComponent {
/**
* Checks if the slot currently contains an item stack.
*
* @return true if a stack exists; false otherwise.
*/
boolean hasStack();
/**
* Returns the item stack contained in this slot.
*
* @return the item stack.
*/
IItemStack getStack();
/**
* Sets the item stack for this slot.
*
* @param itemStack the item stack to set.
* @return this item slot instance.
*/
IItemSlot setStack(IItemStack itemStack);
/**
* Returns the underlying Minecraft slot object.
*
* @return the Minecraft Slot.
*/
Slot getMCSlot();
}