From 83deeb976adb3dbd5aff892368095d27a8dfc29d Mon Sep 17 00:00:00 2001 From: Alexia Luna Date: Wed, 27 Mar 2024 20:11:13 +0100 Subject: Fix King's Scent not being detected with Effects widget (#1064) Fix: King's Scent not being detected with Effects widget --- .../miscfeatures/CrystalWishingCompassSolver.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalWishingCompassSolver.java b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalWishingCompassSolver.java index c6e714fe..80ab269d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalWishingCompassSolver.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/CrystalWishingCompassSolver.java @@ -22,12 +22,14 @@ package io.github.moulberry.notenoughupdates.miscfeatures; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe; import io.github.moulberry.notenoughupdates.core.util.Line; +import io.github.moulberry.notenoughupdates.core.util.StringUtils; import io.github.moulberry.notenoughupdates.core.util.Vec3Comparable; import io.github.moulberry.notenoughupdates.events.SpawnParticleEvent; import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.options.customtypes.NEUDebugFlag; import io.github.moulberry.notenoughupdates.util.NEUDebugLogger; import io.github.moulberry.notenoughupdates.util.SBInfo; +import io.github.moulberry.notenoughupdates.util.TabListUtils; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.event.ClickEvent; @@ -499,7 +501,15 @@ public class CrystalWishingCompassSolver { } private boolean isKingsScentPresent() { - return SBInfo.getInstance().footer.getUnformattedText().contains("King's Scent I"); + if (SBInfo.getInstance().footer.getUnformattedText().contains("King's Scent I")) { + return true; + } + for (String name : TabListUtils.getTabList()) { + if (StringUtils.cleanColour(name).contains("King's Scent I")) { + return true; + } + } + return false; } private EnumSet getFoundCrystals() { -- cgit