diff options
Diffstat (limited to 'src/main/java/me/Danker/features')
5 files changed, 406 insertions, 201 deletions
diff --git a/src/main/java/me/Danker/features/AutoDisplay.java b/src/main/java/me/Danker/features/AutoDisplay.java index 8dbe359..5fc4489 100644 --- a/src/main/java/me/Danker/features/AutoDisplay.java +++ b/src/main/java/me/Danker/features/AutoDisplay.java @@ -4,6 +4,7 @@ import me.Danker.DankersSkyblockMod; import me.Danker.features.loot.LootDisplay; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.init.Items; @@ -44,23 +45,38 @@ public class AutoDisplay { } else if (sCleaned.contains("The Mist")){ LootDisplay.display = "ghost"; found = true; - } else if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - LootDisplay.display = "catacombs_floor_one"; - } else if (sCleaned.contains("F2")) { - LootDisplay.display = "catacombs_floor_two"; - } else if (sCleaned.contains("F3")) { - LootDisplay.display = "catacombs_floor_three"; - } else if (sCleaned.contains("F4")) { - LootDisplay.display = "catacombs_floor_four"; - } else if (sCleaned.contains("F5")) { - LootDisplay.display = "catacombs_floor_five"; - } else if (sCleaned.contains("F6")) { - LootDisplay.display = "catacombs_floor_six"; - } else if (sCleaned.contains("F7")) { - LootDisplay.display = "catacombs_floor_seven"; - } else if (sCleaned.contains("(M")) { - LootDisplay.display = "catacombs_master"; + } else if (Utils.inDungeons) { + switch (Utils.currentFloor) { + case F1: + LootDisplay.display = "catacombs_floor_one"; + break; + case F2: + LootDisplay.display = "catacombs_floor_two"; + break; + case F3: + LootDisplay.display = "catacombs_floor_three"; + break; + case F4: + LootDisplay.display = "catacombs_floor_four"; + break; + case F5: + LootDisplay.display = "catacombs_floor_five"; + break; + case F6: + LootDisplay.display = "catacombs_floor_six"; + break; + case F7: + LootDisplay.display = "catacombs_floor_seven"; + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + LootDisplay.display = "catacombs_master"; + break; } found = true; } diff --git a/src/main/java/me/Danker/features/DungeonScore.java b/src/main/java/me/Danker/features/DungeonScore.java index 706ce62..588db8a 100644 --- a/src/main/java/me/Danker/features/DungeonScore.java +++ b/src/main/java/me/Danker/features/DungeonScore.java @@ -5,7 +5,6 @@ import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; import me.Danker.events.RenderOverlayEvent; -import me.Danker.handlers.ScoreboardHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -19,7 +18,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import java.util.Collection; -import java.util.List; public class DungeonScore { @@ -55,29 +53,6 @@ public class DungeonScore { if (!ToggleCommand.dungeonScore || !Utils.inDungeons) return; if (DankersSkyblockMod.tickAmount % 20 == 0) { - String floor = ""; - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - floor = "F1"; - } else if (sCleaned.contains("F2")) { - floor = "F2"; - } else if (sCleaned.contains("F3")) { - floor = "F3"; - } else if (sCleaned.contains("F4")) { - floor = "F4"; - } else if (sCleaned.contains("F5")) { - floor = "F5"; - } else if (sCleaned.contains("F6")) { - floor = "F6"; - } else if (sCleaned.contains("F7")) { - floor = "F7"; - } - } - } - int missingPuzzles = 0; double openedRooms = 0; double completedRooms = 0; @@ -99,23 +74,23 @@ public class DungeonScore { double secretCount = Double.parseDouble(display.replaceAll("[^\\d.]", "")); - switch (floor) { - case "F1": + switch (Utils.currentFloor) { + case F1: secretScore = secretCount / 30D; break; - case "F2": + case F2: secretScore = secretCount / 40D; break; - case "F3": + case F3: secretScore = secretCount / 50D; break; - case "F4": + case F4: secretScore = secretCount / 60D; break; - case "F5": + case F5: secretScore = secretCount / 70D; break; - case "F6": + case F6: secretScore = secretCount / 85D; break; default: @@ -127,19 +102,19 @@ public class DungeonScore { int seconds = Integer.parseInt(timeText.substring(timeText.indexOf("m") + 1, timeText.indexOf("s"))); int time = minutes * 60 + seconds; - if (floor.equals("F2")) time -= 120; + if (Utils.currentFloor == Utils.DungeonFloor.F2) time -= 120; int base; - switch (floor) { - case "F1": - case "F2": - case "F3": - case "F5": + switch (Utils.currentFloor) { + case F1: + case F2: + case F3: + case F5: base = 600; break; - case "F4": - case "F6": - case "F7": + case F4: + case F6: + case F7: base = 720; break; default: diff --git a/src/main/java/me/Danker/features/loot/CatacombsTracker.java b/src/main/java/me/Danker/features/loot/CatacombsTracker.java index c4b9634..8d50ab3 100644 --- a/src/main/java/me/Danker/features/loot/CatacombsTracker.java +++ b/src/main/java/me/Danker/features/loot/CatacombsTracker.java @@ -89,12 +89,26 @@ public class CatacombsTracker { public static double f7CoinsSpent; public static double f7TimeSpent; // MM - public static int masterS; + public static int m1S; + public static int m1SPlus; + public static int m2S; + public static int m2SPlus; + public static int m3S; + public static int m3SPlus; + public static int m4S; + public static int m4SPlus; + public static int m5S; + public static int m5SPlus; + public static int m6S; + public static int m6SPlus; + public static int m7S; + public static int m7SPlus; public static int firstStars; public static int secondStars; public static int thirdStars; public static int fourthStars; public static int fifthStars; + public static int darkClaymores; public static int masterRerolls; public static double masterCoinsSpent; public static double masterTimeSpent; @@ -174,12 +188,26 @@ public class CatacombsTracker { public static double f7CoinsSpentSession = 0; public static double f7TimeSpentSession = 0; // MM - public static int masterSSession = 0; + public static int m1SSession = 0; + public static int m1SPlusSession = 0; + public static int m2SSession = 0; + public static int m2SPlusSession = 0; + public static int m3SSession = 0; + public static int m3SPlusSession = 0; + public static int m4SSession = 0; + public static int m4SPlusSession = 0; + public static int m5SSession = 0; + public static int m5SPlusSession = 0; + public static int m6SSession = 0; + public static int m6SPlusSession = 0; + public static int m7SSession = 0; + public static int m7SPlusSession = 0; public static int firstStarsSession = 0; public static int secondStarsSession = 0; public static int thirdStarsSession = 0; public static int fourthStarsSession = 0; public static int fifthStarsSession = 0; + public static int darkClaymoresSession = 0; public static int masterRerollsSession = 0; public static double masterCoinsSpentSession = 0; public static double masterTimeSpentSession = 0; @@ -191,51 +219,138 @@ public class CatacombsTracker { if (!Utils.inDungeons) return; if (event.type == 2) return; - if (message.contains(" Team Score: ") && message.contains("(S+)")) { - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + if (message.contains(" Team Score: ")) { if (message.contains("(S+)")) { - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - f1SPlus++; - f1SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorOneSPlus", f1SPlus); - } else if (sCleaned.contains("F2")) { - f2SPlus++; - f2SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorTwoSPlus", f2SPlus); - } else if (sCleaned.contains("F3")) { - f3SPlus++; - f3SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorThreeSPlus", f3SPlus); - } else if (sCleaned.contains("F4")) { - f4SPlus++; - f4SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorFourSPlus", f4SPlus); - } else if (sCleaned.contains("F5")) { - f5SPlus++; - f5SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorFiveSPlus", f5SPlus); - } else if (sCleaned.contains("F6")) { - f6SPlus++; - f6SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorSixSPlus", f6SPlus); - } else if (sCleaned.contains("F7")) { - f7SPlus++; - f7SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorSevenSPlus", f7SPlus); - } - } + switch (Utils.currentFloor) { + case F1: + f1SPlus++; + f1SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorOneSPlus", f1SPlus); + break; + case F2: + f2SPlus++; + f2SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorTwoSPlus", f2SPlus); + break; + case F3: + f3SPlus++; + f3SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorThreeSPlus", f3SPlus); + break; + case F4: + f4SPlus++; + f4SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorFourSPlus", f4SPlus); + break; + case F5: + f5SPlus++; + f5SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorFiveSPlus", f5SPlus); + break; + case F6: + f6SPlus++; + f6SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorSixSPlus", f6SPlus); + break; + case F7: + f7SPlus++; + f7SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorSevenSPlus", f7SPlus); + break; + case M1: + m1S++; + m1SPlus++; + m1SSession++; + m1SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterOneS", m1S); + ConfigHandler.writeIntConfig("catacombs", "masterOneSPlus", m1SPlus); + break; + case M2: + m2S++; + m2SPlus++; + m2SSession++; + m2SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterTwoS", m2S); + ConfigHandler.writeIntConfig("catacombs", "masterTwoSPlus", m2SPlus); + break; + case M3: + m3S++; + m3SPlus++; + m3SSession++; + m3SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterThreeS", m3S); + ConfigHandler.writeIntConfig("catacombs", "masterThreeSPlus", m3SPlus); + break; + case M4: + m4S++; + m4SPlus++; + m4SSession++; + m4SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFourS", m4S); + ConfigHandler.writeIntConfig("catacombs", "masterFourSPlus", m4SPlus); + break; + case M5: + m5S++; + m5SPlus++; + m5SSession++; + m5SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFiveS", m5S); + ConfigHandler.writeIntConfig("catacombs", "masterFiveSPlus", m5SPlus); + break; + case M6: + m6S++; + m6SPlus++; + m6SSession++; + m6SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSixS", m6S); + ConfigHandler.writeIntConfig("catacombs", "masterSixSPlus", m6SPlus); + break; + case M7: + m7S++; + m7SPlus++; + m7SSession++; + m7SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSevenS", m7S); + ConfigHandler.writeIntConfig("catacombs", "masterSevenSPlus", m7SPlus); + break; } } else if (message.contains("(S)")) { - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (M")) { - masterS++; - masterSSession++; - ConfigHandler.writeIntConfig("catacombs", "masterS", masterS); - } + switch (Utils.currentFloor) { + case M1: + m1S++; + m1SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterOneS", m1S); + break; + case M2: + m2S++; + m2SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterTwoS", m2S); + break; + case M3: + m3S++; + m3SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterThreeS", m3S); + break; + case M4: + m4S++; + m4SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterFourS", m4S); + break; + case M5: + m5S++; + m5SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterFiveS", m5S); + break; + case M6: + m6S++; + m6SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterSixS", m6S); + break; + case M7: + m7S++; + m7SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterSevenS", m7S); + break; } } } @@ -435,56 +550,74 @@ public class CatacombsTracker { fifthStars++; fifthStarsSession++; ConfigHandler.writeIntConfig("catacombs", "fifthStar", fifthStars); + } else if (message.contains("Dark Claymore")) { + darkClaymores++; + darkClaymoresSession++; + ConfigHandler.writeIntConfig("catacombs", "darkClaymore", darkClaymores); } } if (message.contains("EXTRA STATS ")) { List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - int timeToAdd = 0; for (String s : scoreboard) { String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - // Add time to floor - if (sCleaned.contains("F1")) { - f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd); - f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent); - } else if (sCleaned.contains("F2")) { - f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd); - f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent); - } else if (sCleaned.contains("F3")) { - f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd); - f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent); - } else if (sCleaned.contains("F4")) { - f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd); - f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent); - } else if (sCleaned.contains("F5")) { - f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd); - f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent); - } else if (sCleaned.contains("F6")) { - f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd); - f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent); - } else if (sCleaned.contains("F7")) { - f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd); - f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent); - } else if (sCleaned.contains("(M")) { - masterTimeSpent = Math.floor(masterTimeSpent + timeToAdd); - masterTimeSpentSession = Math.floor(masterTimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "masterTime", masterTimeSpent); - } - } else if (sCleaned.contains("Time Elapsed:")) { + if (sCleaned.contains("Time Elapsed:")) { // Get floor time String time = sCleaned.substring(sCleaned.indexOf(":") + 2); time = time.replaceAll("\\s", ""); int minutes = Integer.parseInt(time.substring(0, time.indexOf("m"))); int seconds = Integer.parseInt(time.substring(time.indexOf("m") + 1, time.indexOf("s"))); - timeToAdd = (minutes * 60) + seconds; + int timeToAdd = (minutes * 60) + seconds; + + // Add time to floor + switch (Utils.currentFloor) { + case F1: + f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd); + f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent); + break; + case F2: + f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd); + f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent); + break; + case F3: + f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd); + f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent); + break; + case F4: + f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd); + f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent); + break; + case F5: + f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd); + f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent); + break; + case F6: + f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd); + f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent); + break; + case F7: + f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd); + f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterTimeSpent = Math.floor(masterTimeSpent + timeToAdd); + masterTimeSpentSession = Math.floor(masterTimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "masterTime", masterTimeSpent); + break; + } } } } @@ -504,69 +637,80 @@ public class CatacombsTracker { if (line.contains(" Coins") && !line.contains("NOTE:")) { int coinsSpent = Integer.parseInt(line.replaceAll("[^\\d]", "")); - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - f1CoinsSpent += coinsSpent; - f1CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent); - } else if (sCleaned.contains("F2")) { - f2CoinsSpent += coinsSpent; - f2CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent); - } else if (sCleaned.contains("F3")) { - f3CoinsSpent += coinsSpent; - f3CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent); - } else if (sCleaned.contains("F4")) { - f4CoinsSpent += coinsSpent; - f4CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent); - } else if (sCleaned.contains("F5")) { - f5CoinsSpent += coinsSpent; - f5CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent); - } else if (sCleaned.contains("F6")) { - f6CoinsSpent += coinsSpent; - f6CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent); - } else if (sCleaned.contains("F7")) { - f7CoinsSpent += coinsSpent; - f7CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent); - } else if (sCleaned.contains("(M")) { - masterCoinsSpent += coinsSpent; - masterCoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "masterCoins", masterCoinsSpent); - } + switch (Utils.currentFloor) { + case F1: + f1CoinsSpent += coinsSpent; + f1CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent); + break; + case F2: + f2CoinsSpent += coinsSpent; + f2CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent); + break; + case F3: + f3CoinsSpent += coinsSpent; + f3CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent); + break; + case F4: + f4CoinsSpent += coinsSpent; + f4CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent); + break; + case F5: + f5CoinsSpent += coinsSpent; + f5CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent); + break; + case F6: + f6CoinsSpent += coinsSpent; + f6CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent); + break; + case F7: + f7CoinsSpent += coinsSpent; + f7CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterCoinsSpent += coinsSpent; + masterCoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "masterCoins", masterCoinsSpent); break; - } } break; } } } else if (item.getDisplayName().contains("Reroll Chest")) { - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F6")) { - f6Rerolls++; - f6RerollsSession++; - ConfigHandler.writeDoubleConfig("catacombs", "floorSixRerolls", f6Rerolls); - } else if (sCleaned.contains("F7")) { - f7Rerolls++; - f7RerollsSession++; - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenRerolls", f7Rerolls); - } else if (sCleaned.contains("(M")) { - masterRerolls++; - masterRerollsSession++; - ConfigHandler.writeDoubleConfig("catacombs", "masterRerolls", masterRerolls); - } + switch (Utils.currentFloor) { + case F6: + f6Rerolls++; + f6RerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixRerolls", f6Rerolls); + break; + case F7: + f7Rerolls++; + f7RerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenRerolls", f7Rerolls); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterRerolls++; + masterRerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "masterRerolls", masterRerolls); break; - } } } } diff --git a/src/main/java/me/Danker/features/loot/LootDisplay.java b/src/main/java/me/Danker/features/loot/LootDisplay.java index 812108b..16e64f6 100644 --- a/src/main/java/me/Danker/features/loot/LootDisplay.java +++ b/src/main/java/me/Danker/features/loot/LootDisplay.java @@ -30,6 +30,8 @@ public class LootDisplay { String timeBetween; String bossesBetween; String drop20; + String runs; + String runsCount; double timeNow = System.currentTimeMillis() / 1000; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); @@ -1109,7 +1111,39 @@ public class LootDisplay { EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f7TimeSpentSession); break; case "catacombs_master": - dropsText = EnumChatFormatting.GOLD + "S Runs:\n" + + if (ToggleCommand.masterSPlusDisplay) { + runs = EnumChatFormatting.GOLD + "Master One S+:\n" + + EnumChatFormatting.GOLD + "Master Two S+:\n" + + EnumChatFormatting.GOLD + "Master Three S+:\n" + + EnumChatFormatting.GOLD + "Master Four S+:\n" + + EnumChatFormatting.GOLD + "Master Five S+:\n" + + EnumChatFormatting.GOLD + "Master Six S+:\n" + + EnumChatFormatting.GOLD + "Master Seven S+:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SPlus) + "\n"; + } else { + runs = EnumChatFormatting.GOLD + "Master One S:\n" + + EnumChatFormatting.GOLD + "Master Two S:\n" + + EnumChatFormatting.GOLD + "Master Three S:\n" + + EnumChatFormatting.GOLD + "Master Four S:\n" + + EnumChatFormatting.GOLD + "Master Five S:\n" + + EnumChatFormatting.GOLD + "Master Six S:\n" + + EnumChatFormatting.GOLD + "Master Seven S:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7S) + "\n"; + } + + dropsText = runs + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "1st Master Stars:\n" + @@ -1117,10 +1151,11 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "3rd Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "4th Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "5th Master Stars:\n" + + EnumChatFormatting.GOLD + "Dark Claymores:\n" + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.masterS) + "\n" + + countText = runsCount + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.firstStars) + "\n" + @@ -1128,12 +1163,45 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.thirdStars) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fourthStars) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fifthStars) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.darkClaymores) + "\n" + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.masterRerolls) + "\n" + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpent) + "\n" + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpent); break; case "catacombs_master_session": - dropsText = EnumChatFormatting.GOLD + "S Runs:\n" + + if (ToggleCommand.masterSPlusDisplay) { + runs = EnumChatFormatting.GOLD + "Master One S+:\n" + + EnumChatFormatting.GOLD + "Master Two S+:\n" + + EnumChatFormatting.GOLD + "Master Three S+:\n" + + EnumChatFormatting.GOLD + "Master Four S+:\n" + + EnumChatFormatting.GOLD + "Master Five S+:\n" + + EnumChatFormatting.GOLD + "Master Six S+:\n" + + EnumChatFormatting.GOLD + "Master Seven S+:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SPlusSession) + "\n"; + } else { + runs = EnumChatFormatting.GOLD + "Master One S:\n" + + EnumChatFormatting.GOLD + "Master Two S:\n" + + EnumChatFormatting.GOLD + "Master Three S:\n" + + EnumChatFormatting.GOLD + "Master Four S:\n" + + EnumChatFormatting.GOLD + "Master Five S:\n" + + EnumChatFormatting.GOLD + "Master Six S:\n" + + EnumChatFormatting.GOLD + "Master Seven S:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SSession) + "\n"; + } + + dropsText = runs + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "1st Master Stars:\n" + @@ -1141,10 +1209,11 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "3rd Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "4th Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "5th Master Stars:\n" + + EnumChatFormatting.GOLD + "Dark Claymores:\n" + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.masterSSession) + "\n" + + countText = runsCount + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.firstStarsSession) + "\n" + @@ -1152,6 +1221,7 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.thirdStarsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fourthStarsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fifthStarsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.darkClaymoresSession) + "\n" + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.masterRerollsSession) + "\n" + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpentSession) + "\n" + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpentSession); diff --git a/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java index 4e9f498..b947cdb 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java @@ -38,7 +38,7 @@ public class LividSolver { World world = Minecraft.getMinecraft().theWorld; if (DankersSkyblockMod.tickAmount % 20 == 0) { if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && world != null) { - if (Utils.isInScoreboard("The Catacombs (F5)")) { + if (Utils.currentFloor == Utils.DungeonFloor.F5 || Utils.currentFloor == Utils.DungeonFloor.M5) { List<Entity> loadedLivids = new ArrayList<>(); List<Entity> entities = world.getLoadedEntityList(); for (Entity entity : entities) { |