diff options
Diffstat (limited to 'src/main/java/me/Danker/utils/Utils.java')
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 8c48c54..30e8249 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -28,6 +28,7 @@ public class Utils { public static boolean inSkyblock = false; public static boolean inDungeons = false; + public static DungeonFloor currentFloor = DungeonFloor.NONE; public static String tabLocation = ""; public static int[] skillXPPerLevel = {0, 50, 125, 200, 300, 500, 750, 1000, 1500, 2000, 3500, 5000, 7500, 10000, 15000, 20000, 30000, 50000, 75000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1100000, @@ -135,6 +136,31 @@ public class Utils { inDungeons = false; } + public static void checkForDungeonFloor() { + if (inDungeons) { + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + + if (sCleaned.contains("The Catacombs (")) { + String floor = sCleaned.substring(sCleaned.indexOf("(") + 1, sCleaned.indexOf(")")); + + try { + currentFloor = DungeonFloor.valueOf(floor); + } catch (IllegalArgumentException ex) { + currentFloor = DungeonFloor.NONE; + ex.printStackTrace(); + } + + break; + } + } + } else { + currentFloor = DungeonFloor.NONE; + } + } + public static void checkTabLocation() { if (inSkyblock) { Collection<NetworkPlayerInfo> players = Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap(); @@ -465,4 +491,23 @@ public class Utils { return (Math.floor(level / 2D) + 25) / 100D; } + public enum DungeonFloor { + NONE, + E0, + F1, + F2, + F3, + F4, + F5, + F6, + F7, + M1, + M2, + M3, + M4, + M5, + M6, + M7 + } + } |