aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util
diff options
context:
space:
mode:
authormsg-programs <msgdoesstuff@gmail.com>2023-07-27 22:14:54 +0200
committermsg-programs <msgdoesstuff@gmail.com>2023-07-27 22:15:42 +0200
commit393ec5f59d16296248fe1994d02ced699a725fcb (patch)
tree65647782e6ca80cc36838058500c5aa77812fa50 /src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util
parentc2f5155391482368425b61517848f4a11080dcf7 (diff)
downloadSkyblocker-393ec5f59d16296248fe1994d02ced699a725fcb.tar.gz
Skyblocker-393ec5f59d16296248fe1994d02ced699a725fcb.tar.bz2
Skyblocker-393ec5f59d16296248fe1994d02ced699a725fcb.zip
Load layout from resoure packs, see details.
Use resource pack logic to load the layouts. Finally delete the old screen defs, replace with builtin layout JSON files. Include a top-aligned layout as a builtin resource pack. Implement more possibilites for the layout to support said pack.
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util')
-rw-r--r--src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util/PlayerLocator.java48
1 files changed, 28 insertions, 20 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util/PlayerLocator.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util/PlayerLocator.java
index c2f14d3c..9b24171a 100644
--- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util/PlayerLocator.java
+++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/tabhud/util/PlayerLocator.java
@@ -8,25 +8,33 @@ import me.xmrvizzy.skyblocker.utils.Utils;
public class PlayerLocator {
public static enum Location {
- DUNGEON,
- GUEST_ISLAND,
- HOME_ISLAND,
- CRIMSON_ISLE,
- DUNGEON_HUB,
- FARMING_ISLAND,
- PARK,
- DWARVEN_MINES,
- CRYSTAL_HOLLOWS,
- END,
- GOLD_MINE,
- DEEP_CAVERNS,
- HUB,
- SPIDER_DEN,
- JERRY,
- GARDEN,
- INSTANCED,
- THE_RIFT,
- UNKNOWN
+ DUNGEON("dungeon"),
+ GUEST_ISLAND("guest_island"),
+ HOME_ISLAND("home_island"),
+ CRIMSON_ISLE("crimson_isle"),
+ DUNGEON_HUB("dungeon_hub"),
+ FARMING_ISLAND("farming_island"),
+ PARK("park"),
+ DWARVEN_MINES("dwarven_mines"),
+ CRYSTAL_HOLLOWS("crystal_hollows"),
+ END("end"),
+ GOLD_MINE("gold_mine"),
+ DEEP_CAVERNS("deep_caverns"),
+ HUB("hub"),
+ SPIDER_DEN("spider_den"),
+ JERRY("jerry_workshop"),
+ GARDEN("garden"),
+ INSTANCED("kuudra"),
+ THE_RIFT("rift"),
+ UNKNOWN("unknown");
+
+ public String internal;
+
+ private Location(String i) {
+ // as used internally by the mod, e.g. in the json
+ this.internal = i;
+ }
+
}
public static Location getPlayerLocation() {
@@ -84,7 +92,7 @@ public class PlayerLocator {
case "Instanced":
return Location.INSTANCED;
case "The Rift":
- return Location.THE_RIFT;
+ return Location.THE_RIFT;
default:
return Location.UNKNOWN;
}