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; }