aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java
diff options
context:
space:
mode:
authorolim <bobq4582@gmail.com>2024-02-01 19:21:46 +0000
committerolim <bobq4582@gmail.com>2024-02-01 19:21:46 +0000
commit0e8a0102298b67318cb3a533f74f042994edaabc (patch)
tree496bdb7f9b436ed1540056d47ec67552560027b8 /src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java
parent1f991fb10bafc4082c3b75e1b29c57d72e246919 (diff)
downloadSkyblocker-0e8a0102298b67318cb3a533f74f042994edaabc.tar.gz
Skyblocker-0e8a0102298b67318cb3a533f74f042994edaabc.tar.bz2
Skyblocker-0e8a0102298b67318cb3a533f74f042994edaabc.zip
fixed regresion
a line was removed that cleared they active way points in last commit. put this back
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java9
1 files changed, 5 insertions, 4 deletions
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<String, CrystalsWaypoint> ActiveWaypoints = new HashMap<>() {};
+ protected static Map<String, CrystalsWaypoint> 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);