From b12da67a08b6808363c0ad130fe8c3bc6f00f7b2 Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Sat, 18 Feb 2023 15:24:11 +0100 Subject: Fixed Calendar Buttons and special category some not existing tooltips (#620) Fixed Calendar Buttons not working and special category showing some not existing tooltips --- .../notenoughupdates/miscgui/CalendarOverlay.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java index 87691631..301a90b9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -555,11 +555,11 @@ public class CalendarOverlay { if (mouseX >= guiLeft + 151 && mouseX <= guiLeft + 151 + 14) { if (mouseY <= guiTop + 26 + 70) { Minecraft.getMinecraft().playerController.windowClick(cc.windowId, - 50, 2, 3, Minecraft.getMinecraft().thePlayer + 41, 2, 3, Minecraft.getMinecraft().thePlayer ); } else { Minecraft.getMinecraft().playerController.windowClick(cc.windowId, - 45, 2, 3, Minecraft.getMinecraft().thePlayer + 36, 2, 3, Minecraft.getMinecraft().thePlayer ); } } @@ -653,7 +653,7 @@ public class CalendarOverlay { } //Special Events - for (int i = 0; i < 21; i++) { + for (int i = 0; i < 14; i++) { int itemIndex = 10 + i + (i / 7) * 2; ItemStack item = cc.getLowerChestInventory().getStackInSlot(itemIndex); if (item == null) continue; @@ -1117,7 +1117,7 @@ public class CalendarOverlay { int specialLen = fr.getStringWidth("Special"); fr.drawString("Special", guiLeft + 139 - specialLen, guiTop + 30, 0xffffaa00); - ItemStack mayorStack = cc.getLowerChestInventory().getStackInSlot(46); + ItemStack mayorStack = cc.getLowerChestInventory().getStackInSlot(37); if (mayorStack != null) { String mayor = mayorStack.getDisplayName(); float verticalHeight = Utils.getVerticalHeight(mayor); @@ -1144,11 +1144,11 @@ public class CalendarOverlay { tooltipToDisplay = mayorStack.getTooltip(Minecraft.getMinecraft().thePlayer, false); } else if (mouseX >= guiLeft + 151 && mouseX <= guiLeft + 151 + 14) { if (mouseY <= guiTop + 26 + 70) { - ItemStack calendarStack = cc.getLowerChestInventory().getStackInSlot(50); + ItemStack calendarStack = cc.getLowerChestInventory().getStackInSlot(41); if (calendarStack != null) tooltipToDisplay = calendarStack.getTooltip(Minecraft.getMinecraft().thePlayer, false); } else { - ItemStack rewardsStack = cc.getLowerChestInventory().getStackInSlot(45); + ItemStack rewardsStack = cc.getLowerChestInventory().getStackInSlot(36); if (rewardsStack != null) tooltipToDisplay = rewardsStack.getTooltip(Minecraft.getMinecraft().thePlayer, false); } @@ -1244,7 +1244,7 @@ public class CalendarOverlay { } //Special Events - for (int i = 0; i < 21; i++) { + for (int i = 0; i < 14; i++) { int itemIndex = 10 + i + (i / 7) * 2; ItemStack item = cc.getLowerChestInventory().getStackInSlot(itemIndex); if (item == null) continue; -- cgit