From 0e8a0102298b67318cb3a533f74f042994edaabc Mon Sep 17 00:00:00 2001 From: olim Date: Thu, 1 Feb 2024 19:21:46 +0000 Subject: fixed regresion a line was removed that cleared they active way points in last commit. put this back --- .../skyblocker/skyblock/dwarven/CrystalsLocationsManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java') diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java index 74730315..8101fae6 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java @@ -49,7 +49,7 @@ public class CrystalsLocationsManager { "Corleone", CrystalsWaypoint.Category.CORLEONE, "King", CrystalsWaypoint.Category.KING ); - protected static Map ActiveWaypoints = new HashMap<>() {}; + protected static Map activeWaypoints = new HashMap<>() {}; private static final Pattern TEXT_CWORDS_PATTERN = Pattern.compile("([0-9][0-9][0-9]) ([0-9][0-9][0-9]?) ([0-9][0-9][0-9])"); @@ -142,12 +142,12 @@ public class CrystalsLocationsManager { private static void addCustomWaypoint( Text waypointName, BlockPos pos) { CrystalsWaypoint.Category category = WAYPOINTLOCATIONS.get(waypointName.getString()); CrystalsWaypoint waypoint = new CrystalsWaypoint(category, waypointName, pos); - ActiveWaypoints.put(waypointName.getString(),waypoint); + activeWaypoints.put(waypointName.getString(),waypoint); } public static void render(WorldRenderContext context) { if (SkyblockerConfigManager.get().locations.dwarvenMines.crystalsWaypoints.enabled ) { - for (CrystalsWaypoint crystalsWaypoint : ActiveWaypoints.values()) { + for (CrystalsWaypoint crystalsWaypoint : activeWaypoints.values()) { if (crystalsWaypoint.shouldRender()) { crystalsWaypoint.render(context); } @@ -157,12 +157,13 @@ public class CrystalsLocationsManager { public static void update() { if (client.player == null || client.getNetworkHandler() == null || !SkyblockerConfigManager.get().locations.dwarvenMines.crystalsWaypoints.enabled || !Utils.isInCrystals()) { + activeWaypoints = new HashMap<>(); return; } //get if the player is in the crystals String location = Utils.getIslandArea().replace("⏣ ",""); //if new location and needs waypoint add waypoint - if (!location.equals("Unknown") && WAYPOINTLOCATIONS.containsKey(location) && !ActiveWaypoints.containsKey(location)){ + if (!location.equals("Unknown") && WAYPOINTLOCATIONS.containsKey(location) && !activeWaypoints.containsKey(location)){ //add waypoint at player location BlockPos playerLocation = client.player.getBlockPos(); addCustomWaypoint(Text.of(location),playerLocation); -- cgit