From 9fe86ccb4d30b78826e513a6576027ca6e4c1600 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Mon, 18 Apr 2022 10:54:18 +0000 Subject: Fixed stuff from the project board (#112) * Fix /et not closing when clicking inventory keybind * Made it so calendar timer in inventory works if you have no event data * Made it if you hold shift in the enchant solvers it overrides prevent missclicks * Revert "Made it so calendar timer in inventory works if you have no event data" This reverts commit d2ee3ebc679da5a231d35a9d54eb10c701daff1d. * made crash not crash * consistency fixes for my heart * fix https://cdn.discordapp.com/attachments/832652653292027904/964353119557394462/unknown.png * fix https://i.imgur.com/Z3qChN3.png Co-authored-by: jani270 --- .../notenoughupdates/miscgui/CalendarOverlay.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java') 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 98d8f11d..a9cf44c4 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -1000,6 +1000,21 @@ public class CalendarOverlay { GlStateManager.translate(0, 0, -100); } } + } else if (!enabled && NotEnoughUpdates.INSTANCE.config.calendar.showEventTimerInInventory) { + FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; + + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.disableFog(); + GlStateManager.disableLighting(); + GlStateManager.disableColorMaterial(); + + renderBlurredBackground(10, width, height, guiLeft + 3, guiTop + 3, xSize - 6, ySize - 6); + + Minecraft.getMinecraft().getTextureManager().bindTexture(DISPLAYBAR); + Utils.drawTexturedRect(guiLeft, guiTop, xSize, 20, GL11.GL_NEAREST); + + String nextS = EnumChatFormatting.RED + "Open calendar to see events"; + fr.drawString(nextS, guiLeft + 8, guiTop + 6, -1, false); } } GlStateManager.translate(0, 0, -10); -- cgit From 7243827ec602efa0d2386ab53a61472465e8555a Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 30 Apr 2022 14:24:52 +0000 Subject: made it so "pane gui scale" doesnt effect armour/pet huds (#117) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * made it so "pane gui scale" doesnt effect armour/pet huds ( i did not know that was a feature) this did NOT take me 20 minutes to make this commit on the right branch * = Updated the syntax for the /sthw command, putting name after the coordinates (@My-Name-Is-Jeff) * deez nuts * move equipment tooltips to the left * move tooltip when rendering fixes some opengl shenanigans when using GlTranslate * import static * i think the number 27 is cooler than 21 but its needed here * fix pet tooltip when equipment is not cached * added master star support to the search overlay (no texture rn cos lazy) * Added 6-10 stars to the auction search overlay i am not using the web editor * texture - jani * ➓/➓ pr adding numbers to /neurename * ➓/➓ pr adding numbers 2.1.md * neuec support to attributes (THIS DID NOT TAKE OVER AN HOUR) * 2.1.md 🙂 * Added flares to tools itemtab / fixed todo move option not showing / some fixes for my heart * fix normal keybinds not working in CalendarOverlay * 2.1.md 🙂 * cobble pro time keeper * added MAXED_ATTRIBUTE_SHARD * Update 2.1.md Co-authored-by: Lulonaut Co-authored-by: jani270 --- .../io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java') 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 a9cf44c4..06cf28e1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -659,6 +659,8 @@ public class CalendarOverlay { } } } + } else { + Minecraft.getMinecraft().dispatchKeypresses(); } } } -- cgit From 50dc2122462642a0c3a00b3a3ae6389825dc04df Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 9 Jun 2022 18:04:22 -0400 Subject: Re-license project as LGPL (#157) * add licence files & a few misc chores * add license notices & run auto formatter --- .../notenoughupdates/miscgui/CalendarOverlay.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java') 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 06cf28e1..64396905 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -1,3 +1,22 @@ +/* + * Copyright (C) 2022 NotEnoughUpdates contributors + * + * This file is part of NotEnoughUpdates. + * + * NotEnoughUpdates is free software: you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation, either + * version 3 of the License, or (at your option) any later version. + * + * NotEnoughUpdates is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with NotEnoughUpdates. If not, see . + */ + package io.github.moulberry.notenoughupdates.miscgui; import com.google.gson.JsonArray; @@ -36,7 +55,12 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import java.io.File; -import java.util.*; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; import java.util.regex.Matcher; import java.util.regex.Pattern; -- cgit From 197e463ad2909708e78e693ba1f9a820295cea5a Mon Sep 17 00:00:00 2001 From: jani270 <69345714+jani270@users.noreply.github.com> Date: Tue, 9 Aug 2022 23:48:06 +0200 Subject: prerelease changes (#215) --- .../notenoughupdates/miscgui/CalendarOverlay.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java') 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 64396905..2905a941 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -865,8 +865,8 @@ public class CalendarOverlay { SBEvent firstEvent = null; List nextFavourites = new ArrayList<>(); List nextFavouritesTime = new ArrayList<>(); - long timeUntilMajor = 0; - SBEvent nextMajorEvent = null; + long timeUntilMayor = 0; + SBEvent nextMayorEvent = null; List eventFavourites = NotEnoughUpdates.INSTANCE.config.hidden.eventFavourites; @@ -889,10 +889,10 @@ public class CalendarOverlay { } } - if (nextMajorEvent == null && !sbEvent.id.split(":")[0].equals("jacob_farming") && + if (nextMayorEvent == null && !sbEvent.id.split(":")[0].equals("jacob_farming") && !sbEvent.id.equals("dark_auction")) { - nextMajorEvent = sbEvent; - timeUntilMajor = timeUntilMillis; + nextMayorEvent = sbEvent; + timeUntilMayor = timeUntilMillis; } if (firstEvent == null) { @@ -919,7 +919,7 @@ public class CalendarOverlay { } } - if (nextFavourites.size() >= 3 && nextMajorEvent != null) { + if (nextFavourites.size() >= 3 && nextMayorEvent != null) { break out; } } @@ -1000,18 +1000,18 @@ public class CalendarOverlay { if (sbEvent.id.split(":")[0].equals("jacob_farming") && sbEvent.desc != null) { tooltipToDisplay.addAll(sbEvent.desc); } - if (nextMajorEvent != null || i < nextFavourites.size() - 1) { + if (nextMayorEvent != null || i < nextFavourites.size() - 1) { tooltipToDisplay.add(""); } } - if (nextMajorEvent != null) { - tooltipToDisplay.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Next Major:"); - tooltipToDisplay.add(nextMajorEvent.display); + if (nextMayorEvent != null) { + tooltipToDisplay.add(EnumChatFormatting.YELLOW.toString() + EnumChatFormatting.BOLD + "Next Mayor:"); + tooltipToDisplay.add(nextMayorEvent.display); tooltipToDisplay.add(EnumChatFormatting.GRAY + "Starts in: " + EnumChatFormatting.YELLOW + - prettyTime(timeUntilMajor, false)); - if (nextMajorEvent.lastsFor >= 0) { + prettyTime(timeUntilMayor, false)); + if (nextMayorEvent.lastsFor >= 0) { tooltipToDisplay.add(EnumChatFormatting.GRAY + "Lasts for: " + EnumChatFormatting.YELLOW + - prettyTime(nextMajorEvent.lastsFor, true)); + prettyTime(nextMayorEvent.lastsFor, true)); } } -- cgit From 94054563ff1d595253a4e50cf48b22fc77a05515 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Tue, 13 Sep 2022 02:31:56 +1000 Subject: Fix enchantment table overlay (#238) Co-authored-by: nea --- .../github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java') 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 2905a941..b1a3dca9 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/CalendarOverlay.java @@ -75,6 +75,8 @@ public class CalendarOverlay { private static boolean enabled = false; + public static boolean ableToClickCalendar = true; + public static void setEnabled(boolean enabled) { CalendarOverlay.enabled = enabled; } @@ -479,8 +481,7 @@ public class CalendarOverlay { guiLeft = (width - xSize) / 2; guiTop = 5; - - if (mouseX >= guiLeft && mouseX <= guiLeft + xSize) { + if (mouseX >= guiLeft && mouseX <= guiLeft + xSize && ableToClickCalendar) { if (mouseY >= guiTop && mouseY <= guiTop + ySize) { ClientCommandHandler.instance.executeCommand(Minecraft.getMinecraft().thePlayer, "/neucalendar"); } -- cgit