From c14ea38372c30d40820a7bcb7c8f56d407d7022f Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Mon, 16 Aug 2021 22:50:00 +0200 Subject: fix double tooltips --- .../github/moulberry/notenoughupdates/overlays/CraftingOverlay.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java index ecc88ccc..8640fd0e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/CraftingOverlay.java @@ -42,11 +42,10 @@ public class CraftingOverlay { int y = slot.yDisplayPosition + gc.guiTop; if (!slot.getHasStack() || !manager.getInternalNameForItem(items[i]).equals(manager.getInternalNameForItem(slot.getStack())) || slot.getStack().stackSize < items[i].stackSize) - Gui.drawRect(x, y, - x + 16, y + 16, 0x64ff0000); + Gui.drawRect(x, y, x + 16, y + 16, 0x64ff0000); if (!slot.getHasStack()) Utils.drawItemStack(items[i], x, y); - if (mouseX >= x && mouseX < x + 16 && mouseY >= y && mouseY < y + 16) + if (!slot.getHasStack() && mouseX >= x && mouseX < x + 16 && mouseY >= y && mouseY < y + 16) tooltip = items[i].getTooltip(Minecraft.getMinecraft().thePlayer, false); } } -- cgit