From c28a9156d5139ef256050a5b5999f6fca305b213 Mon Sep 17 00:00:00 2001 From: luisc Date: Fri, 14 Jan 2022 15:06:04 -0600 Subject: [PATCH] Custom GUI slot fix --- .../noppes/npcs/client/gui/custom/GuiCustom.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/noppes/npcs/client/gui/custom/GuiCustom.java b/src/main/java/noppes/npcs/client/gui/custom/GuiCustom.java index 8f37fee33..7d1443f37 100644 --- a/src/main/java/noppes/npcs/client/gui/custom/GuiCustom.java +++ b/src/main/java/noppes/npcs/client/gui/custom/GuiCustom.java @@ -539,9 +539,19 @@ public class GuiCustom extends GuiScreen implements ICustomScrollListener, IGuiD if (mouseButton == 0 || mouseButton == 1 || flag) { int i1 = guiLeft + ((ContainerCustomGui)this.inventorySlots).playerInvX; int j1 = guiTop + ((ContainerCustomGui)this.inventorySlots).playerInvY; - boolean flag1 = mouseX < i1 || mouseY < j1 || mouseX >= i1 + this.xSize || mouseY >= j1 + this.ySize; + boolean flag1 = true;// mouseX < i1 || mouseY < j1 || mouseX >= i1 + this.xSize || mouseY >= j1 + this.ySize; int k1 = -1; + for (int i = 0; i < this.inventorySlots.inventorySlots.size(); ++i) + { + Slot invSlot = (Slot)this.inventorySlots.inventorySlots.get(i); + + if (invSlot.equals(slot)) + { + flag1 = false; + } + } + if (slot != null) { k1 = slot.slotNumber; }