diff options
| author | olim88 <bobq4582@gmail.com> | 2024-10-21 05:48:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-21 00:48:49 -0400 |
| commit | 21e14cfddb0d0a22d031332caab2f5f51dc6880e (patch) | |
| tree | 31e35b0bd2ea53d15c23a97aabbc31f68f441fb4 | |
| parent | 3b344cdeee980a3eaf8609b983a4aafb189a6f46 (diff) | |
| download | Skyblocker-21e14cfddb0d0a22d031332caab2f5f51dc6880e.tar.gz Skyblocker-21e14cfddb0d0a22d031332caab2f5f51dc6880e.tar.bz2 Skyblocker-21e14cfddb0d0a22d031332caab2f5f51dc6880e.zip | |
fix kings scent detection for wishing compass (#1012)
| -rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/dwarven/WishingCompassSolver.java | 14 | ||||
| -rw-r--r-- | src/main/resources/assets/skyblocker/lang/en_us.json | 1 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/WishingCompassSolver.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/WishingCompassSolver.java index 3b49c903..964131ec 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/WishingCompassSolver.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/WishingCompassSolver.java @@ -103,11 +103,15 @@ public class WishingCompassSolver { } private static boolean isKingsScentPresent() { - String footer = PlayerListMgr.getFooter(); - if (footer == null) { - return false; - } - return footer.contains("King's Scent I"); + if (CLIENT.player == null) { + return false; + } + //make sure the data is in tab and if not tell the user + if (PlayerListMgr.getPlayerStringList().stream().noneMatch(entry -> entry.startsWith("Active Effects:"))) { + CLIENT.player.sendMessage(Constants.PREFIX.get().append(Text.translatable("skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.enableTabEffectsMessage")), false); + return false; + } + return PlayerListMgr.getPlayerStringList().stream().anyMatch(entry -> entry.startsWith("King's Scent")); } private static boolean isKeyInInventory() { diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index e9b558cb..172019ff 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -561,6 +561,7 @@ "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver": "Wishing Compass Solver", "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.@Tooltip": "Calculates and adds a waypoint at the location indicated by wishing compasses.", "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.enableTabMessage": "Enable crystals in the /tab to allow the compass to identify discovered items", + "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.enableTabEffectsMessage": "Enable effects in the /tab to allow the compass to identify queen coordinates", "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.wishingCompassUsedMessage": "Wishing compass used. Move to another location and use a second compass to triangulate the target", "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.somethingWentWrongMessage": "The lines did not intersect (Something went wrong) please try again.", "skyblocker.config.mining.crystalsWaypoints.wishingCompassSolver.targetLocationToFar": "The target location is too far away to identify the structure, possibly due to a missing structure in the lobby.", |
