aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsHud.java4
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dwarven/CrystalsLocationsManager.java9
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<String,CrystalsWaypoint> ActiveWaypoints= CrystalsLocationsManager.ActiveWaypoints;
+ Map<String,CrystalsWaypoint> ActiveWaypoints= CrystalsLocationsManager.activeWaypoints;
for (CrystalsWaypoint waypoint : ActiveWaypoints.values()){
Color waypointColor = waypoint.category.color;
Pair<Integer, Integer> 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<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);