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 --- .../java/de/hysky/skyblocker/skyblock/dwarven/CrystalsHud.java | 4 +--- .../skyblocker/skyblock/dwarven/CrystalsLocationsManager.java | 9 +++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsHud.java b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsHud.java index 59d70405..0c3d40eb 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsHud.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsHud.java @@ -2,8 +2,6 @@ package de.hysky.skyblocker.skyblock.dwarven; import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.config.SkyblockerConfigManager; -import de.hysky.skyblocker.skyblock.dungeon.secrets.DungeonManager; -import de.hysky.skyblocker.skyblock.dungeon.secrets.Room; import de.hysky.skyblocker.utils.Utils; import de.hysky.skyblocker.utils.scheduler.Scheduler; import it.unimi.dsi.fastutil.Pair; @@ -68,7 +66,7 @@ public class CrystalsHud { drawTexture(MAP_TEXTURE,hudX,hudY,0,0,62,62,62,62); //if enabled add waypoint locations to map if (SkyblockerConfigManager.get().locations.dwarvenMines.crystalsHud.showLocations){ - Map ActiveWaypoints= CrystalsLocationsManager.ActiveWaypoints; + Map ActiveWaypoints= CrystalsLocationsManager.activeWaypoints; for (CrystalsWaypoint waypoint : ActiveWaypoints.values()){ Color waypointColor = waypoint.category.color; Pair renderPos = transformLocation(waypoint.pos.getX(),waypoint.pos.getZ()); 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