diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2022-12-28 03:19:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-28 13:19:19 +1100 |
commit | 354aed689ae3d5d7bfd8ab1d7ce9002127b8c526 (patch) | |
tree | a6936151dd961c7cadee0f03383042ec5886b580 /src/main/java | |
parent | fa7abebe73f629c17e7a43d8c50307d2f8aa588e (diff) | |
download | NotEnoughUpdates-354aed689ae3d5d7bfd8ab1d7ce9002127b8c526.tar.gz NotEnoughUpdates-354aed689ae3d5d7bfd8ab1d7ce9002127b8c526.tar.bz2 NotEnoughUpdates-354aed689ae3d5d7bfd8ab1d7ce9002127b8c526.zip |
Issue with "god pot" in Todo list resolved (#521)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/TimersOverlay.java | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |