Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix kings scent detection for wishing compass #1012

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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