diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-11-01 23:32:28 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2020-11-01 23:32:28 -0500 |
commit | 056455031cbe8005a2172d6607b84efc453ac0ea (patch) | |
tree | 724b15f3abfe15f22537645a585ede4997829a01 /src/main/java/me | |
parent | 16de1dc972fe6a920295a0458a96ad79ea1b684b (diff) | |
download | SkyblockMod-056455031cbe8005a2172d6607b84efc453ac0ea.tar.gz SkyblockMod-056455031cbe8005a2172d6607b84efc453ac0ea.tar.bz2 SkyblockMod-056455031cbe8005a2172d6607b84efc453ac0ea.zip |
Add correct livid finder, change dungeon timer to only display in dungeons, bug fixes
Change jar encoding to UTF-8
Update /resetloot catacombs with F5 and F6
Fix Spirit Sceptre message hider
Remove debug message from fishing in Jerry Pond
Diffstat (limited to 'src/main/java/me')
-rw-r--r-- | src/main/java/me/Danker/TheMod.java | 47 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DHelpCommand.java | 6 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/MoveCommand.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ResetLootCommand.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ScaleCommand.java | 9 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ToggleCommand.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/DankerGui.java | 7 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/EditLocationsGui.java | 12 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 8 |
9 files changed, 110 insertions, 12 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index 27aaef7..ca52372 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -85,6 +85,7 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Loader; @@ -96,6 +97,7 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent; +import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; @@ -135,6 +137,8 @@ public class TheMod static boolean drawCreeperLines = false; static Vec3 creeperLocation = new Vec3(0, 0, 0); static List<Vec3[]> creeperLines = new ArrayList<Vec3[]>(); + static boolean foundLivid = false; + static Entity livid = null; static double dungeonStartTime = 0; static double bloodOpenTime = 0; @@ -300,6 +304,12 @@ public class TheMod } } + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + foundLivid = false; + livid = null; + } + // It randomly broke, so I had to make it the highest priority @SubscribeEvent(priority = EventPriority.HIGHEST) public void onChat(ClientChatReceivedEvent event) { @@ -1038,7 +1048,7 @@ public class TheMod } // Spirit Sceptre - if (!tc.sceptreMessages && message.contains("Your Bat Staff hit ")) { + if (!tc.sceptreMessages && message.contains("Your Spirit Sceptre hit ")) { event.setCanceled(true); } // Midas Staff @@ -1081,7 +1091,7 @@ public class TheMod new TextRenderer(Minecraft.getMinecraft(), coordText, moc.coordsXY[0], moc.coordsXY[1], ScaleCommand.coordsScale); } - if (tc.dungeonTimerToggled) { + if (tc.dungeonTimerToggled && Utils.inDungeons) { String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + EnumChatFormatting.DARK_RED + "Blood Open:\n" + EnumChatFormatting.RED + "Watcher Clear:\n" + @@ -1098,6 +1108,10 @@ public class TheMod new TextRenderer(Minecraft.getMinecraft(), dungeonTimers, (int) (moc.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), moc.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); } + if (tc.lividSolverToggled && foundLivid && livid != null) { + new TextRenderer(Minecraft.getMinecraft(), livid.getName().replace("" + EnumChatFormatting.BOLD, ""), moc.lividHpXY[0], moc.lividHpXY[1], ScaleCommand.lividHpScale); + } + if (!ds.display.equals("off")) { final LootCommand lc = new LootCommand(); String dropsText = ""; @@ -1980,6 +1994,34 @@ public class TheMod } } + if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && mc.theWorld != null) { + boolean inF5 = false; + + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("The Catacombs (F5)")) { + inF5 = true; + break; + } + } + + if (inF5) { + List<Entity> loadedLivids = new ArrayList<Entity>(); + List<Entity> entities = mc.theWorld.getLoadedEntityList(); + for (Entity entity : entities) { + String name = entity.getName(); + if (name.contains("Livid") && name.length() > 5 && name.charAt(1) == name.charAt(5) && !loadedLivids.contains(entity)) { + loadedLivids.add(entity); + } + } + if (loadedLivids.size() > 8) { + livid = loadedLivids.get(0); + foundLivid = true; + } + } + } + tickAmount = 0; } @@ -2249,7 +2291,6 @@ public class TheMod List<String> scoreboard = ScoreboardHandler.getSidebarLines(); for (String s : scoreboard) { String sCleaned = ScoreboardHandler.cleanSB(s); - System.out.println(sCleaned); if (sCleaned.contains("Jerry's Workshop") || sCleaned.contains("Jerry Pond")) { if (lc.yetiSCs != -1) { lc.yetiSCs++; diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 0175c81..aaffa96 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,14 +34,14 @@ public class DHelpCommand extends CommandBase { EnumChatFormatting.GOLD + " Commands, " + EnumChatFormatting.GREEN + " Keybinds.\n" + EnumChatFormatting.GOLD + " /dhelp" + EnumChatFormatting.AQUA + " - Returns this message.\n" + EnumChatFormatting.GOLD + " /dsm" + EnumChatFormatting.AQUA + " - Opens the GUI for Danker's Skyblock Mod.\n" + - EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/oruopuzzle/blazepuzzle/creeperpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" + EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" + EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" + EnumChatFormatting.GOLD + " /resetloot <zombie/spider/wolf/fishing/catacombs/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" + - EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + - EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + + EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + + EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + EnumChatFormatting.GOLD + " /slayer [player]" + EnumChatFormatting.AQUA + " - Uses API to get slayer xp of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + " /skills [player]" + EnumChatFormatting.AQUA + " - Uses API to get skill levels of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + " /lobbyskills" + EnumChatFormatting.AQUA + " - Uses API to find the average skills of the lobby, as well the three players with the highest skill average.\n" + diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index 7fb9acd..8b68e7e 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -17,6 +17,7 @@ public class MoveCommand extends CommandBase { public static int[] displayXY = {0, 0}; public static int[] dungeonTimerXY = {0, 0}; public static int[] skill50XY = {0, 0}; + public static int[] lividHpXY = {0, 0}; @Override public String getCommandName() { @@ -25,7 +26,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <x> <y>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <x> <y>"; } @Override @@ -36,7 +37,7 @@ public class MoveCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp"); } return null; } @@ -75,6 +76,12 @@ public class MoveCommand extends CommandBase { cf.writeIntConfig("locations", "skill50X", skill50XY[0]); cf.writeIntConfig("locations", "skill50Y", skill50XY[1]); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); + } else if (arg1[0].equalsIgnoreCase("lividhp")) { + lividHpXY[0] = Integer.parseInt(arg1[1]); + lividHpXY[1] = Integer.parseInt(arg1[2]); + cf.writeIntConfig("locations", "lividHpX", lividHpXY[0]); + cf.writeIntConfig("locations", "lividHpY", lividHpXY[1]); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid HP has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); } else { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index bf5b218..a4eee3a 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -217,8 +217,19 @@ public class ResetLootCommand extends CommandBase { lc.shadowAssLegsSession = 0; lc.shadowAssBootsSession = 0; lc.lividDaggersSession = 0; + lc.shadowFurysSession = 0; lc.f5CoinsSpentSession = 0; lc.f5TimeSpentSession = 0; + lc.ancientRosesSession = 0; + lc.precursorEyesSession = 0; + lc.giantsSwordsSession = 0; + lc.necroLordHelmsSession = 0; + lc.necroLordChestsSession = 0; + lc.necroLordLegsSession = 0; + lc.necroLordBootsSession = 0; + lc.necroSwordsSession = 0; + lc.f6CoinsSpentSession = 0; + lc.f6TimeSpentSession = 0; cf.deleteCategory("catacombs"); cf.reloadConfig(); } diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index 5f21b77..76a3062 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -17,6 +17,7 @@ public class ScaleCommand extends CommandBase { public static double displayScale; public static double dungeonTimerScale; public static double skill50Scale; + public static double lividHpScale; @Override public String getCommandName() { @@ -25,7 +26,7 @@ public class ScaleCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <size (0.1 - 10)>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <size (0.1 - 10)>"; } @Override @@ -36,7 +37,7 @@ public class ScaleCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp"); } return null; } @@ -72,6 +73,10 @@ public class ScaleCommand extends CommandBase { skill50Scale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "skill50Scale", skill50Scale); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been scaled to " + EnumChatFormatting.DARK_GREEN + skill50Scale + "x")); + } else if (arg1[0].equalsIgnoreCase("lividhp")) { + lividHpScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "lividHpScale", lividHpScale); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid HP has been scaled to " + EnumChatFormatting.DARK_GREEN + lividHpScale + "x")); } else { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 9b19a38..f58777c 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -31,6 +31,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean skill50DisplayToggled; public static boolean outlineTextToggled; public static boolean midasStaffMessages; + public static boolean lividSolverToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -46,7 +47,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" + "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + - "outlinetext/midasstaffmessages/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/list>"; + "outlinetext/midasstaffmessages/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/list>"; } @Override @@ -61,7 +62,8 @@ public class ToggleCommand extends CommandBase implements ICommand { "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", - "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "list"); + "lividsolver", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", + "list"); } return null; } @@ -148,6 +150,10 @@ public class ToggleCommand extends CommandBase implements ICommand { midasStaffMessages = !midasStaffMessages; cf.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Midas Staff messages have been set to " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("lividsolver")) { + lividSolverToggled = !lividSolverToggled; + cf.writeBooleanConfig("toggles", "LividSolver", lividSolverToggled); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid solver has been set to " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("threemanpuzzle")) { threeManToggled = !threeManToggled; cf.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); @@ -183,6 +189,7 @@ public class ToggleCommand extends CommandBase implements ICommand { EnumChatFormatting.GREEN + " Skill 50 display: " + EnumChatFormatting.DARK_GREEN + skill50DisplayToggled + "\n" + EnumChatFormatting.GREEN + " Outline displayed text: " + EnumChatFormatting.DARK_GREEN + outlineTextToggled + "\n" + EnumChatFormatting.GREEN + " Midas Staff messages: " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + "\n" + + EnumChatFormatting.GREEN + " Livid solver: " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + "\n" + EnumChatFormatting.GREEN + " Three man puzzle solver: " + EnumChatFormatting.DARK_GREEN + threeManToggled + "\n" + EnumChatFormatting.GREEN + " Oruo trivia solver: " + EnumChatFormatting.DARK_GREEN + oruoToggled + "\n" + EnumChatFormatting.GREEN + " Blaze puzzle solver: " + EnumChatFormatting.DARK_GREEN + blazeToggled + "\n" + diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 7316395..15e0fa5 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -46,6 +46,7 @@ public class DankerGui extends GuiScreen { private GuiButton skill50Display; private GuiButton outlineText; private GuiButton midasStaffMessages; + private GuiButton lividSolver; public DankerGui(int page) { this.page = page; @@ -94,6 +95,7 @@ public class DankerGui extends GuiScreen { golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled)); skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled)); + lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); if (page == 1) { this.buttonList.add(changeDisplay); @@ -121,6 +123,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(golemAlerts); this.buttonList.add(expertiseLore); this.buttonList.add(skill50Display); + this.buttonList.add(lividSolver); this.buttonList.add(backPage); } this.buttonList.add(githubLink); @@ -228,6 +231,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.midasStaffMessages = !ToggleCommand.midasStaffMessages; ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", ToggleCommand.midasStaffMessages); midasStaffMessages.displayString = "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages); + } else if (button == lividSolver) { + ToggleCommand.lividSolverToggled = !ToggleCommand.lividSolverToggled; + ConfigHandler.writeBooleanConfig("toggles", "LividSolver", ToggleCommand.lividSolverToggled); + lividSolver.displayString = "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled); } } diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java index 8fbc4cb..f8b6712 100644 --- a/src/main/java/me/Danker/gui/EditLocationsGui.java +++ b/src/main/java/me/Danker/gui/EditLocationsGui.java @@ -19,6 +19,7 @@ public class EditLocationsGui extends GuiScreen { private LocationButton dungeonTimer; private LocationButton coords; private LocationButton skill50; + private LocationButton lividHP; @Override public boolean doesGuiPauseGame() { @@ -72,9 +73,11 @@ public class EditLocationsGui extends GuiScreen { dungeonTimer = new LocationButton(0, moc.dungeonTimerXY[0], moc.dungeonTimerXY[1], 113 * sc.dungeonTimerScale, 57 * sc.dungeonTimerScale, sc.dungeonTimerScale, dungeonTimerText, dungeonTimerNums, 80); coords = new LocationButton(0, moc.coordsXY[0], moc.coordsXY[1], 141 * sc.coordsScale, 12 * sc.coordsScale, sc.coordsScale, "74 / 14 / -26 (141.1 / 6.7)", null, null); skill50 = new LocationButton(0, moc.skill50XY[0], moc.skill50XY[1], 233 * sc.skill50Scale, 12 * sc.skill50Scale, sc.skill50Scale, EnumChatFormatting.AQUA + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null); + lividHP = new LocationButton(0, moc.lividHpXY[0], moc.lividHpXY[1], 85 * sc.lividHpScale, 12 * sc.lividHpScale, sc.lividHpScale, EnumChatFormatting.WHITE + "﴾ Livid " + EnumChatFormatting.YELLOW + "6.9M" + EnumChatFormatting.RED + "❤ " + EnumChatFormatting.WHITE + "﴿", null, null); this.buttonList.add(coords); this.buttonList.add(dungeonTimer); + this.buttonList.add(lividHP); this.buttonList.add(display); this.buttonList.add(skill50); } @@ -111,6 +114,11 @@ public class EditLocationsGui extends GuiScreen { MoveCommand.skill50XY[1] += yMoved; skill50.xPosition = MoveCommand.skill50XY[0]; skill50.yPosition = MoveCommand.skill50XY[1]; + } else if (moving.equals("lividHP")) { + MoveCommand.lividHpXY[0] += xMoved; + MoveCommand.lividHpXY[1] += yMoved; + lividHP.xPosition = MoveCommand.lividHpXY[0]; + lividHP.yPosition = MoveCommand.lividHpXY[1]; } this.buttonList.clear(); initGui(); @@ -131,6 +139,8 @@ public class EditLocationsGui extends GuiScreen { moving = "coords"; } else if (button == skill50) { moving = "skill50"; + } else if (button == lividHP) { + moving = "lividHP"; } } } @@ -147,6 +157,8 @@ public class EditLocationsGui extends GuiScreen { ConfigHandler.writeIntConfig("locations", "dungeonTimerY", MoveCommand.dungeonTimerXY[1]); ConfigHandler.writeIntConfig("locations", "skill50X", MoveCommand.skill50XY[0]); ConfigHandler.writeIntConfig("locations", "skill50Y", MoveCommand.skill50XY[1]); + ConfigHandler.writeIntConfig("locations", "lividHpX", MoveCommand.lividHpXY[0]); + ConfigHandler.writeIntConfig("locations", "lividHpY", MoveCommand.lividHpXY[1]); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 579c3e0..86d2ccd 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -190,6 +190,7 @@ public class ConfigHandler { if (!hasKey("toggles", "Skill50Display")) writeBooleanConfig("toggles", "Skill50Display", false); if (!hasKey("toggles", "OutlineText")) writeBooleanConfig("toggles", "OutlineText", false); if (!hasKey("toggles", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true); + if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); @@ -338,10 +339,13 @@ public class ConfigHandler { if (!hasKey("locations", "dungeonTimerY")) writeIntConfig("locations", "dungeonTimerY", 5); if (!hasKey("locations", "skill50X")) writeIntConfig("locations", "skill50X", 40); if (!hasKey("locations", "skill50Y")) writeIntConfig("locations", "skill50Y", 10); + if (!hasKey("locations", "lividHpX")) writeIntConfig("locations", "lividHpX", 40); + if (!hasKey("locations", "lividHpY")) writeIntConfig("locations", "lividHpY", 20); if (!hasKey("scales", "coordsScale")) writeDoubleConfig("scales", "coordsScale", 1); if (!hasKey("scales", "displayScale")) writeDoubleConfig("scales", "displayScale", 1); if (!hasKey("scales", "dungeonTimerScale")) writeDoubleConfig("scales", "dungeonTimerScale", 1); if (!hasKey("scales", "skill50Scale")) writeDoubleConfig("scales", "skill50Scale", 1); + if (!hasKey("scales", "lividHpScale")) writeDoubleConfig("scales", "lividHpScale", 1); final ToggleCommand tf = new ToggleCommand(); tf.gpartyToggled = getBoolean("toggles", "GParty"); @@ -362,6 +366,7 @@ public class ConfigHandler { tf.skill50DisplayToggled = getBoolean("toggles", "Skill50Display"); tf.outlineTextToggled = getBoolean("toggles", "OutlineText"); tf.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages"); + tf.lividSolverToggled = getBoolean("toggles", "LividSolver"); // Puzzle Solvers tf.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); tf.oruoToggled = getBoolean("toggles", "OruoPuzzle"); @@ -516,12 +521,15 @@ public class ConfigHandler { moc.dungeonTimerXY[1] = getInt("locations", "dungeonTimerY"); moc.skill50XY[0] = getInt("locations", "skill50X"); moc.skill50XY[1] = getInt("locations", "skill50Y"); + moc.lividHpXY[0] = getInt("locations", "lividHpX"); + moc.lividHpXY[1] = getInt("locations", "lividHpY"); final ScaleCommand sc = new ScaleCommand(); sc.coordsScale = getDouble("scales", "coordsScale"); sc.displayScale = getDouble("scales", "displayScale"); sc.dungeonTimerScale = getDouble("scales", "dungeonTimerScale"); sc.skill50Scale = getDouble("scales", "skill50Scale"); + sc.lividHpScale = getDouble("scales", "lividHpScale"); } } |