Files
CustomNPC-Plus/src/main/java/noppes/npcs/scripted/gui/ScriptGuiItemSlot.java
T

43 lines
939 B
Java
Raw Normal View History

2022-01-12 04:44:08 -06:00
package noppes.npcs.scripted.gui;
import net.minecraft.inventory.Slot;
2022-11-15 15:25:53 -05:00
import noppes.npcs.api.gui.IItemSlot;
import noppes.npcs.api.item.IItemStack;
2022-01-12 04:44:08 -06:00
public class ScriptGuiItemSlot extends ScriptGuiComponent implements IItemSlot {
IItemStack stack;
public ScriptGuiItemSlot() {
}
2023-03-18 03:04:46 -05:00
public ScriptGuiItemSlot(int id, int x, int y) {
this.setID(id);
2022-01-12 04:44:08 -06:00
this.setPos(x, y);
}
2023-03-18 03:04:46 -05:00
public ScriptGuiItemSlot(int id, int x, int y, IItemStack stack) {
this(id, x, y);
2022-01-12 04:44:08 -06:00
this.setStack(stack);
}
public boolean hasStack() {
return this.stack != null && this.stack.getStackSize() > 0;
}
public IItemStack getStack() {
return this.stack;
}
public IItemSlot setStack(IItemStack itemStack) {
this.stack = itemStack;
return this;
}
public Slot getMCSlot() {
return null;
}
public int getType() {
return 5;
}
}