Skip to content

Commit

Permalink
fix kings scent detection for wishing compass (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
olim88 authored Oct 21, 2024
1 parent 3b344cd commit 21e14cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,15 @@ private static void reset() {
}

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() {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/skyblocker/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit 21e14cf

Please sign in to comment.