From 354aed689ae3d5d7bfd8ab1d7ce9002127b8c526 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Wed, 28 Dec 2022 03:19:19 +0100 Subject: Issue with "god pot" in Todo list resolved (#521) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../github/moulberry/notenoughupdates/overlays/TimersOverlay.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java index 8db06651..74c64972 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java @@ -37,7 +37,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import org.lwjgl.input.Keyboard; import org.lwjgl.util.vector.Vector2f; import java.time.ZoneId; @@ -302,10 +301,14 @@ public class TimersOverlay extends TextTabOverlay { boolean foundCookieBuffText = false; boolean foundGodPotText = false; + boolean foundEffectsText = false; if (SBInfo.getInstance().getLocation() != null && !SBInfo.getInstance().getLocation().equals("dungeon") && SBInfo.getInstance().footer != null) { String formatted = SBInfo.getInstance().footer.getFormattedText(); for (String line : formatted.split("\n")) { + if (line.contains("Active Effects")) { + foundEffectsText = true; + } Matcher activeEffectsMatcher = PATTERN_ACTIVE_EFFECTS.matcher(line); if (activeEffectsMatcher.matches()) { foundGodPotText = true; @@ -411,7 +414,7 @@ public class TimersOverlay extends TextTabOverlay { } } - if (!foundGodPotText) { + if (!foundGodPotText && foundEffectsText) { hidden.godPotionDuration = 0; } -- cgit