From 092b53e100506ffa70e2bd01596b9891acf28dbf Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Tue, 8 Dec 2020 12:55:44 -0500 Subject: Watcher Ready Message Displays a message stating the Watcher has finished spawning mobs as a title --- src/main/java/me/Danker/DankersSkyblockMod.java | 5 ++++- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- src/main/java/me/Danker/gui/DankerGui.java | 7 +++++++ src/main/java/me/Danker/handlers/ConfigHandler.java | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 2c75a0e..de10626 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -442,7 +442,10 @@ public class DankersSkyblockMod if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { watcherClearTime = System.currentTimeMillis() / 1000; - } + } + if (message.contains("[BOSS] The Watcher: That will be enough for now.") && ToggleCommand.watcherReadyToggled && Utils.inDungeons) { + Utils.createTitle(EnumChatFormatting.RED + "WATCHER READY", 2); + } if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { puzzleFails++; } diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index ee5958c..5ffc23d 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 1c40dc4..c676d5c 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -54,6 +54,7 @@ public class DankerGui extends GuiScreen { private GuiButton lowHealthNotify; private GuiButton lividSolver; private GuiButton stopSalvageStarred; + private GuiButton watcherReadyMessage; public DankerGui(int page) { this.page = page; @@ -113,6 +114,7 @@ public class DankerGui extends GuiScreen { lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); // Page 5 stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); + watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); switch (page) { case 1: @@ -160,6 +162,7 @@ public class DankerGui extends GuiScreen { break; case 5: this.buttonList.add(stopSalvageStarred); + this.buttonList.add(watcherReadyMessage); this.buttonList.add(backPage); break; } @@ -304,6 +307,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.stopSalvageStarredToggled = !ToggleCommand.stopSalvageStarredToggled; ConfigHandler.writeBooleanConfig("toggles", "StopSalvageStarred", ToggleCommand.stopSalvageStarredToggled); stopSalvageStarred.displayString = "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled); + } else if (button == watcherReadyMessage) { + ToggleCommand.watcherReadyToggled = !ToggleCommand.watcherReadyToggled; + ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", ToggleCommand.watcherReadyToggled); + watcherReadyMessage.displayString = "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 23bd6c4..336e7c1 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -192,6 +192,7 @@ public class ConfigHandler { if (!hasKey("toggles", "LowHealthNotify")) writeBooleanConfig("toggles", "LowHealthNotify", false); if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false); if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); + if (!hasKey("toggles", "WatcherReadyMessage")) writeBooleanConfig("toggles", "WatcherReadyMessage", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); @@ -442,6 +443,7 @@ public class ConfigHandler { ToggleCommand.lowHealthNotifyToggled = getBoolean("toggles", "LowHealthNotify"); ToggleCommand.lividSolverToggled = getBoolean("toggles", "LividSolver"); ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); + ToggleCommand.watcherReadyToggled = getBoolean("toggles", "WatcherReadyMessage"); // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle"); -- cgit From dafaf5c4122678a7e3015e19c94e7f618f1890ab Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Tue, 8 Dec 2020 13:06:36 -0500 Subject: Update ToggleCommand.java Forgot to update ToggleCommand --- src/main/java/me/Danker/commands/ToggleCommand.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 5c473e5..1e2c824 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -37,6 +37,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean lowHealthNotifyToggled; public static boolean lividSolverToggled; public static boolean stopSalvageStarredToggled; + public static boolean watcherReadyToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -65,7 +66,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/pickblockinexperiments/list>"; + "startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/pickblockinexperiments/watchermessage/list>"; } @Override @@ -84,7 +85,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", "selectallterminal", "itemframeonsealanterns", "ultrasequencer", - "chronomatron", "superpairs", "pickblockinexperiments", "list"); + "chronomatron", "superpairs", "pickblockinexperiments", "watchermessage", "list"); } return null; } @@ -285,6 +286,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", superpairsToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto-swap to pick block in experiments has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + swapToPickBlockInExperimentsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "watchermessage": + watcherReadyToggled = !watcherReadyToggled; + ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", watcherReadyToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display Watcher ready message has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + watcherReadyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "list": player.addChatMessage(new ChatComponentText(DankersSkyblockMod.TYPE_COLOUR + "Guild party notifications: " + DankersSkyblockMod.VALUE_COLOUR + gpartyToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Coord/Angle display: " + DankersSkyblockMod.VALUE_COLOUR + coordsToggled + "\n" + @@ -320,7 +326,8 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Ignore item frames on sea lanterns: " + DankersSkyblockMod.VALUE_COLOUR + itemFrameOnSeaLanternsToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Ultra sequencer solver: " + DankersSkyblockMod.VALUE_COLOUR + ultrasequencerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Chronomatron solver: " + DankersSkyblockMod.VALUE_COLOUR + chronomatronToggled + "\n" + - DankersSkyblockMod.TYPE_COLOUR + " Superpairs solver: " + DankersSkyblockMod.VALUE_COLOUR + superpairsToggled + DankersSkyblockMod.TYPE_COLOUR + " Superpairs solver: " + DankersSkyblockMod.VALUE_COLOUR + superpairsToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Watcher ready message: " + DankersSkyblockMod.VALUE_COLOUR + watcherReadyToggled )); break; default: -- cgit From 0c8bda1714891bb26979f723f40db299896b1cce Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Wed, 9 Dec 2020 20:47:16 -0500 Subject: Add debug command to /dsm Copies important information to clipboard to help with debugging issues --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 75 ++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 0258259..02b9d3c 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.4" +version = "1.8.5-beta1" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 2c75a0e..e7bc30d 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -73,7 +73,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.4"; + public static final String VERSION = "1.8.5-beta1"; static double checkItemsNow = 0; static double itemsChecked = 0; diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 18230e6..cde5b31 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -1,9 +1,15 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; +import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.ResourcePackRepository; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentText; + +import java.awt.*; +import java.awt.datatransfer.StringSelection; public class DankerGuiCommand extends CommandBase { @@ -24,6 +30,75 @@ public class DankerGuiCommand extends CommandBase { @Override public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { + if (arg1.length > 0 && arg1[0].equalsIgnoreCase("debug")) { + StringBuilder debug = new StringBuilder(); + debug.append("```md\n"); + debug.append("# Toggles\n"); + debug.append("[gparty][").append(ToggleCommand.gpartyToggled).append("]\n"); + debug.append("[coords][").append(ToggleCommand.coordsToggled).append("]\n"); + debug.append("[golden][").append(ToggleCommand.goldenToggled).append("]\n"); + debug.append("[slayercount][").append(ToggleCommand.slayerCountTotal).append("]\n"); + debug.append("[rngesusalerts][").append(ToggleCommand.rngesusAlerts).append("]\n"); + debug.append("[splitfishing][").append(ToggleCommand.splitFishing).append("]\n"); + debug.append("[chatmaddox][").append(ToggleCommand.chatMaddoxToggled).append("]\n"); + debug.append("[spiritbearalerts][").append(ToggleCommand.spiritBearAlerts).append("]\n"); + debug.append("[aotd][").append(ToggleCommand.aotdToggled).append("]\n"); + debug.append("[lividdagger][").append(ToggleCommand.lividDaggerToggled).append("]\n"); + debug.append("[sceptremessages][").append(ToggleCommand.sceptreMessages).append("]\n"); + debug.append("[petcolors][").append(ToggleCommand.petColoursToggled).append("]\n"); + debug.append("[dungeontimer][").append(ToggleCommand.dungeonTimerToggled).append("]\n"); + debug.append("[golemalerts][").append(ToggleCommand.golemAlertToggled).append("]\n"); + debug.append("[expertiselore][").append(ToggleCommand.expertiseLoreToggled).append("]\n"); + debug.append("[skill50display][").append(ToggleCommand.skill50DisplayToggled).append("]\n"); + debug.append("[outlinetext][").append(ToggleCommand.outlineTextToggled).append("]\n"); + debug.append("[midasstaffmessages][").append(ToggleCommand.midasStaffMessages).append("]\n"); + debug.append("[implosionmessages][").append(ToggleCommand.implosionMessages).append("]\n"); + debug.append("[healmessages][").append(ToggleCommand.healMessages).append("]\n"); + debug.append("[caketimer][").append(ToggleCommand.cakeTimerToggled).append("]\n"); + debug.append("[lowhealthnotify][").append(ToggleCommand.lowHealthNotifyToggled).append("]\n"); + debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n"); + debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n"); + debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); + debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); + debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); + debug.append("[creeperpuzzle][").append(ToggleCommand.creeperToggled).append("]\n"); + debug.append("[waterpuzzle][").append(ToggleCommand.waterToggled).append("]\n"); + debug.append("[tictactoepuzzle][").append(ToggleCommand.ticTacToeToggled).append("]\n"); + debug.append("[startswithterminal][").append(ToggleCommand.startsWithToggled).append("]\n"); + debug.append("[selectallterminal][").append(ToggleCommand.selectAllToggled).append("]\n"); + debug.append("[itemframeonsealanterns][").append(ToggleCommand.itemFrameOnSeaLanternsToggled).append("]\n"); + debug.append("[ultrasequencer][").append(ToggleCommand.ultrasequencerToggled).append("]\n"); + debug.append("[chronomatron][").append(ToggleCommand.chronomatronToggled).append("]\n"); + debug.append("[superpairs][").append(ToggleCommand.superpairsToggled).append("]\n"); + debug.append("[pickblockinexperiments][").append(ToggleCommand.swapToPickBlockInExperimentsToggled).append("]\n"); + debug.append("# Locations\n"); + debug.append("[coords][").append(MoveCommand.coordsXY[0]).append(", ").append(MoveCommand.coordsXY[1]).append("]\n"); + debug.append("[display][").append(MoveCommand.displayXY[0]).append(", ").append(MoveCommand.displayXY[1]).append("]\n"); + debug.append("[dungeontimer][").append(MoveCommand.dungeonTimerXY[0]).append(", ").append(MoveCommand.dungeonTimerXY[1]).append("]\n"); + debug.append("[skill50][").append(MoveCommand.skill50XY[0]).append(", ").append(MoveCommand.skill50XY[1]).append("]\n"); + debug.append("[lividhp][").append(MoveCommand.lividHpXY[0]).append(", ").append(MoveCommand.lividHpXY[1]).append("]\n"); + debug.append("[caketimer][").append(MoveCommand.cakeTimerXY[0]).append(", ").append(MoveCommand.cakeTimerXY[1]).append("]\n"); + debug.append("[skilltracker][").append(MoveCommand.skillTrackerXY[0]).append(", ").append(MoveCommand.skillTrackerXY[1]).append("]\n"); + debug.append("[wateranswer][").append(MoveCommand.waterAnswerXY[0]).append(", ").append(MoveCommand.waterAnswerXY[1]).append("]\n"); + debug.append("# Other Settings\n"); + debug.append("[Current Display][").append(DisplayCommand.display).append("]\n"); + debug.append("[Auto Display][").append(DisplayCommand.auto).append("]\n"); + debug.append("[Skill Tracker Visible][").append(DankersSkyblockMod.showSkillTracker).append("]\n"); + debug.append("# Resource Packs\n"); + if (Minecraft.getMinecraft().getResourcePackRepository().getRepositoryEntries().size() == 0) { + debug.append("\n"); + } else { + for (ResourcePackRepository.Entry resource : Minecraft.getMinecraft().getResourcePackRepository().getRepositoryEntries()) { + debug.append("< ").append(resource.getResourcePackName()).append(" >\n"); + } + } + debug.append("```"); + StringSelection clipboard = new StringSelection(debug.toString()); + Toolkit.getDefaultToolkit().getSystemClipboard().setContents(clipboard, clipboard); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Debug stats copied to clipboard.")); + return; + } + DankersSkyblockMod.guiToOpen = "dankergui1"; } -- cgit From 978c058d05aa25da9c5e5c0ab8a85a63ed3b1c58 Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Thu, 10 Dec 2020 13:50:54 -0500 Subject: Additional Features to Experiment Solvers Displays the next item in the sequence for ultrasequencer and chronomatron in blue. Also adds the feature to disable tooltips in the addons (chronomatron and ultrasequencer) --- src/main/java/me/Danker/DankersSkyblockMod.java | 30 ++++++++++++++++++++-- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/ToggleCommand.java | 14 +++++++--- src/main/java/me/Danker/gui/ExperimentsGui.java | 8 +++++- .../java/me/Danker/handlers/ConfigHandler.java | 2 ++ src/main/java/me/Danker/utils/Utils.java | 2 +- 6 files changed, 50 insertions(+), 8 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index de10626..2362ddb 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2256,12 +2256,17 @@ public class DankersSkyblockMod } } } - } + } if (mc.currentScreen instanceof GuiChest) { ContainerChest chest = (ContainerChest) player.openContainer; IInventory inv = chest.getLowerChestInventory(); String chestName = inv.getDisplayName().getUnformattedText(); + + if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { + event.toolTip.clear(); + } + if (ToggleCommand.superpairsToggled && chestName.contains("Superpairs (")) { if (Item.getIdFromItem(item.getItem()) != 95) return; if (item.getDisplayName().contains("Click any button") || item.getDisplayName().contains("Click a second button") || item.getDisplayName().contains("Next button is instantly rewarded") || item.getDisplayName().contains("Stained Glass")) { @@ -3159,6 +3164,12 @@ public class DankersSkyblockMod Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40); } + if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { + if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { + Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6); + } + } } } } @@ -3183,8 +3194,23 @@ public class DankersSkyblockMod for (int i = 10; i <= 43; i++) { ItemStack glass = invSlots.get(i).getStack(); if (glass == null) continue; + Slot glassSlot = invSlots.get(i); - if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + + if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) { + if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { + if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + } + } + else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + } + else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xBE40DAE6); + } + } + else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); } } diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 5ffc23d..9d435fb 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 1e2c824..7e9b2ea 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -54,6 +54,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean chronomatronToggled; public static boolean superpairsToggled; public static boolean swapToPickBlockInExperimentsToggled; + public static boolean hideTooltipsInExperimentAddonsToggled; @Override public String getCommandName() { @@ -66,7 +67,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/pickblockinexperiments/watchermessage/list>"; + "startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/pickblockinexperiments/hidetooltipsinaddons/watchermessage/list>"; } @Override @@ -85,7 +86,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", "selectallterminal", "itemframeonsealanterns", "ultrasequencer", - "chronomatron", "superpairs", "pickblockinexperiments", "watchermessage", "list"); + "chronomatron", "superpairs", "pickblockinexperiments", "hidetooltipsinaddons", "watchermessage", "list"); } return null; } @@ -283,9 +284,14 @@ public class ToggleCommand extends CommandBase implements ICommand { break; case "pickblockinexperiments": swapToPickBlockInExperimentsToggled = !swapToPickBlockInExperimentsToggled; - ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", superpairsToggled); + ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", swapToPickBlockInExperimentsToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto-swap to pick block in experiments has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + swapToPickBlockInExperimentsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "hidetooltipsinaddons": + hideTooltipsInExperimentAddonsToggled = !hideTooltipsInExperimentAddonsToggled; + ConfigHandler.writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", hideTooltipsInExperimentAddonsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Hide tooltips in ultrasequencer and chronomatron has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + hideTooltipsInExperimentAddonsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "watchermessage": watcherReadyToggled = !watcherReadyToggled; ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", watcherReadyToggled); @@ -327,6 +333,8 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Ultra sequencer solver: " + DankersSkyblockMod.VALUE_COLOUR + ultrasequencerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Chronomatron solver: " + DankersSkyblockMod.VALUE_COLOUR + chronomatronToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Superpairs solver: " + DankersSkyblockMod.VALUE_COLOUR + superpairsToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Auto-swap to pick block in experiments: " + DankersSkyblockMod.VALUE_COLOUR + swapToPickBlockInExperimentsToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Hide tooltips in experiment addons: " + DankersSkyblockMod.VALUE_COLOUR + hideTooltipsInExperimentAddonsToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Watcher ready message: " + DankersSkyblockMod.VALUE_COLOUR + watcherReadyToggled )); break; diff --git a/src/main/java/me/Danker/gui/ExperimentsGui.java b/src/main/java/me/Danker/gui/ExperimentsGui.java index b27ff16..a363c5d 100644 --- a/src/main/java/me/Danker/gui/ExperimentsGui.java +++ b/src/main/java/me/Danker/gui/ExperimentsGui.java @@ -16,6 +16,7 @@ public class ExperimentsGui extends GuiScreen { private GuiButton chronomatron; private GuiButton superpairs; private GuiButton pickBlock; + private GuiButton hideTooltips; @Override public boolean doesGuiPauseGame() { @@ -35,13 +36,14 @@ public class ExperimentsGui extends GuiScreen { chronomatron = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Chronomatron Solver: " + Utils.getColouredBoolean(ToggleCommand.chronomatronToggled)); superpairs = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Superpairs Solver: " + Utils.getColouredBoolean(ToggleCommand.superpairsToggled)); pickBlock = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockInExperimentsToggled)); - + hideTooltips = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Hide Tooltips in Addons: " + Utils.getColouredBoolean(ToggleCommand.hideTooltipsInExperimentAddonsToggled)); this.buttonList.add(goBack); this.buttonList.add(ultrasequencer); this.buttonList.add(chronomatron); this.buttonList.add(superpairs); this.buttonList.add(pickBlock); + this.buttonList.add(hideTooltips); } @Override @@ -70,6 +72,10 @@ public class ExperimentsGui extends GuiScreen { ToggleCommand.swapToPickBlockInExperimentsToggled = !ToggleCommand.swapToPickBlockInExperimentsToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", ToggleCommand.swapToPickBlockInExperimentsToggled); pickBlock.displayString = "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockInExperimentsToggled); + } else if (button == hideTooltips) { + ToggleCommand.hideTooltipsInExperimentAddonsToggled = !ToggleCommand.hideTooltipsInExperimentAddonsToggled; + ConfigHandler.writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", ToggleCommand.hideTooltipsInExperimentAddonsToggled); + hideTooltips.displayString = "Hide Tooltips in Addons: " + Utils.getColouredBoolean(ToggleCommand.hideTooltipsInExperimentAddonsToggled); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 336e7c1..38c7d12 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -207,6 +207,7 @@ public class ConfigHandler { if (!hasKey("toggles", "Chronomatron")) writeBooleanConfig("toggles", "Chronomatron", false); if (!hasKey("toggles", "Superpairs")) writeBooleanConfig("toggles", "Superpairs", false); if (!hasKey("toggles", "PickBlockInExperiments")) writeBooleanConfig("toggles", "PickBlockInExperiments", false); + if (!hasKey("toggles", "HideTooltipsInExperimentAddons")) writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", false); if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); @@ -458,6 +459,7 @@ public class ConfigHandler { ToggleCommand.chronomatronToggled = getBoolean("toggles", "Chronomatron"); ToggleCommand.superpairsToggled = getBoolean("toggles", "Superpairs"); ToggleCommand.swapToPickBlockInExperimentsToggled = getBoolean("toggles", "PickBlockInExperiments"); + ToggleCommand.hideTooltipsInExperimentAddonsToggled = getBoolean("toggles", "HideTooltipsInExperimentAddons"); String onlySlayer = getString("toggles", "BlockSlayer"); if (!onlySlayer.equals("")) { diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index fbd8e4c..0f0a70b 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -280,7 +280,7 @@ public class Utils { GlStateManager.disableAlpha(); GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); GL11.glLineWidth(2); - GlStateManager.color(colour.getRed() / 255f, colour.getGreen() / 255f, colour.getBlue()/ 255f, colour.getAlpha() / 255f); + GlStateManager.color(colour.getRed() / 255f, colour.getGreen() / 255f, colour.getBlue() / 255f, colour.getAlpha() / 255f); worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION); worldRenderer.pos(pos1.xCoord, pos1.yCoord, pos1.zCoord).endVertex(); -- cgit From 82afdeaa57625b554850c9e0a9b06ab06bb8097d Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 10 Dec 2020 15:07:49 -0500 Subject: Add pet colors to config --- src/main/java/me/Danker/DankersSkyblockMod.java | 35 ++++++++++++++-------- .../java/me/Danker/handlers/ConfigHandler.java | 22 ++++++++++++++ 2 files changed, 45 insertions(+), 12 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index e7bc30d..3fe283c 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -166,6 +166,17 @@ public class DankersSkyblockMod public static String TRIVIA_WRONG_ANSWER_COLOUR; public static int LOWEST_BLAZE_COLOUR; public static int HIGHEST_BLAZE_COLOUR; + public static int PET_1_TO_9; + public static int PET_10_TO_19; + public static int PET_20_TO_29; + public static int PET_30_TO_39; + public static int PET_40_TO_49; + public static int PET_50_TO_59; + public static int PET_60_TO_69; + public static int PET_70_TO_79; + public static int PET_80_TO_89; + public static int PET_90_TO_99; + public static int PET_100; @EventHandler public void init(FMLInitializationEvent event) { @@ -3091,29 +3102,29 @@ public class DankersSkyblockMod int colour; int petLevel = Integer.parseInt(item.getDisplayName().substring(item.getDisplayName().indexOf(" ") + 1, item.getDisplayName().indexOf("]"))); if (petLevel == 100) { - colour = 0xBFF2D249; // Gold + colour = PET_100; } else if (petLevel >= 90) { - colour = 0xBF9E794E; // Brown + colour = PET_90_TO_99; } else if (petLevel >= 80) { - colour = 0xBF5C1F35; // idk weird magenta + colour = PET_80_TO_89; } else if (petLevel >= 70) { - colour = 0xBFD64FC8; // Pink + colour = PET_70_TO_79; } else if (petLevel >= 60) { - colour = 0xBF7E4FC6; // Purple + colour = PET_60_TO_69; } else if (petLevel >= 50) { - colour = 0xBF008AD8; // Light Blue + colour = PET_50_TO_59; } else if (petLevel >= 40) { - colour = 0xBF0EAC35; // Green + colour = PET_40_TO_49; } else if (petLevel >= 30) { - colour = 0xBFFFC400; // Yellow + colour = PET_30_TO_39; } else if (petLevel >= 20) { - colour = 0xBFEF5230; // Orange + colour = PET_20_TO_29; } else if (petLevel >= 10) { - colour = 0xBFD62440; // Red + colour = PET_10_TO_19; } else { - colour = 0xBF999999; // Gray + colour = PET_1_TO_9; } - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, colour); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, colour + 0xBF000000); } } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 23bd6c4..b2880a9 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -417,6 +417,17 @@ public class ConfigHandler { if (!hasKey("colors", "triviaWrongAnswer")) writeStringConfig("colors", "triviaWrongAnswer", EnumChatFormatting.RED.toString()); if (!hasKey("colors", "blazeLowest")) writeIntConfig("colors", "blazeLowest", 0xFF0000); if (!hasKey("colors", "blazeHighest")) writeIntConfig("colors", "blazeHighest", 0x40FF40); + if (!hasKey("colors", "pet1To9")) writeIntConfig("colors", "pet1To9", 0x999999); // Gray + if (!hasKey("colors", "pet10To19")) writeIntConfig("colors", "pet10To19", 0xD62440); // Red + if (!hasKey("colors", "pet20To29")) writeIntConfig("colors", "pet20To29", 0xEF5230); // Orange + if (!hasKey("colors", "pet30To39")) writeIntConfig("colors", "pet30To39", 0xFFC400); // Yellow + if (!hasKey("colors", "pet40To49")) writeIntConfig("colors", "pet40To49", 0x0EAC35); // Green + if (!hasKey("colors", "pet50To59")) writeIntConfig("colors", "pet50To59", 0x008AD8); // Light Blue + if (!hasKey("colors", "pet60To69")) writeIntConfig("colors", "pet60To69", 0x7E4FC6); // Purple + if (!hasKey("colors", "pet70To79")) writeIntConfig("colors", "pet70To79", 0xD64FC8); // Pink + if (!hasKey("colors", "pet80To89")) writeIntConfig("colors", "pet80To89", 0x5C1F35); // idk weird magenta + if (!hasKey("colors", "pet90To99")) writeIntConfig("colors", "pet90To99", 0x9E794E); // Brown + if (!hasKey("colors", "pet100")) writeIntConfig("colors", "pet100", 0xF2D249); // Gold ToggleCommand.gpartyToggled = getBoolean("toggles", "GParty"); ToggleCommand.coordsToggled = getBoolean("toggles", "Coords"); @@ -670,6 +681,17 @@ public class ConfigHandler { DankersSkyblockMod.TRIVIA_WRONG_ANSWER_COLOUR = getString("colors", "triviaWrongAnswer"); DankersSkyblockMod.LOWEST_BLAZE_COLOUR = getInt("colors", "blazeLowest"); DankersSkyblockMod.HIGHEST_BLAZE_COLOUR = getInt("colors", "blazeHighest"); + DankersSkyblockMod.PET_1_TO_9 = getInt("colors", "pet1To9"); + DankersSkyblockMod.PET_10_TO_19 = getInt("colors", "pet10To19"); + DankersSkyblockMod.PET_20_TO_29 = getInt("colors", "pet20To29"); + DankersSkyblockMod.PET_30_TO_39 = getInt("colors", "pet30To39"); + DankersSkyblockMod.PET_40_TO_49 = getInt("colors", "pet40To49"); + DankersSkyblockMod.PET_50_TO_59 = getInt("colors", "pet50To59"); + DankersSkyblockMod.PET_60_TO_69 = getInt("colors", "pet60To69"); + DankersSkyblockMod.PET_70_TO_79 = getInt("colors", "pet70To79"); + DankersSkyblockMod.PET_80_TO_89 = getInt("colors", "pet80To89"); + DankersSkyblockMod.PET_90_TO_99 = getInt("colors", "pet90To99"); + DankersSkyblockMod.PET_100 = getInt("colors", "pet100"); } } -- cgit From c650002f3cbab59fe69f1d0821f732de82c18de0 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 10 Dec 2020 15:08:34 -0500 Subject: Fix water answer location not saving correctly --- src/main/java/me/Danker/gui/EditLocationsGui.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java index 8519f1a..b610ae0 100644 --- a/src/main/java/me/Danker/gui/EditLocationsGui.java +++ b/src/main/java/me/Danker/gui/EditLocationsGui.java @@ -221,7 +221,7 @@ public class EditLocationsGui extends GuiScreen { ConfigHandler.writeIntConfig("locations", "cakeTimerY", MoveCommand.cakeTimerXY[1]); ConfigHandler.writeIntConfig("locations", "skillTrackerX", MoveCommand.skillTrackerXY[0]); ConfigHandler.writeIntConfig("locations", "skillTrackerY", MoveCommand.skillTrackerXY[1]); - ConfigHandler.writeIntConfig("locations", "waterAnswerX", MoveCommand.waterAnswerXY[1]); + ConfigHandler.writeIntConfig("locations", "waterAnswerX", MoveCommand.waterAnswerXY[0]); ConfigHandler.writeIntConfig("locations", "waterAnswerY", MoveCommand.waterAnswerXY[1]); } -- cgit From 1af555fd7191f99052da64c044be1059d4777b8f Mon Sep 17 00:00:00 2001 From: Sychic Date: Fri, 11 Dec 2020 12:01:38 -0500 Subject: minor rearrangement and addition of out of mana and ability cooldown message toggles --- src/main/java/me/Danker/DankersSkyblockMod.java | 10 +++++ .../java/me/Danker/commands/ToggleCommand.java | 48 ++++++++++++++-------- .../java/me/Danker/handlers/ConfigHandler.java | 25 +++++++---- 3 files changed, 60 insertions(+), 23 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 2c75a0e..7e67d6c 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -464,6 +464,16 @@ public class DankersSkyblockMod event.setCanceled(true); return; } + // Ability Cooldown + if (!ToggleCommand.cooldownMessages && message.contains("This ability is currently on cooldown for") && message.contains("more second")) { + event.setCanceled(true); + return; + } + // Out of mana messages + if (!ToggleCommand.manaMessages && message.contains("You do not have enough mana to do this!")) { + event.setCanceled(true); + return; + } if (!ToggleCommand.implosionMessages) { if (message.contains("Your Implosion hit ") || message.contains("There are blocks in the way")) { diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 5c473e5..b94bc16 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -23,17 +23,21 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean spiritBearAlerts; public static boolean aotdToggled; public static boolean lividDaggerToggled; - public static boolean sceptreMessages; public static boolean petColoursToggled; public static boolean dungeonTimerToggled; public static boolean golemAlertToggled; public static boolean expertiseLoreToggled; public static boolean skill50DisplayToggled; public static boolean outlineTextToggled; + public static boolean cakeTimerToggled; + // Chat Messages + public static boolean sceptreMessages; public static boolean midasStaffMessages; public static boolean implosionMessages; public static boolean healMessages; - public static boolean cakeTimerToggled; + public static boolean cooldownMessages; + public static boolean manaMessages; + // Dungeons Messages public static boolean lowHealthNotifyToggled; public static boolean lividSolverToggled; public static boolean stopSalvageStarredToggled; @@ -61,30 +65,30 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " "; + return "/" + getCommandName() + " "; } @Override public int getRequiredPermissionLevel() { return 0; } - + @Override public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", - "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", - "sceptremessages", "petcolors", "dungeontimer", "golemalerts", - "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", - "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", - "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", - "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", - "selectallterminal", "itemframeonsealanterns", "ultrasequencer", - "chronomatron", "superpairs", "pickblockinexperiments", "list"); + "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", + "petcolors", "dungeontimer", "golemalerts", "expertiselore", + "skill50display", "outlinetext","sceptremessages", "midasstaffmessages", + "implosionmessages", "healmessages", "manamessages", "cooldownmessages","caketimer", + "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", + "selectallterminal", "itemframeonsealanterns", "ultrasequencer", + "chronomatron", "superpairs", "pickblockinexperiments", "list"); } return null; } @@ -169,6 +173,16 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "HealMessages", healMessages); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Heal messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + healMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "cooldownmessages": + cooldownMessages = !cooldownMessages; + ConfigHandler.writeBooleanConfig("toggles", "CooldownMessages", cooldownMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ability cooldown messages has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + cooldownMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "manamessages": + manaMessages = !manaMessages; + ConfigHandler.writeBooleanConfig("toggles", "ManaMessages", manaMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Out of mana messages has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + manaMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "petcolors": case "petcolours": petColoursToggled = !petColoursToggled; @@ -300,6 +314,8 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Midas Staff messages: " + DankersSkyblockMod.VALUE_COLOUR + midasStaffMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Implosion messages: " + DankersSkyblockMod.VALUE_COLOUR + implosionMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Heal messages: " + DankersSkyblockMod.VALUE_COLOUR + healMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Ability cooldown messages: " + DankersSkyblockMod.VALUE_COLOUR + cooldownMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Out of mana messages: " + DankersSkyblockMod.VALUE_COLOUR + manaMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Pet colours: " + DankersSkyblockMod.VALUE_COLOUR + petColoursToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Dungeon timer: " + DankersSkyblockMod.VALUE_COLOUR + dungeonTimerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Golem spawn alerts: " + DankersSkyblockMod.VALUE_COLOUR + golemAlertToggled + "\n" + diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 23bd6c4..2e4b43e 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -177,18 +177,25 @@ public class ConfigHandler { if (!hasKey("toggles", "SpiritBearAlerts")) writeBooleanConfig("toggles", "SpiritBearAlerts", true); if (!hasKey("toggles", "AOTD")) writeBooleanConfig("toggles", "AOTD", false); if (!hasKey("toggles", "LividDagger")) writeBooleanConfig("toggles", "LividDagger", false); - if (!hasKey("toggles", "SceptreMessages")) writeBooleanConfig("toggles", "SceptreMessages", true); if (!hasKey("toggles", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true); if (!hasKey("toggles", "ImplosionMessages")) writeBooleanConfig("toggles", "ImplosionMessages", true); if (!hasKey("toggles", "HealMessages")) writeBooleanConfig("toggles", "HealMessages", true); if (!hasKey("toggles", "PetColors")) writeBooleanConfig("toggles", "PetColors", false); - if (!hasKey("toggles", "DungeonTimer")) writeBooleanConfig("toggles", "DungeonTimer", false); if (!hasKey("toggles", "BlockSlayer")) writeStringConfig("toggles", "BlockSlayer", ""); if (!hasKey("toggles", "GolemAlerts")) writeBooleanConfig("toggles", "GolemAlerts", false); if (!hasKey("toggles", "ExpertiseLore")) writeBooleanConfig("toggles", "ExpertiseLore", true); if (!hasKey("toggles", "Skill50Display")) writeBooleanConfig("toggles", "Skill50Display", false); if (!hasKey("toggles", "OutlineText")) writeBooleanConfig("toggles", "OutlineText", false); if (!hasKey("toggles", "CakeTimer")) writeBooleanConfig("toggles", "CakeTimer", false); + // Chat Messages + if (!hasKey("toggles", "SceptreMessages")) writeBooleanConfig("toggles", "SceptreMessages", true); + if (!hasKey("toggles", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true); + if (!hasKey("toggles", "ImplosionMessages")) writeBooleanConfig("toggles", "ImplosionMessages", true); + if (!hasKey("toggles", "HealMessages")) writeBooleanConfig("toggles", "HealMessages", true); + if (!hasKey("toggles", "CooldownMessages")) writeBooleanConfig("toggles","CooldownMessages",true); + if (!hasKey("toggles", "ManaMessages")) writeBooleanConfig("toggles","ManaMessages",true); + // Dungeons + if (!hasKey("toggles", "DungeonTimer")) writeBooleanConfig("toggles", "DungeonTimer", false); if (!hasKey("toggles", "LowHealthNotify")) writeBooleanConfig("toggles", "LowHealthNotify", false); if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false); if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); @@ -428,17 +435,21 @@ public class ConfigHandler { ToggleCommand.spiritBearAlerts = getBoolean("toggles", "SpiritBearAlerts"); ToggleCommand.aotdToggled = getBoolean("toggles", "AOTD"); ToggleCommand.lividDaggerToggled = getBoolean("toggles", "LividDagger"); - ToggleCommand.sceptreMessages = getBoolean("toggles", "SceptreMessages"); - ToggleCommand.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages"); - ToggleCommand.implosionMessages = getBoolean("toggles", "ImplosionMessages"); - ToggleCommand.healMessages = getBoolean("toggles", "HealMessages"); ToggleCommand.petColoursToggled = getBoolean("toggles", "PetColors"); - ToggleCommand.dungeonTimerToggled = getBoolean("toggles", "DungeonTimer"); ToggleCommand.golemAlertToggled = getBoolean("toggles", "GolemAlerts"); ToggleCommand.expertiseLoreToggled = getBoolean("toggles", "ExpertiseLore"); ToggleCommand.skill50DisplayToggled = getBoolean("toggles", "Skill50Display"); ToggleCommand.outlineTextToggled = getBoolean("toggles", "OutlineText"); ToggleCommand.cakeTimerToggled = getBoolean("toggles", "CakeTimer"); + // Chat Messages + ToggleCommand.sceptreMessages = getBoolean("toggles", "SceptreMessages"); + ToggleCommand.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages"); + ToggleCommand.implosionMessages = getBoolean("toggles", "ImplosionMessages"); + ToggleCommand.healMessages = getBoolean("toggles", "HealMessages"); + ToggleCommand.cooldownMessages = getBoolean("toggles", "CooldownMessages"); + ToggleCommand.manaMessages = getBoolean("toggles", "ManaMessages"); + //Dungeons + ToggleCommand.dungeonTimerToggled = getBoolean("toggles", "DungeonTimer"); ToggleCommand.lowHealthNotifyToggled = getBoolean("toggles", "LowHealthNotify"); ToggleCommand.lividSolverToggled = getBoolean("toggles", "LividSolver"); ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); -- cgit From cc01445451740f9f1774d66ef7bf3ad93316f8f2 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Fri, 11 Dec 2020 14:05:23 -0500 Subject: Fix issues with select all color terminal --- src/main/java/me/Danker/DankersSkyblockMod.java | 20 +++++++++++++++----- src/main/java/me/Danker/utils/Utils.java | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 3fe283c..8781645 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -67,6 +67,7 @@ import java.awt.*; import java.text.NumberFormat; import java.util.List; import java.util.*; +import java.util.regex.Matcher; import java.util.regex.Pattern; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) @@ -78,7 +79,8 @@ public class DankersSkyblockMod static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); - public static Pattern pattern = Pattern.compile(""); + public static Pattern t6EnchantPattern = Pattern.compile(""); + static Pattern petPattern = Pattern.compile("\\[Lvl [\\d]{1,3}]"); static boolean updateChecked = false; public static int titleTimer = -1; public static boolean showTitle = false; @@ -115,6 +117,7 @@ public class DankersSkyblockMod static boolean inWaterRoom = false; static String waterAnswers = null; static AxisAlignedBB correctTicTacToeButton = null; + static Pattern startsWithTerminalPattern = Pattern.compile("[A-Z]{2,}"); static Slot[] clickInOrderSlots = new Slot[36]; static int lastChronomatronRound = 0; static List chronomatronPattern = new ArrayList<>(); @@ -257,7 +260,7 @@ public class DankersSkyblockMod "Booger Dragon", "Older Dragon", "Elder Dragon", "Stable Dragon", "Professor Dragon"}); String patternString = "(" + String.join("|", t6Enchants.keySet()) + ")"; - pattern = Pattern.compile(patternString); + t6EnchantPattern = Pattern.compile(patternString); keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); @@ -3092,7 +3095,6 @@ public class DankersSkyblockMod int chestSize = inventory.inventorySlots.inventorySlots.size(); if (ToggleCommand.petColoursToggled) { - Pattern petPattern = Pattern.compile("\\[Lvl [\\d]{1,3}]"); for (Slot slot : invSlots) { ItemStack item = slot.getStack(); if (item == null) continue; @@ -3141,11 +3143,19 @@ public class DankersSkyblockMod } if (ToggleCommand.selectAllToggled && Utils.inDungeons && displayName.startsWith("Select all the")) { - String colour = displayName.split(" ")[3]; + String colour; + List colourParts = new ArrayList<>(); + Matcher colourMatcher = startsWithTerminalPattern.matcher(displayName); + while (colourMatcher.find()) { + colourParts.add(colourMatcher.group()); + } + colour = String.join(" ", colourParts); + for (Slot slot : invSlots) { ItemStack item = slot.getStack(); if (item == null) continue; - if (item.getDisplayName().toUpperCase().contains(colour)) { + String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); + if (itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))) { Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } } diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index fbd8e4c..7f474c9 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -64,7 +64,7 @@ public class Utils { } public static String returnGoldenEnchants(String line) { - Matcher matcher = DankersSkyblockMod.pattern.matcher(line); + Matcher matcher = DankersSkyblockMod.t6EnchantPattern.matcher(line); StringBuffer out = new StringBuffer(); while (matcher.find()) { -- cgit From c91677bc9c6aeeed2eb52ae2e5477aba1a3be853 Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Fri, 11 Dec 2020 16:03:57 -0500 Subject: Extend Auto-Swap to Pick Block Extended the auto-swap to pick block feature to F7 terminals and Melody's Harp; consolidated it all into one button. --- src/main/java/me/Danker/DankersSkyblockMod.java | 18 +++++++------ src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/ToggleCommand.java | 30 +++++++++++----------- src/main/java/me/Danker/gui/DankerGui.java | 12 ++++++--- src/main/java/me/Danker/gui/ExperimentsGui.java | 9 +------ .../java/me/Danker/handlers/ConfigHandler.java | 6 +++-- 6 files changed, 40 insertions(+), 37 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 2362ddb..f8781c3 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -68,6 +68,7 @@ import java.text.NumberFormat; import java.util.List; import java.util.*; import java.util.regex.Pattern; +import java.util.regex.Matcher; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) public class DankersSkyblockMod @@ -443,8 +444,8 @@ public class DankersSkyblockMod if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { watcherClearTime = System.currentTimeMillis() / 1000; } - if (message.contains("[BOSS] The Watcher: That will be enough for now.") && ToggleCommand.watcherReadyToggled && Utils.inDungeons) { - Utils.createTitle(EnumChatFormatting.RED + "WATCHER READY", 2); + if (message.contains("[BOSS] The Watcher: That will be enough for now.")) { + if (ToggleCommand.watcherReadyToggled) Utils.createTitle(EnumChatFormatting.RED + "WATCHER READY", 2); } if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { puzzleFails++; @@ -467,7 +468,7 @@ public class DankersSkyblockMod event.setCanceled(true); return; } - + // Implosion if (!ToggleCommand.implosionMessages) { if (message.contains("Your Implosion hit ") || message.contains("There are blocks in the way")) { event.setCanceled(true); @@ -3049,8 +3050,8 @@ public class DankersSkyblockMod GuiChest chest = (GuiChest) event.gui; IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); String inventoryName = inventory.getDisplayName().getUnformattedText(); - if (ToggleCommand.swapToPickBlockInExperimentsToggled) { - if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (")) { + if (ToggleCommand.swapToPickBlockToggled) { + if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Harp -")) { if (!pickBlockBindSwapped) { pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode(); gameSettings.keyBindPickBlock.setKeyCode(-100); @@ -3138,14 +3139,15 @@ public class DankersSkyblockMod } if (ToggleCommand.selectAllToggled && Utils.inDungeons && displayName.startsWith("Select all the")) { - String colour = displayName.split(" ")[3]; + String colour = displayName.split(" ")[3]; + for (Slot slot : invSlots) { ItemStack item = slot.getStack(); if (item == null) continue; if (item.getDisplayName().toUpperCase().contains(colour)) { Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); - } - } + } + } } if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 9d435fb..395f40d 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 7e9b2ea..172411c 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -38,6 +38,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean lividSolverToggled; public static boolean stopSalvageStarredToggled; public static boolean watcherReadyToggled; + public static boolean swapToPickBlockToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -53,7 +54,6 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean ultrasequencerToggled; public static boolean chronomatronToggled; public static boolean superpairsToggled; - public static boolean swapToPickBlockInExperimentsToggled; public static boolean hideTooltipsInExperimentAddonsToggled; @Override @@ -67,7 +67,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/pickblockinexperiments/hidetooltipsinaddons/watchermessage/list>"; + "watchermessage/startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -84,9 +84,9 @@ public class ToggleCommand extends CommandBase implements ICommand { "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", - "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", + "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "itemframeonsealanterns", "ultrasequencer", - "chronomatron", "superpairs", "pickblockinexperiments", "hidetooltipsinaddons", "watchermessage", "list"); + "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } return null; } @@ -252,6 +252,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "TicTacToePuzzle", ticTacToeToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Tic tac toe puzzle solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + ticTacToeToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "watchermessage": + watcherReadyToggled = !watcherReadyToggled; + ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", watcherReadyToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display Watcher ready message has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + watcherReadyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "startswithterminal": startsWithToggled = !startsWithToggled; ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", startsWithToggled); @@ -282,20 +287,15 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "Superpairs", superpairsToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Superpairs solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + superpairsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; - case "pickblockinexperiments": - swapToPickBlockInExperimentsToggled = !swapToPickBlockInExperimentsToggled; - ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", swapToPickBlockInExperimentsToggled); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto-swap to pick block in experiments has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + swapToPickBlockInExperimentsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); - break; case "hidetooltipsinaddons": hideTooltipsInExperimentAddonsToggled = !hideTooltipsInExperimentAddonsToggled; ConfigHandler.writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", hideTooltipsInExperimentAddonsToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Hide tooltips in ultrasequencer and chronomatron has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + hideTooltipsInExperimentAddonsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; - case "watchermessage": - watcherReadyToggled = !watcherReadyToggled; - ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", watcherReadyToggled); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display Watcher ready message has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + watcherReadyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + case "pickblock": + swapToPickBlockToggled = !swapToPickBlockToggled; + ConfigHandler.writeBooleanConfig("toggles", "PickBlock", swapToPickBlockToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto-swap to pick block has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + swapToPickBlockToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "list": player.addChatMessage(new ChatComponentText(DankersSkyblockMod.TYPE_COLOUR + "Guild party notifications: " + DankersSkyblockMod.VALUE_COLOUR + gpartyToggled + "\n" + @@ -327,15 +327,15 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Creeper puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + creeperToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Water puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + waterToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Tic tac toe puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + ticTacToeToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Watcher ready message: " + DankersSkyblockMod.VALUE_COLOUR + watcherReadyToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Starts with letter terminal solver: " + DankersSkyblockMod.VALUE_COLOUR + startsWithToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Select all color items terminal solver: " + DankersSkyblockMod.VALUE_COLOUR + selectAllToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Ignore item frames on sea lanterns: " + DankersSkyblockMod.VALUE_COLOUR + itemFrameOnSeaLanternsToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Ultra sequencer solver: " + DankersSkyblockMod.VALUE_COLOUR + ultrasequencerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Chronomatron solver: " + DankersSkyblockMod.VALUE_COLOUR + chronomatronToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Superpairs solver: " + DankersSkyblockMod.VALUE_COLOUR + superpairsToggled + "\n" + - DankersSkyblockMod.TYPE_COLOUR + " Auto-swap to pick block in experiments: " + DankersSkyblockMod.VALUE_COLOUR + swapToPickBlockInExperimentsToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Hide tooltips in experiment addons: " + DankersSkyblockMod.VALUE_COLOUR + hideTooltipsInExperimentAddonsToggled + "\n" + - DankersSkyblockMod.TYPE_COLOUR + " Watcher ready message: " + DankersSkyblockMod.VALUE_COLOUR + watcherReadyToggled + DankersSkyblockMod.TYPE_COLOUR + " Auto-swap to pick block " + DankersSkyblockMod.VALUE_COLOUR + swapToPickBlockToggled )); break; default: diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index c676d5c..613e968 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -55,6 +55,7 @@ public class DankerGui extends GuiScreen { private GuiButton lividSolver; private GuiButton stopSalvageStarred; private GuiButton watcherReadyMessage; + private GuiButton pickBlock; public DankerGui(int page) { this.page = page; @@ -87,7 +88,7 @@ public class DankerGui extends GuiScreen { experimentationTableSolvers = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Toggle Experimentation Table Solvers"); skillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Toggle Skill XP/Hour Tracking"); outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled)); - splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + pickBlock = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled)); // Page 2 coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); @@ -115,7 +116,7 @@ public class DankerGui extends GuiScreen { // Page 5 stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); - + splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); switch (page) { case 1: this.buttonList.add(changeDisplay); @@ -124,7 +125,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(experimentationTableSolvers); this.buttonList.add(skillTracker); this.buttonList.add(outlineText); - this.buttonList.add(splitFishing); + this.buttonList.add(pickBlock); this.buttonList.add(nextPage); break; case 2: @@ -163,6 +164,7 @@ public class DankerGui extends GuiScreen { case 5: this.buttonList.add(stopSalvageStarred); this.buttonList.add(watcherReadyMessage); + this.buttonList.add(splitFishing); this.buttonList.add(backPage); break; } @@ -311,6 +313,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.watcherReadyToggled = !ToggleCommand.watcherReadyToggled; ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", ToggleCommand.watcherReadyToggled); watcherReadyMessage.displayString = "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled); + } else if (button == pickBlock) { + ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; + ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); + pickBlock.displayString = "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled); } } diff --git a/src/main/java/me/Danker/gui/ExperimentsGui.java b/src/main/java/me/Danker/gui/ExperimentsGui.java index a363c5d..c3f4f47 100644 --- a/src/main/java/me/Danker/gui/ExperimentsGui.java +++ b/src/main/java/me/Danker/gui/ExperimentsGui.java @@ -15,7 +15,6 @@ public class ExperimentsGui extends GuiScreen { private GuiButton ultrasequencer; private GuiButton chronomatron; private GuiButton superpairs; - private GuiButton pickBlock; private GuiButton hideTooltips; @Override @@ -35,14 +34,12 @@ public class ExperimentsGui extends GuiScreen { ultrasequencer = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Ultrasequencer Solver: " + Utils.getColouredBoolean(ToggleCommand.ultrasequencerToggled)); chronomatron = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Chronomatron Solver: " + Utils.getColouredBoolean(ToggleCommand.chronomatronToggled)); superpairs = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Superpairs Solver: " + Utils.getColouredBoolean(ToggleCommand.superpairsToggled)); - pickBlock = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockInExperimentsToggled)); - hideTooltips = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Hide Tooltips in Addons: " + Utils.getColouredBoolean(ToggleCommand.hideTooltipsInExperimentAddonsToggled)); + hideTooltips = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Hide Tooltips in Addons: " + Utils.getColouredBoolean(ToggleCommand.hideTooltipsInExperimentAddonsToggled)); this.buttonList.add(goBack); this.buttonList.add(ultrasequencer); this.buttonList.add(chronomatron); this.buttonList.add(superpairs); - this.buttonList.add(pickBlock); this.buttonList.add(hideTooltips); } @@ -68,10 +65,6 @@ public class ExperimentsGui extends GuiScreen { ToggleCommand.superpairsToggled = !ToggleCommand.superpairsToggled; ConfigHandler.writeBooleanConfig("toggles", "Superpairs", ToggleCommand.superpairsToggled); superpairs.displayString = "Superpairs Solver: " + Utils.getColouredBoolean(ToggleCommand.superpairsToggled); - } else if (button == pickBlock) { - ToggleCommand.swapToPickBlockInExperimentsToggled = !ToggleCommand.swapToPickBlockInExperimentsToggled; - ConfigHandler.writeBooleanConfig("toggles", "PickBlockInExperiments", ToggleCommand.swapToPickBlockInExperimentsToggled); - pickBlock.displayString = "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockInExperimentsToggled); } else if (button == hideTooltips) { ToggleCommand.hideTooltipsInExperimentAddonsToggled = !ToggleCommand.hideTooltipsInExperimentAddonsToggled; ConfigHandler.writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", ToggleCommand.hideTooltipsInExperimentAddonsToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 38c7d12..e8322ea 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -193,6 +193,7 @@ public class ConfigHandler { if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false); if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); if (!hasKey("toggles", "WatcherReadyMessage")) writeBooleanConfig("toggles", "WatcherReadyMessage", false); + if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); @@ -203,10 +204,10 @@ public class ConfigHandler { if (!hasKey("toggles", "StartsWithTerminal")) writeBooleanConfig("toggles", "StartsWithTerminal", false); if (!hasKey("toggles", "SelectAllTerminal")) writeBooleanConfig("toggles", "SelectAllTerminal", false); if (!hasKey("toggles", "IgnoreItemFrameOnSeaLanterns")) writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", false); + // Experiment Solvers if (!hasKey("toggles", "UltraSequencer")) writeBooleanConfig("toggles", "UltraSequencer", false); if (!hasKey("toggles", "Chronomatron")) writeBooleanConfig("toggles", "Chronomatron", false); if (!hasKey("toggles", "Superpairs")) writeBooleanConfig("toggles", "Superpairs", false); - if (!hasKey("toggles", "PickBlockInExperiments")) writeBooleanConfig("toggles", "PickBlockInExperiments", false); if (!hasKey("toggles", "HideTooltipsInExperimentAddons")) writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", false); @@ -445,6 +446,7 @@ public class ConfigHandler { ToggleCommand.lividSolverToggled = getBoolean("toggles", "LividSolver"); ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); ToggleCommand.watcherReadyToggled = getBoolean("toggles", "WatcherReadyMessage"); + ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle"); @@ -455,10 +457,10 @@ public class ConfigHandler { ToggleCommand.startsWithToggled = getBoolean("toggles", "StartsWithTerminal"); ToggleCommand.selectAllToggled = getBoolean("toggles", "SelectAllTerminal"); ToggleCommand.itemFrameOnSeaLanternsToggled = getBoolean("toggles", "IgnoreItemFrameOnSeaLanterns"); + // Experiment Solvers ToggleCommand.ultrasequencerToggled = getBoolean("toggles", "UltraSequencer"); ToggleCommand.chronomatronToggled = getBoolean("toggles", "Chronomatron"); ToggleCommand.superpairsToggled = getBoolean("toggles", "Superpairs"); - ToggleCommand.swapToPickBlockInExperimentsToggled = getBoolean("toggles", "PickBlockInExperiments"); ToggleCommand.hideTooltipsInExperimentAddonsToggled = getBoolean("toggles", "HideTooltipsInExperimentAddons"); String onlySlayer = getString("toggles", "BlockSlayer"); -- cgit From 15a89aeb93855b9c64631a18c3cb76cc7b2ce735 Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Fri, 11 Dec 2020 16:19:19 -0500 Subject: Update DankersSkyblockMod.java --- src/main/java/me/Danker/DankersSkyblockMod.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index f8781c3..b3622bb 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3139,9 +3139,7 @@ public class DankersSkyblockMod } if (ToggleCommand.selectAllToggled && Utils.inDungeons && displayName.startsWith("Select all the")) { - String colour = displayName.split(" ")[3]; - - for (Slot slot : invSlots) { + for (Slot slot : invSlots) { ItemStack item = slot.getStack(); if (item == null) continue; if (item.getDisplayName().toUpperCase().contains(colour)) { -- cgit From 44dfd58f89c377df96b09cd42d8a50e8b5a57bac Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Fri, 11 Dec 2020 16:27:10 -0500 Subject: Update DankersSkyblockMod.java --- src/main/java/me/Danker/DankersSkyblockMod.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index e92c0e5..dba0549 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -69,7 +69,6 @@ import java.util.List; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.regex.Matcher; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) public class DankersSkyblockMod -- cgit From 73cf5c04104b92d733240548533d431c1defb5a3 Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Fri, 11 Dec 2020 17:27:52 -0500 Subject: Update Debug Added watchermessage and pickblock variables --- src/main/java/me/Danker/commands/DankerGuiCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index cde5b31..b10980f 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -70,7 +70,8 @@ public class DankerGuiCommand extends CommandBase { debug.append("[ultrasequencer][").append(ToggleCommand.ultrasequencerToggled).append("]\n"); debug.append("[chronomatron][").append(ToggleCommand.chronomatronToggled).append("]\n"); debug.append("[superpairs][").append(ToggleCommand.superpairsToggled).append("]\n"); - debug.append("[pickblockinexperiments][").append(ToggleCommand.swapToPickBlockInExperimentsToggled).append("]\n"); + debug.append("[pickblock][").append(ToggleCommand.swapToPickBlockToggled).append("]\n"); + debug.append("[watchermessage][").append(ToggleCommand.watcherReadyToggled).append("]\n"); debug.append("# Locations\n"); debug.append("[coords][").append(MoveCommand.coordsXY[0]).append(", ").append(MoveCommand.coordsXY[1]).append("]\n"); debug.append("[display][").append(MoveCommand.displayXY[0]).append(", ").append(MoveCommand.displayXY[1]).append("]\n"); -- cgit From f3009ab52d8b70af31ac3e1ba768f7bba852f485 Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Fri, 11 Dec 2020 17:41:44 -0500 Subject: Update version --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 02b9d3c..b408295 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta1" +version = "1.8.5-beta2" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index dba0549..492598c 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -74,7 +74,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta1"; + public static final String VERSION = "1.8.5-beta2"; static double checkItemsNow = 0; static double itemsChecked = 0; -- cgit From 47910bc70961bd39d43cfdcbee103949559459c1 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Fri, 11 Dec 2020 18:03:57 -0500 Subject: Fix crash with NEU --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 28 ++++++++++++++++++------- 2 files changed, 22 insertions(+), 8 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index b408295..d5bc118 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta2" +version = "1.8.5-beta3" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 492598c..64a1f5b 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -74,7 +74,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta2"; + public static final String VERSION = "1.8.5-beta3"; static double checkItemsNow = 0; static double itemsChecked = 0; @@ -2277,10 +2277,6 @@ public class DankersSkyblockMod IInventory inv = chest.getLowerChestInventory(); String chestName = inv.getDisplayName().getUnformattedText(); - if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { - event.toolTip.clear(); - } - if (ToggleCommand.superpairsToggled && chestName.contains("Superpairs (")) { if (Item.getIdFromItem(item.getItem()) != 95) return; if (item.getDisplayName().contains("Click any button") || item.getDisplayName().contains("Click a second button") || item.getDisplayName().contains("Next button is instantly rewarded") || item.getDisplayName().contains("Stained Glass")) { @@ -2300,10 +2296,28 @@ public class DankersSkyblockMod } } - } - + } } + @SubscribeEvent(priority = EventPriority.LOW) + public void onTooltipLow(ItemTooltipEvent event) { + if (!Utils.inSkyblock) return; + if (event.toolTip == null) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + + if (mc.currentScreen instanceof GuiChest) { + ContainerChest chest = (ContainerChest) player.openContainer; + IInventory inv = chest.getLowerChestInventory(); + String chestName = inv.getDisplayName().getUnformattedText(); + + if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { + event.toolTip.clear(); + } + } + } + @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { if (event.phase != Phase.START) return; -- cgit From f04296de38493e1eb00a9e6351a0b821b3c0fff1 Mon Sep 17 00:00:00 2001 From: Sychic Date: Fri, 11 Dec 2020 19:15:20 -0500 Subject: resolve conflicts --- README.md | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- .../java/me/Danker/commands/ToggleCommand.java | 24 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src/main/java/me') diff --git a/README.md b/README.md index b07a462..0d794cb 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Discord Server: https://discord.gg/QsEkNQS ## Commands - /dhelp - Returns this message in-game. - /dsm - Opens the GUI for Danker's Skyblock Mod. -- /toggle - Toggles features. /toggle list returns values of every toggle. +- /toggle - Toggles features. /toggle list returns values of every toggle. - /setkey - Sets API key. - /getkey - Returns key set with /setkey and copies it to your clipboard. - /loot [winter/spooky/f(1-7)/session] - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead. diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 7e67d6c..c8eaff5 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -474,7 +474,7 @@ public class DankersSkyblockMod event.setCanceled(true); return; } - + // Implosion if (!ToggleCommand.implosionMessages) { if (message.contains("Your Implosion hit ") || message.contains("There are blocks in the way")) { event.setCanceled(true); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index b94bc16..d9a5805 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -66,10 +66,10 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " "; + "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + + "outlinetext/midasstaffmessages/implosionmessages/healmessages/cooldownmessages/manamessages/caketimer/lowhealthnotify/" + + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + + "watchermessage/startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -81,14 +81,14 @@ public class ToggleCommand extends CommandBase implements ICommand { public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", - "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", - "petcolors", "dungeontimer", "golemalerts", "expertiselore", - "skill50display", "outlinetext","sceptremessages", "midasstaffmessages", - "implosionmessages", "healmessages", "manamessages", "cooldownmessages","caketimer", - "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", - "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "startswithterminal", - "selectallterminal", "itemframeonsealanterns", "ultrasequencer", - "chronomatron", "superpairs", "pickblockinexperiments", "list"); + "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", + "sceptremessages", "petcolors", "dungeontimer", "golemalerts", + "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", + "implosionmessages", "healmessages", "cooldownmessages", "manamessages", "caketimer", "lowhealthnotify", + "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", + "selectallterminal", "itemframeonsealanterns", "ultrasequencer", + "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } return null; } -- cgit From 1b49ec8892a8a158c2dea99d705ae39ff7dd0a8d Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 12 Dec 2020 18:18:21 -0500 Subject: Block Wrong Terminal Clicks + Fixes Blocks wrong terminal clicks Fixes bug where bind isn't swapped back after terminal --- src/main/java/me/Danker/DankersSkyblockMod.java | 98 +++++++++++++++++++++- .../java/me/Danker/commands/ToggleCommand.java | 10 ++- src/main/java/me/Danker/gui/PuzzleSolversGui.java | 9 +- .../java/me/Danker/handlers/ConfigHandler.java | 2 + 4 files changed, 115 insertions(+), 4 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 64a1f5b..98a97af 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -7,6 +7,7 @@ import me.Danker.handlers.*; import me.Danker.utils.TicTacToeUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; +import net.minecraft.block.BlockColored; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.Gui; @@ -3033,6 +3034,96 @@ public class DankersSkyblockMod } } + if (ToggleCommand.blockWrongTerminalClicksToggled && Utils.inDungeons) { + boolean shouldCancel = false; + + if (item == null) return; + + //most of these are extra but who cares + + switch(inventoryName) { + case "Correct all the panes!": + shouldCancel = !StringUtils.stripControlCodes(item.getDisplayName()).startsWith("Off"); + break; + case "Navigate the maze!": + if((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { + shouldCancel = true; + break; + } + + if(item.getItemDamage() != 0) { + shouldCancel = true; + break; + } + + boolean isValid = false; + + int slotIndex = mouseSlot.getSlotIndex(); + + if(slotIndex % 9 != 0 && slotIndex != 53) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1); + if(itemStack.getItemDamage() == 5) isValid = true; + } + + if(!isValid && slotIndex % 9 != 8 && slotIndex != 0) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1); + if(itemStack.getItemDamage() == 5) isValid = true; + } + + if(!isValid && slotIndex <= 44) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex + 9); + if(itemStack.getItemDamage() == 5) isValid = true; + } + + if(!isValid && slotIndex >= 9) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex - 9); + if(itemStack.getItemDamage() == 5) isValid = true; + } + + shouldCancel = !isValid; + + break; + case "Click in order!": + if((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { + shouldCancel = true; + break; + } + if(item.getItemDamage() != 14) { + shouldCancel = true; + break; + } + int needed = 0; + for(int i = 10; i <= 25; i++) { + if(i == 17 || i == 18) continue; + ItemStack itemStack = inventory.getStackInSlot(i); + if(!itemStack.getDisplayName().contains(EnumChatFormatting.GREEN.toString())) continue; + if(itemStack.stackSize > needed) needed = itemStack.stackSize; + } + shouldCancel = item.stackSize != needed; + break; + } + + if(!shouldCancel) { + if(inventoryName.startsWith("What starts with:")) { + char letter = inventoryName.charAt(inventoryName.indexOf("'") + 1); + shouldCancel = !(StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter); + } else if(inventoryName.startsWith("Select all the")) { + String colour; + List colourParts = new ArrayList<>(); + Matcher colourMatcher = startsWithTerminalPattern.matcher(inventoryName); + while (colourMatcher.find()) { + colourParts.add(colourMatcher.group()); + } + colour = String.join(" ", colourParts); + + String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); + shouldCancel = !(itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))); + } + } + + event.setCanceled(shouldCancel && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)); + } + if (!BlockSlayerCommand.onlySlayerName.equals("") && item != null) { if (inventoryName.equals("Slayer")) { if (!item.getDisplayName().contains("Revenant Horror") && !item.getDisplayName().contains("Tarantula Broodfather") && !item.getDisplayName().contains("Sven Packmaster")) return; @@ -3078,7 +3169,7 @@ public class DankersSkyblockMod IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); String inventoryName = inventory.getDisplayName().getUnformattedText(); if (ToggleCommand.swapToPickBlockToggled) { - if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Harp -")) { + if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) { if (!pickBlockBindSwapped) { pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode(); gameSettings.keyBindPickBlock.setKeyCode(-100); @@ -3092,6 +3183,11 @@ public class DankersSkyblockMod } } } + } else { + if (pickBlockBindSwapped) { + gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); + pickBlockBindSwapped = false; + } } clickInOrderSlots = new Slot[36]; lastChronomatronRound = 0; diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 172411c..7612a4d 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -49,6 +49,7 @@ public class ToggleCommand extends CommandBase implements ICommand { // Terminal Helpers public static boolean startsWithToggled; public static boolean selectAllToggled; + public static boolean blockWrongTerminalClicksToggled; public static boolean itemFrameOnSeaLanternsToggled; // Experiments public static boolean ultrasequencerToggled; @@ -67,7 +68,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "watchermessage/startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; + "watchermessage/startswithterminal/selectallterminal/blockterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -85,7 +86,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", - "selectallterminal", "itemframeonsealanterns", "ultrasequencer", + "selectallterminal", "blockterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } return null; @@ -267,6 +268,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", selectAllToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Select all color items terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "blockterminalclicks": + blockWrongTerminalClicksToggled = !blockWrongTerminalClicksToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlockTerminalClicks", blockWrongTerminalClicksToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block wrong clicks on terminals has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + blockWrongTerminalClicksToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "itemframeonsealanterns": itemFrameOnSeaLanternsToggled = !itemFrameOnSeaLanternsToggled; ConfigHandler.writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", itemFrameOnSeaLanternsToggled); diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index 8701563..1e0da7f 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -24,6 +24,7 @@ public class PuzzleSolversGui extends GuiScreen { private GuiButton ticTacToe; private GuiButton startsWith; private GuiButton selectAll; + private GuiButton blockClicks; private GuiButton itemFrameOnSeaLanterns; public PuzzleSolversGui(int page) { @@ -57,7 +58,8 @@ public class PuzzleSolversGui extends GuiScreen { startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); // Page 2 selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); - itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); + blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); + itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); switch (page) { case 1: @@ -72,6 +74,7 @@ public class PuzzleSolversGui extends GuiScreen { break; case 2: this.buttonList.add(selectAll); + this.buttonList.add(blockClicks); this.buttonList.add(itemFrameOnSeaLanterns); this.buttonList.add(backPage); break; @@ -125,6 +128,10 @@ public class PuzzleSolversGui extends GuiScreen { ToggleCommand.selectAllToggled = !ToggleCommand.selectAllToggled; ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", ToggleCommand.selectAllToggled); selectAll.displayString = "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled); + } else if (button == blockClicks) { + ToggleCommand.blockWrongTerminalClicksToggled = !ToggleCommand.blockWrongTerminalClicksToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlockTerminalClicks", ToggleCommand.blockWrongTerminalClicksToggled); + blockClicks.displayString = "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled); } else if (button == itemFrameOnSeaLanterns) { ToggleCommand.itemFrameOnSeaLanternsToggled = !ToggleCommand.itemFrameOnSeaLanternsToggled; ConfigHandler.writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", ToggleCommand.itemFrameOnSeaLanternsToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index a0e446f..a447632 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -203,6 +203,7 @@ public class ConfigHandler { if (!hasKey("toggles", "TicTacToePuzzle")) writeBooleanConfig("toggles", "TicTacToePuzzle", false); if (!hasKey("toggles", "StartsWithTerminal")) writeBooleanConfig("toggles", "StartsWithTerminal", false); if (!hasKey("toggles", "SelectAllTerminal")) writeBooleanConfig("toggles", "SelectAllTerminal", false); + if (!hasKey("toggles", "BlockTerminalClicks")) writeBooleanConfig("toggles", "BlockTerminalClicks", false); if (!hasKey("toggles", "IgnoreItemFrameOnSeaLanterns")) writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", false); // Experiment Solvers if (!hasKey("toggles", "UltraSequencer")) writeBooleanConfig("toggles", "UltraSequencer", false); @@ -467,6 +468,7 @@ public class ConfigHandler { ToggleCommand.ticTacToeToggled = getBoolean("toggles", "TicTacToePuzzle"); ToggleCommand.startsWithToggled = getBoolean("toggles", "StartsWithTerminal"); ToggleCommand.selectAllToggled = getBoolean("toggles", "SelectAllTerminal"); + ToggleCommand.blockWrongTerminalClicksToggled = getBoolean("toggles", "BlockTerminalClicks"); ToggleCommand.itemFrameOnSeaLanternsToggled = getBoolean("toggles", "IgnoreItemFrameOnSeaLanterns"); // Experiment Solvers ToggleCommand.ultrasequencerToggled = getBoolean("toggles", "UltraSequencer"); -- cgit From d2b60152ae3a0a4e63732e231e49373f29cce1f9 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 12 Dec 2020 18:41:06 -0500 Subject: Update Wording --- src/main/java/me/Danker/commands/ToggleCommand.java | 8 ++++---- src/main/java/me/Danker/gui/PuzzleSolversGui.java | 2 +- src/main/java/me/Danker/handlers/ConfigHandler.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 7612a4d..e4a7f02 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -68,7 +68,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "watchermessage/startswithterminal/selectallterminal/blockterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; + "watchermessage/startswithterminal/selectallterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -86,7 +86,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", - "selectallterminal", "blockterminalclicks", "itemframeonsealanterns", "ultrasequencer", + "selectallterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } return null; @@ -268,9 +268,9 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", selectAllToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Select all color items terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; - case "blockterminalclicks": + case "blockwrongterminalclicks": blockWrongTerminalClicksToggled = !blockWrongTerminalClicksToggled; - ConfigHandler.writeBooleanConfig("toggles", "BlockTerminalClicks", blockWrongTerminalClicksToggled); + ConfigHandler.writeBooleanConfig("toggles", "BlockWrongTerminalClicks", blockWrongTerminalClicksToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block wrong clicks on terminals has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + blockWrongTerminalClicksToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "itemframeonsealanterns": diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index 1e0da7f..0e9da2f 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -130,7 +130,7 @@ public class PuzzleSolversGui extends GuiScreen { selectAll.displayString = "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled); } else if (button == blockClicks) { ToggleCommand.blockWrongTerminalClicksToggled = !ToggleCommand.blockWrongTerminalClicksToggled; - ConfigHandler.writeBooleanConfig("toggles", "BlockTerminalClicks", ToggleCommand.blockWrongTerminalClicksToggled); + ConfigHandler.writeBooleanConfig("toggles", "BlockWrongTerminalClicks", ToggleCommand.blockWrongTerminalClicksToggled); blockClicks.displayString = "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled); } else if (button == itemFrameOnSeaLanterns) { ToggleCommand.itemFrameOnSeaLanternsToggled = !ToggleCommand.itemFrameOnSeaLanternsToggled; diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index a447632..93da3e8 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -203,7 +203,7 @@ public class ConfigHandler { if (!hasKey("toggles", "TicTacToePuzzle")) writeBooleanConfig("toggles", "TicTacToePuzzle", false); if (!hasKey("toggles", "StartsWithTerminal")) writeBooleanConfig("toggles", "StartsWithTerminal", false); if (!hasKey("toggles", "SelectAllTerminal")) writeBooleanConfig("toggles", "SelectAllTerminal", false); - if (!hasKey("toggles", "BlockTerminalClicks")) writeBooleanConfig("toggles", "BlockTerminalClicks", false); + if (!hasKey("toggles", "BlockWrongTerminalClicks")) writeBooleanConfig("toggles", "BlockWrongTerminalClicks", false); if (!hasKey("toggles", "IgnoreItemFrameOnSeaLanterns")) writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", false); // Experiment Solvers if (!hasKey("toggles", "UltraSequencer")) writeBooleanConfig("toggles", "UltraSequencer", false); @@ -468,7 +468,7 @@ public class ConfigHandler { ToggleCommand.ticTacToeToggled = getBoolean("toggles", "TicTacToePuzzle"); ToggleCommand.startsWithToggled = getBoolean("toggles", "StartsWithTerminal"); ToggleCommand.selectAllToggled = getBoolean("toggles", "SelectAllTerminal"); - ToggleCommand.blockWrongTerminalClicksToggled = getBoolean("toggles", "BlockTerminalClicks"); + ToggleCommand.blockWrongTerminalClicksToggled = getBoolean("toggles", "BlockWrongTerminalClicks"); ToggleCommand.itemFrameOnSeaLanternsToggled = getBoolean("toggles", "IgnoreItemFrameOnSeaLanterns"); // Experiment Solvers ToggleCommand.ultrasequencerToggled = getBoolean("toggles", "UltraSequencer"); -- cgit From f4e0781601e2a55bfdb6da74fbe2fe07193890c1 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 12 Dec 2020 18:59:27 -0500 Subject: Fix NullPointerException --- src/main/java/me/Danker/DankersSkyblockMod.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 98a97af..ad5106f 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3062,22 +3062,22 @@ public class DankersSkyblockMod if(slotIndex % 9 != 0 && slotIndex != 53) { ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1); - if(itemStack.getItemDamage() == 5) isValid = true; + if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } if(!isValid && slotIndex % 9 != 8 && slotIndex != 0) { ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1); - if(itemStack.getItemDamage() == 5) isValid = true; + if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } if(!isValid && slotIndex <= 44) { ItemStack itemStack = inventory.getStackInSlot(slotIndex + 9); - if(itemStack.getItemDamage() == 5) isValid = true; + if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } if(!isValid && slotIndex >= 9) { ItemStack itemStack = inventory.getStackInSlot(slotIndex - 9); - if(itemStack.getItemDamage() == 5) isValid = true; + if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } shouldCancel = !isValid; -- cgit From c302e2b7ed4dd4d949f9ccff0536be8aa33e4ce8 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 14:40:43 -0500 Subject: Fixed a swapped order --- src/main/java/me/Danker/DankersSkyblockMod.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index ad5106f..982ed0d 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3060,12 +3060,12 @@ public class DankersSkyblockMod int slotIndex = mouseSlot.getSlotIndex(); - if(slotIndex % 9 != 0 && slotIndex != 53) { + if(slotIndex % 9 != 8 && slotIndex != 53) { ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1); if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } - if(!isValid && slotIndex % 9 != 8 && slotIndex != 0) { + if(!isValid && slotIndex % 9 != 0 && slotIndex != 0) { ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1); if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } @@ -3092,14 +3092,13 @@ public class DankersSkyblockMod shouldCancel = true; break; } - int needed = 0; + int needed = -1; for(int i = 10; i <= 25; i++) { if(i == 17 || i == 18) continue; ItemStack itemStack = inventory.getStackInSlot(i); - if(!itemStack.getDisplayName().contains(EnumChatFormatting.GREEN.toString())) continue; if(itemStack.stackSize > needed) needed = itemStack.stackSize; } - shouldCancel = item.stackSize != needed; + shouldCancel = needed != -1 && item.stackSize != needed ; break; } -- cgit From 6b4330cc1c6e5795c4cbf17c3ccb06e4d2cfd6d6 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 14:44:27 -0500 Subject: Fix click blocking for "click in order" --- src/main/java/me/Danker/DankersSkyblockMod.java | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 982ed0d..409b4d5 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3041,17 +3041,17 @@ public class DankersSkyblockMod //most of these are extra but who cares - switch(inventoryName) { + switch (inventoryName) { case "Correct all the panes!": shouldCancel = !StringUtils.stripControlCodes(item.getDisplayName()).startsWith("Off"); break; case "Navigate the maze!": - if((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { + if (item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) { shouldCancel = true; break; } - if(item.getItemDamage() != 0) { + if (item.getItemDamage() != 0) { shouldCancel = true; break; } @@ -3060,12 +3060,12 @@ public class DankersSkyblockMod int slotIndex = mouseSlot.getSlotIndex(); - if(slotIndex % 9 != 8 && slotIndex != 53) { + if (slotIndex % 9 != 8 && slotIndex != 53) { ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1); if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } - if(!isValid && slotIndex % 9 != 0 && slotIndex != 0) { + if (!isValid && slotIndex % 9 != 0 && slotIndex != 0) { ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1); if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; } @@ -3094,19 +3094,22 @@ public class DankersSkyblockMod } int needed = -1; for(int i = 10; i <= 25; i++) { - if(i == 17 || i == 18) continue; + if (i == 17 || i == 18) continue; ItemStack itemStack = inventory.getStackInSlot(i); - if(itemStack.stackSize > needed) needed = itemStack.stackSize; + if (itemStack == null) continue; + if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (itemStack.getItemDamage() != 14) continue; + if (itemStack.stackSize > needed) needed = itemStack.stackSize; } shouldCancel = needed != -1 && item.stackSize != needed ; break; } - if(!shouldCancel) { - if(inventoryName.startsWith("What starts with:")) { + if (!shouldCancel) { + if (inventoryName.startsWith("What starts with:")) { char letter = inventoryName.charAt(inventoryName.indexOf("'") + 1); shouldCancel = !(StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter); - } else if(inventoryName.startsWith("Select all the")) { + } else if (inventoryName.startsWith("Select all the")) { String colour; List colourParts = new ArrayList<>(); Matcher colourMatcher = startsWithTerminalPattern.matcher(inventoryName); -- cgit From 831ca8ac1c4cc2a1303e981dc8c8b54107b3a3d0 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 15:11:47 -0500 Subject: Add highlighter for click in order terminal --- src/main/java/me/Danker/DankersSkyblockMod.java | 45 +++++++++++++--------- .../java/me/Danker/commands/ToggleCommand.java | 12 ++++-- src/main/java/me/Danker/gui/PuzzleSolversGui.java | 11 +++++- .../java/me/Danker/handlers/ConfigHandler.java | 3 ++ 4 files changed, 47 insertions(+), 24 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 409b4d5..6355835 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -7,7 +7,6 @@ import me.Danker.handlers.*; import me.Danker.utils.TicTacToeUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; -import net.minecraft.block.BlockColored; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.Gui; @@ -127,6 +126,8 @@ public class DankersSkyblockMod static ItemStack[] experimentTableSlots = new ItemStack[54]; static int pickBlockBind; static boolean pickBlockBindSwapped = false; + static String terminalColorNeeded; + static int[] terminalNumberNeeded = new int[2]; static double dungeonStartTime = 0; static double bloodOpenTime = 0; @@ -3092,15 +3093,8 @@ public class DankersSkyblockMod shouldCancel = true; break; } - int needed = -1; - for(int i = 10; i <= 25; i++) { - if (i == 17 || i == 18) continue; - ItemStack itemStack = inventory.getStackInSlot(i); - if (itemStack == null) continue; - if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; - if (itemStack.getItemDamage() != 14) continue; - if (itemStack.stackSize > needed) needed = itemStack.stackSize; - } + int needed = terminalNumberNeeded[1]; + if(needed == 0) break; shouldCancel = needed != -1 && item.stackSize != needed ; break; } @@ -3110,16 +3104,9 @@ public class DankersSkyblockMod char letter = inventoryName.charAt(inventoryName.indexOf("'") + 1); shouldCancel = !(StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter); } else if (inventoryName.startsWith("Select all the")) { - String colour; - List colourParts = new ArrayList<>(); - Matcher colourMatcher = startsWithTerminalPattern.matcher(inventoryName); - while (colourMatcher.find()) { - colourParts.add(colourMatcher.group()); - } - colour = String.join(" ", colourParts); - + if(terminalColorNeeded == null) return; String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); - shouldCancel = !(itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))); + shouldCancel = !(itemName.contains(terminalColorNeeded) || (terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (terminalColorNeeded.equals("WHITE") && itemName.equals("WOOL"))); } } @@ -3196,6 +3183,8 @@ public class DankersSkyblockMod chronomatronPattern.clear(); chronomatronMouseClicks = 0; experimentTableSlots = new ItemStack[54]; + terminalColorNeeded = null; + terminalNumberNeeded = new int[2]; } @SubscribeEvent @@ -3270,6 +3259,7 @@ public class DankersSkyblockMod colourParts.add(colourMatcher.group()); } colour = String.join(" ", colourParts); + terminalColorNeeded = colour; for (Slot slot : invSlots) { ItemStack item = slot.getStack(); @@ -3281,6 +3271,23 @@ public class DankersSkyblockMod } } + if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { + for(int i = 10; i <= 25; i++) { + if (i == 17 || i == 18) continue; + ItemStack itemStack = invSlots.get(i).getStack(); + if (itemStack == null) continue; + if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (itemStack.getItemDamage() != 14) continue; + if (itemStack.stackSize > terminalNumberNeeded[0]) { + terminalNumberNeeded[0] = itemStack.stackSize; + terminalNumberNeeded[1] = i; + } + } + if(terminalNumberNeeded[0] == 0) return; + Slot slot = invSlots.get(terminalNumberNeeded[0]); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + } + if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a")) { diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index e4a7f02..8cad486 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -49,7 +49,8 @@ public class ToggleCommand extends CommandBase implements ICommand { // Terminal Helpers public static boolean startsWithToggled; public static boolean selectAllToggled; - public static boolean blockWrongTerminalClicksToggled; + public static boolean clickInOrderToggled; + public static boolean blockWrongTerminalClicksToggled; public static boolean itemFrameOnSeaLanternsToggled; // Experiments public static boolean ultrasequencerToggled; @@ -68,7 +69,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "watchermessage/startswithterminal/selectallterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; + "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -86,7 +87,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", - "selectallterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", + "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } return null; @@ -268,6 +269,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", selectAllToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Select all color items terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "clickinorderterminal": + clickInOrderToggled = !clickInOrderToggled; + ConfigHandler.writeBooleanConfig("toggles", "ClickInOrderTerminal", clickInOrderToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Click in order terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "blockwrongterminalclicks": blockWrongTerminalClicksToggled = !blockWrongTerminalClicksToggled; ConfigHandler.writeBooleanConfig("toggles", "BlockWrongTerminalClicks", blockWrongTerminalClicksToggled); diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index 0e9da2f..b7b24a3 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -24,6 +24,7 @@ public class PuzzleSolversGui extends GuiScreen { private GuiButton ticTacToe; private GuiButton startsWith; private GuiButton selectAll; + private GuiButton clickOrder; private GuiButton blockClicks; private GuiButton itemFrameOnSeaLanterns; @@ -58,8 +59,9 @@ public class PuzzleSolversGui extends GuiScreen { startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); // Page 2 selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); - blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); - itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); + clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click in Order Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); + blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); + itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); switch (page) { case 1: @@ -74,6 +76,7 @@ public class PuzzleSolversGui extends GuiScreen { break; case 2: this.buttonList.add(selectAll); + this.buttonList.add(clickOrder); this.buttonList.add(blockClicks); this.buttonList.add(itemFrameOnSeaLanterns); this.buttonList.add(backPage); @@ -128,6 +131,10 @@ public class PuzzleSolversGui extends GuiScreen { ToggleCommand.selectAllToggled = !ToggleCommand.selectAllToggled; ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", ToggleCommand.selectAllToggled); selectAll.displayString = "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled); + } else if (button == clickOrder) { + ToggleCommand.clickInOrderToggled = !ToggleCommand.clickInOrderToggled; + ConfigHandler.writeBooleanConfig("toggles", "ClickInOrderTerminal", ToggleCommand.clickInOrderToggled); + clickOrder.displayString = "Click in Order Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled); } else if (button == blockClicks) { ToggleCommand.blockWrongTerminalClicksToggled = !ToggleCommand.blockWrongTerminalClicksToggled; ConfigHandler.writeBooleanConfig("toggles", "BlockWrongTerminalClicks", ToggleCommand.blockWrongTerminalClicksToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 93da3e8..1955ba4 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -203,6 +203,7 @@ public class ConfigHandler { if (!hasKey("toggles", "TicTacToePuzzle")) writeBooleanConfig("toggles", "TicTacToePuzzle", false); if (!hasKey("toggles", "StartsWithTerminal")) writeBooleanConfig("toggles", "StartsWithTerminal", false); if (!hasKey("toggles", "SelectAllTerminal")) writeBooleanConfig("toggles", "SelectAllTerminal", false); + if (!hasKey("toggles", "ClickInOrderTerminal")) writeBooleanConfig("toggles", "ClickInOrderTerminal", false); if (!hasKey("toggles", "BlockWrongTerminalClicks")) writeBooleanConfig("toggles", "BlockWrongTerminalClicks", false); if (!hasKey("toggles", "IgnoreItemFrameOnSeaLanterns")) writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", false); // Experiment Solvers @@ -468,6 +469,8 @@ public class ConfigHandler { ToggleCommand.ticTacToeToggled = getBoolean("toggles", "TicTacToePuzzle"); ToggleCommand.startsWithToggled = getBoolean("toggles", "StartsWithTerminal"); ToggleCommand.selectAllToggled = getBoolean("toggles", "SelectAllTerminal"); + ToggleCommand.clickInOrderToggled = getBoolean("toggles", "ClickInOrderTerminal"); + ToggleCommand.blockWrongTerminalClicksToggled = getBoolean("toggles", "BlockWrongTerminalClicks"); ToggleCommand.itemFrameOnSeaLanternsToggled = getBoolean("toggles", "IgnoreItemFrameOnSeaLanterns"); // Experiment Solvers -- cgit From eb5821def8792780faa13f29a890d9894671a8b4 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 15:19:19 -0500 Subject: Rename click in order to helper --- src/main/java/me/Danker/commands/ToggleCommand.java | 2 +- src/main/java/me/Danker/gui/PuzzleSolversGui.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 8cad486..2e43ba8 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -272,7 +272,7 @@ public class ToggleCommand extends CommandBase implements ICommand { case "clickinorderterminal": clickInOrderToggled = !clickInOrderToggled; ConfigHandler.writeBooleanConfig("toggles", "ClickInOrderTerminal", clickInOrderToggled); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Click in order terminal solver has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Click in order terminal helper has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; case "blockwrongterminalclicks": blockWrongTerminalClicksToggled = !blockWrongTerminalClicksToggled; diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index b7b24a3..17eb433 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -59,7 +59,7 @@ public class PuzzleSolversGui extends GuiScreen { startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); // Page 2 selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); - clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click in Order Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); + clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click in Order Terminal Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); @@ -134,7 +134,7 @@ public class PuzzleSolversGui extends GuiScreen { } else if (button == clickOrder) { ToggleCommand.clickInOrderToggled = !ToggleCommand.clickInOrderToggled; ConfigHandler.writeBooleanConfig("toggles", "ClickInOrderTerminal", ToggleCommand.clickInOrderToggled); - clickOrder.displayString = "Click in Order Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled); + clickOrder.displayString = "Click in Order Terminal Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled); } else if (button == blockClicks) { ToggleCommand.blockWrongTerminalClicksToggled = !ToggleCommand.blockWrongTerminalClicksToggled; ConfigHandler.writeBooleanConfig("toggles", "BlockWrongTerminalClicks", ToggleCommand.blockWrongTerminalClicksToggled); -- cgit From 2943d1386abb2eda3073df389d99e23bf9691182 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 15:20:25 -0500 Subject: Update DHelpCommand.java --- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 395f40d..66d8bd8 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + -- cgit From 2d899b43f78bf15b697de0335b7b9bd3a161669a Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 15:21:44 -0500 Subject: Update debug --- src/main/java/me/Danker/commands/DankerGuiCommand.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index b10980f..1281dd3 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -66,6 +66,8 @@ public class DankerGuiCommand extends CommandBase { debug.append("[tictactoepuzzle][").append(ToggleCommand.ticTacToeToggled).append("]\n"); debug.append("[startswithterminal][").append(ToggleCommand.startsWithToggled).append("]\n"); debug.append("[selectallterminal][").append(ToggleCommand.selectAllToggled).append("]\n"); + debug.append("[clickinorderterminal][").append(ToggleCommand.clickInOrderToggled).append("]\n"); + debug.append("[blockwrongterminalclicks][").append(ToggleCommand.blockWrongTerminalClicksToggled).append("]\n"); debug.append("[itemframeonsealanterns][").append(ToggleCommand.itemFrameOnSeaLanternsToggled).append("]\n"); debug.append("[ultrasequencer][").append(ToggleCommand.ultrasequencerToggled).append("]\n"); debug.append("[chronomatron][").append(ToggleCommand.chronomatronToggled).append("]\n"); -- cgit From ca385ba25b6c086aad2908129f75dddebe18abd9 Mon Sep 17 00:00:00 2001 From: Sychic Date: Sun, 13 Dec 2020 17:12:52 -0500 Subject: Add danker gui for new features. --- src/main/java/me/Danker/gui/DankerGui.java | 66 +++++++++++++++++++----------- 1 file changed, 41 insertions(+), 25 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 613e968..2b83511 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -39,18 +39,22 @@ public class DankerGui extends GuiScreen { private GuiButton chatMaddox; private GuiButton spiritBearAlert; private GuiButton aotd; - private GuiButton lividDagger; - private GuiButton sceptreMessages; - private GuiButton midasStaffMessages; - private GuiButton implosionMessages; - private GuiButton healMessages; private GuiButton petColours; - private GuiButton dungeonTimer; private GuiButton golemAlerts; private GuiButton expertiseLore; private GuiButton skill50Display; private GuiButton outlineText; private GuiButton cakeTimer; + // Chat Messages + private GuiButton lividDagger; + private GuiButton sceptreMessages; + private GuiButton midasStaffMessages; + private GuiButton implosionMessages; + private GuiButton healMessages; + private GuiButton cooldownMessages; + private GuiButton manaMessages; + //Dungeons + private GuiButton dungeonTimer; private GuiButton lowHealthNotify; private GuiButton lividSolver; private GuiButton stopSalvageStarred; @@ -91,32 +95,34 @@ public class DankerGui extends GuiScreen { pickBlock = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled)); // Page 2 coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); - dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); + chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled)); cakeTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled)); skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled)); slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal)); aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled)); lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled)); // Page 3 - chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled)); - gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); - spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts)); - sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); - midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages)); - implosionMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages)); - healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages)); + spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts)); + sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); + midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages)); + implosionMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages)); + healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages)); + cooldownMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Cooldown Messages: " + Utils.getColouredBoolean(ToggleCommand.cooldownMessages)); + manaMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Mana Messages: " + Utils.getColouredBoolean((ToggleCommand.manaMessages))); // Page 4 goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled)); petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled)); expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled)); - lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); + gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts)); - lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); + splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); // Page 5 - stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); - watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); - splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); + lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); + dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); + stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); + watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); switch (page) { case 1: this.buttonList.add(changeDisplay); @@ -130,7 +136,7 @@ public class DankerGui extends GuiScreen { break; case 2: this.buttonList.add(coords); - this.buttonList.add(dungeonTimer); + this.buttonList.add(chatMaddox); this.buttonList.add(cakeTimer); this.buttonList.add(skill50Display); this.buttonList.add(slayerCount); @@ -140,13 +146,13 @@ public class DankerGui extends GuiScreen { this.buttonList.add(backPage); break; case 3: - this.buttonList.add(chatMaddox); - this.buttonList.add(gparty); this.buttonList.add(spiritBearAlert); this.buttonList.add(sceptreMessages); this.buttonList.add(midasStaffMessages); this.buttonList.add(implosionMessages); this.buttonList.add(healMessages); + this.buttonList.add(cooldownMessages); + this.buttonList.add(manaMessages); this.buttonList.add(nextPage); this.buttonList.add(backPage); break; @@ -154,17 +160,19 @@ public class DankerGui extends GuiScreen { this.buttonList.add(goldenEnch); this.buttonList.add(petColours); this.buttonList.add(expertiseLore); - this.buttonList.add(lividSolver); + this.buttonList.add(gparty); this.buttonList.add(golemAlerts); this.buttonList.add(rngesusAlert); - this.buttonList.add(lowHealthNotify); + this.buttonList.add(splitFishing); this.buttonList.add(nextPage); this.buttonList.add(backPage); break; case 5: + this.buttonList.add(lowHealthNotify); + this.buttonList.add(lividSolver); + this.buttonList.add(dungeonTimer); this.buttonList.add(stopSalvageStarred); this.buttonList.add(watcherReadyMessage); - this.buttonList.add(splitFishing); this.buttonList.add(backPage); break; } @@ -297,6 +305,14 @@ public class DankerGui extends GuiScreen { ToggleCommand.healMessages = !ToggleCommand.healMessages; ConfigHandler.writeBooleanConfig("toggles", "HealMessages", ToggleCommand.healMessages); healMessages.displayString = "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages); + } else if (button == cooldownMessages) { + ToggleCommand.cooldownMessages = !ToggleCommand.cooldownMessages; + ConfigHandler.writeBooleanConfig("toggles", "cooldownMessages", ToggleCommand.cooldownMessages); + cooldownMessages.displayString = "Cooldown Messages: " + Utils.getColouredBoolean(ToggleCommand.cooldownMessages); + } else if (button == manaMessages) { + ToggleCommand.manaMessages = !ToggleCommand.manaMessages; + ConfigHandler.writeBooleanConfig("toggles", "manaMessages", ToggleCommand.manaMessages); + manaMessages.displayString = "Mana Messages: " + Utils.getColouredBoolean(ToggleCommand.manaMessages); } else if (button == lowHealthNotify) { ToggleCommand.lowHealthNotifyToggled = !ToggleCommand.lowHealthNotifyToggled; ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", ToggleCommand.lowHealthNotifyToggled); -- cgit From ec82c3fa2aa6dd364a1810c36b3f8c1bfa947185 Mon Sep 17 00:00:00 2001 From: Sychic Date: Sun, 13 Dec 2020 17:16:55 -0500 Subject: I forgot my own capitalization... --- src/main/java/me/Danker/gui/DankerGui.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 2b83511..2a77702 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -307,11 +307,11 @@ public class DankerGui extends GuiScreen { healMessages.displayString = "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages); } else if (button == cooldownMessages) { ToggleCommand.cooldownMessages = !ToggleCommand.cooldownMessages; - ConfigHandler.writeBooleanConfig("toggles", "cooldownMessages", ToggleCommand.cooldownMessages); + ConfigHandler.writeBooleanConfig("toggles", "CooldownMessages", ToggleCommand.cooldownMessages); cooldownMessages.displayString = "Cooldown Messages: " + Utils.getColouredBoolean(ToggleCommand.cooldownMessages); } else if (button == manaMessages) { ToggleCommand.manaMessages = !ToggleCommand.manaMessages; - ConfigHandler.writeBooleanConfig("toggles", "manaMessages", ToggleCommand.manaMessages); + ConfigHandler.writeBooleanConfig("toggles", "ManaMessages", ToggleCommand.manaMessages); manaMessages.displayString = "Mana Messages: " + Utils.getColouredBoolean(ToggleCommand.manaMessages); } else if (button == lowHealthNotify) { ToggleCommand.lowHealthNotifyToggled = !ToggleCommand.lowHealthNotifyToggled; -- cgit From 6e435b5595ea5752d5933bc908971ebcc92e165b Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 18:05:12 -0500 Subject: Fix Click in Order Helper --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 6355835..0dec910 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3093,7 +3093,7 @@ public class DankersSkyblockMod shouldCancel = true; break; } - int needed = terminalNumberNeeded[1]; + int needed = terminalNumberNeeded[0]; if(needed == 0) break; shouldCancel = needed != -1 && item.stackSize != needed ; break; @@ -3278,13 +3278,13 @@ public class DankersSkyblockMod if (itemStack == null) continue; if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; if (itemStack.getItemDamage() != 14) continue; - if (itemStack.stackSize > terminalNumberNeeded[0]) { + if (itemStack.stackSize < terminalNumberNeeded[0]) { terminalNumberNeeded[0] = itemStack.stackSize; terminalNumberNeeded[1] = i; } } if(terminalNumberNeeded[0] == 0) return; - Slot slot = invSlots.get(terminalNumberNeeded[0]); + Slot slot = invSlots.get(terminalNumberNeeded[1]); Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } -- cgit From e8bb59a78708fe82893fb49dc4e5acd7a96c2979 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 18:29:50 -0500 Subject: Notify when Slayer Slain --- src/main/java/me/Danker/DankersSkyblockMod.java | 19 +++++++++++++++++++ src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 + src/main/java/me/Danker/commands/ToggleCommand.java | 10 ++++++++-- src/main/java/me/Danker/gui/DankerGui.java | 8 ++++++++ src/main/java/me/Danker/handlers/ConfigHandler.java | 2 ++ 6 files changed, 39 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 0dec910..fa06360 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -18,6 +18,9 @@ import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.entity.monster.EntityCreeper; +import net.minecraft.entity.monster.EntitySpider; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.event.ClickEvent; import net.minecraft.event.ClickEvent.Action; @@ -40,6 +43,7 @@ import net.minecraftforge.client.event.*; import net.minecraftforge.client.event.sound.PlaySoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.EntityInteractEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; @@ -2878,6 +2882,21 @@ public class DankersSkyblockMod } } + @SubscribeEvent + public void onAttackingEntity(AttackEntityEvent event) { + if (ToggleCommand.notifySlayerSlainToggled && (event.target instanceof EntityZombie || event.target instanceof EntitySpider || event.target instanceof EntityWolf)) { + List scoreboard = ScoreboardHandler.getSidebarLines(); + + for (String line : scoreboard) { + String cleanedLine = ScoreboardHandler.cleanSB(line); + if (cleanedLine.contains("Boss slain!")) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + break; + } + } + } + } + @SubscribeEvent public void onEntityInteract(EntityInteractEvent event) { Minecraft mc = Minecraft.getMinecraft(); diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 66d8bd8..b2f6824 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 1281dd3..7c9c2f0 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -58,6 +58,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[lowhealthnotify][").append(ToggleCommand.lowHealthNotifyToggled).append("]\n"); debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n"); debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n"); + debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 2e43ba8..3b1c04d 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -39,6 +39,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean stopSalvageStarredToggled; public static boolean watcherReadyToggled; public static boolean swapToPickBlockToggled; + public static boolean notifySlayerSlainToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -68,7 +69,7 @@ public class ToggleCommand extends CommandBase implements ICommand { return "/" + getCommandName() + " "; } @@ -85,7 +86,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", - "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); @@ -224,6 +225,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "StopSalvageStarred", stopSalvageStarredToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Stop salvaging starred items has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + stopSalvageStarredToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "notifyslayerslain": + notifySlayerSlainToggled = !notifySlayerSlainToggled; + ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", notifySlayerSlainToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Notify when slayer slain has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + notifySlayerSlainToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "threemanpuzzle": threeManToggled = !threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 613e968..32c387b 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -56,6 +56,7 @@ public class DankerGui extends GuiScreen { private GuiButton stopSalvageStarred; private GuiButton watcherReadyMessage; private GuiButton pickBlock; + private GuiButton notifySlayerSlain; public DankerGui(int page) { this.page = page; @@ -117,6 +118,8 @@ public class DankerGui extends GuiScreen { stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); + switch (page) { case 1: this.buttonList.add(changeDisplay); @@ -165,6 +168,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(stopSalvageStarred); this.buttonList.add(watcherReadyMessage); this.buttonList.add(splitFishing); + this.buttonList.add(notifySlayerSlain); this.buttonList.add(backPage); break; } @@ -313,6 +317,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.watcherReadyToggled = !ToggleCommand.watcherReadyToggled; ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", ToggleCommand.watcherReadyToggled); watcherReadyMessage.displayString = "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled); + } else if (button == notifySlayerSlain) { + ToggleCommand.notifySlayerSlainToggled = !ToggleCommand.notifySlayerSlainToggled; + ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", ToggleCommand.notifySlayerSlainToggled); + watcherReadyMessage.displayString = "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled); } else if (button == pickBlock) { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 1955ba4..531d631 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -194,6 +194,7 @@ public class ConfigHandler { if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); if (!hasKey("toggles", "WatcherReadyMessage")) writeBooleanConfig("toggles", "WatcherReadyMessage", false); if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); + if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); @@ -459,6 +460,7 @@ public class ConfigHandler { ToggleCommand.lividSolverToggled = getBoolean("toggles", "LividSolver"); ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); ToggleCommand.watcherReadyToggled = getBoolean("toggles", "WatcherReadyMessage"); + ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); -- cgit From bf431c05fa24157930ee13a59ec191c1103f31b0 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 19:15:48 -0500 Subject: Update DankerGui.java wrong button lmao --- src/main/java/me/Danker/gui/DankerGui.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 32c387b..ff6d5d0 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -320,7 +320,7 @@ public class DankerGui extends GuiScreen { } else if (button == notifySlayerSlain) { ToggleCommand.notifySlayerSlainToggled = !ToggleCommand.notifySlayerSlainToggled; ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", ToggleCommand.notifySlayerSlainToggled); - watcherReadyMessage.displayString = "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled); + notifySlayerSlain.displayString = "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled); } else if (button == pickBlock) { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); -- cgit From 66f06282dd87ed10f9fc6a0242efc9312ab38279 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 20:20:25 -0500 Subject: Actually fixed it (hopefully) --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index fa06360..01f7f23 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3296,9 +3296,9 @@ public class DankersSkyblockMod ItemStack itemStack = invSlots.get(i).getStack(); if (itemStack == null) continue; if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; - if (itemStack.getItemDamage() != 14) continue; - if (itemStack.stackSize < terminalNumberNeeded[0]) { - terminalNumberNeeded[0] = itemStack.stackSize; + if (itemStack.getItemDamage() != 5) continue; + if (itemStack.stackSize >= terminalNumberNeeded[0]) { + terminalNumberNeeded[0] = itemStack.stackSize + 1; terminalNumberNeeded[1] = i; } } -- cgit From 66a55e022de9af8eb5ae61aff69e18037e4f91ee Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 13 Dec 2020 21:38:14 -0500 Subject: Stop highlighting already chosen items on terminals --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 01f7f23..5fc820e 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3264,6 +3264,7 @@ public class DankersSkyblockMod for (Slot slot : invSlots) { ItemStack item = slot.getStack(); if (item == null) continue; + if (item.isItemEnchanted()) continue; if (StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter) { Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } @@ -3283,7 +3284,8 @@ public class DankersSkyblockMod for (Slot slot : invSlots) { ItemStack item = slot.getStack(); if (item == null) continue; - String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); + if (item.isItemEnchanted()) continue; + String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); if (itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))) { Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } @@ -3297,7 +3299,7 @@ public class DankersSkyblockMod if (itemStack == null) continue; if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; if (itemStack.getItemDamage() != 5) continue; - if (itemStack.stackSize >= terminalNumberNeeded[0]) { + if (itemStack.stackSize > terminalNumberNeeded[0]) { terminalNumberNeeded[0] = itemStack.stackSize + 1; terminalNumberNeeded[1] = i; } -- cgit From 98a0f0b734727697c9e8072ee08842175ddbf539 Mon Sep 17 00:00:00 2001 From: Quantizr Date: Sun, 13 Dec 2020 23:21:43 -0800 Subject: Added Prevent Placing FoT/Spirit Sceptre on grass/dirt --- src/main/java/me/Danker/DankersSkyblockMod.java | 13 +++++++++++++ src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- src/main/java/me/Danker/commands/ToggleCommand.java | 11 +++++++++-- src/main/java/me/Danker/gui/DankerGui.java | 8 ++++++++ src/main/java/me/Danker/handlers/ConfigHandler.java | 2 ++ 5 files changed, 33 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 64a1f5b..a148574 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2861,6 +2861,11 @@ public class DankersSkyblockMod Blocks.oak_door, Blocks.skull )); + ArrayList flowerPlaceable = new ArrayList<>(Arrays.asList( + Blocks.grass, + Blocks.dirt, + Blocks.flower_pot + )); if (Utils.inDungeons) { interactables.add(Blocks.coal_block); interactables.add(Blocks.stained_hardened_clay); @@ -2873,6 +2878,14 @@ public class DankersSkyblockMod event.setCanceled(true); } } + if(flowerPlaceable.contains(block)){ + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Flower of Truth")) { + event.setCanceled(true); + } + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Spirit Sceptre")) { + event.setCanceled(true); + } + } } } diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 395f40d..aea4921 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 172411c..bd56cc3 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -39,6 +39,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean stopSalvageStarredToggled; public static boolean watcherReadyToggled; public static boolean swapToPickBlockToggled; + public static boolean flowerWeaponsToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -64,7 +65,7 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " "; @@ -80,7 +81,7 @@ public class ToggleCommand extends CommandBase implements ICommand { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", - "sceptremessages", "petcolors", "dungeontimer", "golemalerts", + "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "threemanpuzzle", "oruopuzzle", "blazepuzzle", @@ -151,6 +152,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block Livid Dagger ability been set to " + DankersSkyblockMod.SECONDARY_COLOUR + lividDaggerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "flowerweapons": + flowerWeaponsToggled = !flowerWeaponsToggled; + ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", flowerWeaponsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Prevent Placing FoT/Spirit Sceptre been set to " + DankersSkyblockMod.SECONDARY_COLOUR + flowerWeaponsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "sceptremessages": sceptreMessages = !sceptreMessages; ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages); @@ -308,6 +314,7 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Spirit Bear alerts: " + DankersSkyblockMod.VALUE_COLOUR + spiritBearAlerts + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Block AOTD ability: " + DankersSkyblockMod.VALUE_COLOUR + aotdToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Block Livid Dagger ability: " + DankersSkyblockMod.VALUE_COLOUR + lividDaggerToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Prevent Placing FoT/Spirit Sceptre: " + DankersSkyblockMod.VALUE_COLOUR + flowerWeaponsToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Spirit Sceptre messages: " + DankersSkyblockMod.VALUE_COLOUR + sceptreMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Midas Staff messages: " + DankersSkyblockMod.VALUE_COLOUR + midasStaffMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Implosion messages: " + DankersSkyblockMod.VALUE_COLOUR + implosionMessages + "\n" + diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 613e968..90815ad 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -55,6 +55,7 @@ public class DankerGui extends GuiScreen { private GuiButton lividSolver; private GuiButton stopSalvageStarred; private GuiButton watcherReadyMessage; + private GuiButton flowerWeapons; private GuiButton pickBlock; public DankerGui(int page) { @@ -117,6 +118,8 @@ public class DankerGui extends GuiScreen { stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); + switch (page) { case 1: this.buttonList.add(changeDisplay); @@ -165,6 +168,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(stopSalvageStarred); this.buttonList.add(watcherReadyMessage); this.buttonList.add(splitFishing); + this.buttonList.add(flowerWeapons); this.buttonList.add(backPage); break; } @@ -317,6 +321,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); pickBlock.displayString = "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled); + } else if (button == flowerWeapons) { + ToggleCommand.flowerWeaponsToggled = !ToggleCommand.flowerWeaponsToggled; + ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", ToggleCommand.flowerWeaponsToggled); + flowerWeapons.displayString = "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index a0e446f..bc62b4b 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -194,6 +194,7 @@ public class ConfigHandler { if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); if (!hasKey("toggles", "WatcherReadyMessage")) writeBooleanConfig("toggles", "WatcherReadyMessage", false); if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); + if (!hasKey("toggles", "FlowerWeapons")) writeBooleanConfig("toggles", "FlowerWeapons", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); @@ -458,6 +459,7 @@ public class ConfigHandler { ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); ToggleCommand.watcherReadyToggled = getBoolean("toggles", "WatcherReadyMessage"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); + ToggleCommand.flowerWeaponsToggled = getBoolean("toggles", "FlowerWeapons"); // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle"); -- cgit From c3c6730abd0cfc1619c81f68f0f9eda60cc8b903 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 14 Dec 2020 10:11:37 -0500 Subject: Fixed Click in Order --- src/main/java/me/Danker/DankersSkyblockMod.java | 35 ++++++++++++++++--------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 5fc820e..69f54cf 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2739,6 +2739,27 @@ public class DankersSkyblockMod experimentTableSlots[i] = itemStack.copy().setStackDisplayName(itemName); } } + + if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { + if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 14; + for(int i = 10; i <= 25; i++) { + if (i == 17 || i == 18) continue; + ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); + if (prevStack == null) terminalNumberNeeded[0] = 14; + else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) terminalNumberNeeded[0] = 14; + else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 14; + + ItemStack itemStack = invSlots.get(i).getStack(); + if (itemStack == null) continue; + if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (itemStack.getItemDamage() != 14) continue; + if (itemStack.stackSize < terminalNumberNeeded[0]) { + terminalNumberNeeded[0] = itemStack.stackSize; + terminalNumberNeeded[1] = i; + } + } + } + } if (titleTimer >= 0) { @@ -3292,19 +3313,7 @@ public class DankersSkyblockMod } } - if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { - for(int i = 10; i <= 25; i++) { - if (i == 17 || i == 18) continue; - ItemStack itemStack = invSlots.get(i).getStack(); - if (itemStack == null) continue; - if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; - if (itemStack.getItemDamage() != 5) continue; - if (itemStack.stackSize > terminalNumberNeeded[0]) { - terminalNumberNeeded[0] = itemStack.stackSize + 1; - terminalNumberNeeded[1] = i; - } - } - if(terminalNumberNeeded[0] == 0) return; + if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { Slot slot = invSlots.get(terminalNumberNeeded[1]); Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } -- cgit From 12ff5bebbe431924e5c13f8a0f88843ce9709eae Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 14 Dec 2020 12:17:50 -0500 Subject: Add feature trace inactive terminals --- src/main/java/me/Danker/DankersSkyblockMod.java | 81 +++++++++++++++++++ src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 + .../java/me/Danker/commands/ToggleCommand.java | 12 ++- src/main/java/me/Danker/gui/PuzzleSolversGui.java | 20 +++-- .../java/me/Danker/handlers/ConfigHandler.java | 2 + src/main/java/me/Danker/utils/Utils.java | 93 +++++++++++++++++++++- 7 files changed, 200 insertions(+), 11 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 69f54cf..6665604 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -13,9 +13,14 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.client.renderer.EntityRenderer; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntitySpider; @@ -52,6 +57,8 @@ import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.ObfuscationReflectionHelper; +import net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -62,12 +69,16 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; +import net.minecraftforge.fml.relauncher.ReflectionHelper; import org.apache.commons.lang3.time.StopWatch; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import java.awt.*; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.text.NumberFormat; import java.util.List; import java.util.*; @@ -2812,6 +2823,9 @@ public class DankersSkyblockMod @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { + + Minecraft mc = Minecraft.getMinecraft(); + if (ToggleCommand.blazeToggled) { if (lowestBlaze != null) { BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); @@ -2834,6 +2848,73 @@ public class DankersSkyblockMod if (ToggleCommand.ticTacToeToggled && correctTicTacToeButton != null) { Utils.draw3DBox(correctTicTacToeButton, 0x40FF40, event.partialTicks); } + + if(ToggleCommand.traceInactiveTerminalsToggled && Utils.inDungeons && ScoreboardHandler.getSidebarLines().stream().anyMatch(l->ScoreboardHandler.cleanSB(l).contains("The Catacombs (F7)"))) { + for (Entity e : mc.theWorld.getLoadedEntityList()) { + if (e instanceof EntityArmorStand) { + EntityArmorStand entity = (EntityArmorStand) e; + if(!e.hasCustomName()) continue; + if(!e.getCustomNameTag().contains("Inactive")) continue; + + float distance = mc.thePlayer.getDistanceToEntity(entity); + + float[] fractions = new float[]{0.0F, 0.5F, 1.0F}; + Color[] colors = new Color[]{Color.RED, Color.YELLOW, Color.GREEN}; + float progress = distance * 1.25F * 0.01F; + + Color color = Utils.blendColors(fractions, colors, progress).brighter(); + float width = 1.0f; + float partialTicks = event.partialTicks; + + float r = ((float) 1 / 255) * color.getRed(); + float g = ((float) 1 / 255) * color.getGreen(); + float b = ((float) 1 / 255) * color.getBlue(); + GL11.glPushMatrix(); + + GL11.glLoadIdentity(); + + Method orientCamera = ReflectionHelper.findMethod(EntityRenderer.class, mc.entityRenderer, new String[]{"orientCamera"}, float.class); + try { + //mc.entityRenderer.orientCamera(partialTicks); + orientCamera.invoke(mc.entityRenderer, partialTicks); + } catch (IllegalAccessException illegalAccessException) { + illegalAccessException.printStackTrace(); + } catch (InvocationTargetException invocationTargetException) { + invocationTargetException.printStackTrace(); + } + + GL11.glDisable(2929); + GL11.glDisable(3553); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + + GL11.glEnable(GL11.GL_LINE_SMOOTH); + + double x = Utils.interpolate(entity.posX, entity.lastTickPosX, partialTicks) - mc.getRenderManager().viewerPosX; + double y = Utils.interpolate(entity.posY + entity.getEyeHeight(), entity.lastTickPosY + entity.getEyeHeight(), partialTicks) - mc.getRenderManager().viewerPosY; + double z = Utils.interpolate(entity.posZ, entity.lastTickPosZ, partialTicks) - mc.getRenderManager().viewerPosZ; + + GL11.glLineWidth(width); + + GL11.glBegin(GL11.GL_LINE_STRIP); + { + GL11.glColor3d(r, g, b); + GL11.glVertex3d(x, y, z); + GL11.glVertex3d(0.0, mc.thePlayer.getEyeHeight(), 0.0); + GL11.glEnd(); + GL11.glDisable(GL11.GL_LINE_SMOOTH); + + GL11.glDisable(3042); + GL11.glEnable(3553); + GL11.glEnable(2929); + + GL11.glPopMatrix(); + } + + } + } + } + } @SubscribeEvent diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index b2f6824..8e998f2 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 7c9c2f0..a003762 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -65,6 +65,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[creeperpuzzle][").append(ToggleCommand.creeperToggled).append("]\n"); debug.append("[waterpuzzle][").append(ToggleCommand.waterToggled).append("]\n"); debug.append("[tictactoepuzzle][").append(ToggleCommand.ticTacToeToggled).append("]\n"); + debug.append("[traceinactiveterminals][").append(ToggleCommand.traceInactiveTerminalsToggled).append("]\n"); debug.append("[startswithterminal][").append(ToggleCommand.startsWithToggled).append("]\n"); debug.append("[selectallterminal][").append(ToggleCommand.selectAllToggled).append("]\n"); debug.append("[clickinorderterminal][").append(ToggleCommand.clickInOrderToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 3b1c04d..d9d7024 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -48,6 +48,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean waterToggled; public static boolean ticTacToeToggled; // Terminal Helpers + public static boolean traceInactiveTerminalsToggled; public static boolean startsWithToggled; public static boolean selectAllToggled; public static boolean clickInOrderToggled; @@ -70,7 +71,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; + "watchermessage/traceinactiveterminals/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -87,7 +88,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle", - "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", + "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "traceinactiveterminals", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } @@ -264,7 +265,12 @@ public class ToggleCommand extends CommandBase implements ICommand { watcherReadyToggled = !watcherReadyToggled; ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", watcherReadyToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display Watcher ready message has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + watcherReadyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); - break; + break; + case "traceinactiveterminals": + traceInactiveTerminalsToggled = !traceInactiveTerminalsToggled; + ConfigHandler.writeBooleanConfig("toggles", "TraceInactiveTerminals", traceInactiveTerminalsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Trace inactive terminals has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + traceInactiveTerminalsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "startswithterminal": startsWithToggled = !startsWithToggled; ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", startsWithToggled); diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index 17eb433..693e6c4 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -22,6 +22,7 @@ public class PuzzleSolversGui extends GuiScreen { private GuiButton creeper; private GuiButton water; private GuiButton ticTacToe; + private GuiButton traceInactive; private GuiButton startsWith; private GuiButton selectAll; private GuiButton clickOrder; @@ -56,12 +57,14 @@ public class PuzzleSolversGui extends GuiScreen { creeper = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled)); water = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled)); ticTacToe = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Tic Tac Toe Solver: " + Utils.getColouredBoolean(ToggleCommand.ticTacToeToggled)); - startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); + traceInactive = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Trace Inactive Terminals: " + Utils.getColouredBoolean(ToggleCommand.traceInactiveTerminalsToggled)); + // Page 2 - selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); - clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click in Order Terminal Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); - blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); - itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); + startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); + selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); + clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Click in Order Terminal Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); + blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); + itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); switch (page) { case 1: @@ -71,10 +74,11 @@ public class PuzzleSolversGui extends GuiScreen { this.buttonList.add(creeper); this.buttonList.add(water); this.buttonList.add(ticTacToe); - this.buttonList.add(startsWith); + this.buttonList.add(traceInactive); this.buttonList.add(nextPage); break; case 2: + this.buttonList.add(startsWith); this.buttonList.add(selectAll); this.buttonList.add(clickOrder); this.buttonList.add(blockClicks); @@ -123,6 +127,10 @@ public class PuzzleSolversGui extends GuiScreen { ToggleCommand.ticTacToeToggled = !ToggleCommand.ticTacToeToggled; ConfigHandler.writeBooleanConfig("toggles", "TicTacToePuzzle", ToggleCommand.ticTacToeToggled); ticTacToe.displayString = "Tic Tac Toe Solver: " + Utils.getColouredBoolean(ToggleCommand.ticTacToeToggled); + } else if (button == traceInactive) { + ToggleCommand.traceInactiveTerminalsToggled = !ToggleCommand.traceInactiveTerminalsToggled; + ConfigHandler.writeBooleanConfig("toggles", "TraceInactiveTerminals", ToggleCommand.traceInactiveTerminalsToggled); + traceInactive.displayString = "Trace Inactive Terminals: " + Utils.getColouredBoolean(ToggleCommand.traceInactiveTerminalsToggled); } else if (button == startsWith) { ToggleCommand.startsWithToggled = !ToggleCommand.startsWithToggled; ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", ToggleCommand.startsWithToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 531d631..aae3f59 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -202,6 +202,7 @@ public class ConfigHandler { if (!hasKey("toggles", "CreeperPuzzle")) writeBooleanConfig("toggles", "CreeperPuzzle", false); if (!hasKey("toggles", "WaterPuzzle")) writeBooleanConfig("toggles", "WaterPuzzle", false); if (!hasKey("toggles", "TicTacToePuzzle")) writeBooleanConfig("toggles", "TicTacToePuzzle", false); + if (!hasKey("toggles", "TraceInactiveTerminals")) writeBooleanConfig("toggles", "TraceInactiveTerminals", false); if (!hasKey("toggles", "StartsWithTerminal")) writeBooleanConfig("toggles", "StartsWithTerminal", false); if (!hasKey("toggles", "SelectAllTerminal")) writeBooleanConfig("toggles", "SelectAllTerminal", false); if (!hasKey("toggles", "ClickInOrderTerminal")) writeBooleanConfig("toggles", "ClickInOrderTerminal", false); @@ -469,6 +470,7 @@ public class ConfigHandler { ToggleCommand.creeperToggled = getBoolean("toggles", "CreeperPuzzle"); ToggleCommand.waterToggled = getBoolean("toggles", "WaterPuzzle"); ToggleCommand.ticTacToeToggled = getBoolean("toggles", "TicTacToePuzzle"); + ToggleCommand.traceInactiveTerminalsToggled = getBoolean("toggles", "TraceInactiveTerminals"); ToggleCommand.startsWithToggled = getBoolean("toggles", "StartsWithTerminal"); ToggleCommand.selectAllToggled = getBoolean("toggles", "SelectAllTerminal"); ToggleCommand.clickInOrderToggled = getBoolean("toggles", "ClickInOrderTerminal"); diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index e4f7873..6c1fadb 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -25,6 +25,7 @@ import net.minecraft.util.*; import org.lwjgl.opengl.GL11; import java.awt.*; +import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -386,6 +387,96 @@ public class Utils { RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); } + + public static double interpolate(double current, double old, double scale) { + return old + (current - old) * scale; + } + + // Yoink! https://stackoverflow.com/a/51780112 + public static Color blendColors(float[] fractions, Color[] colors, float progress) { + Color color; + if (fractions != null) { + if (colors != null) { + if (fractions.length == colors.length) { + int[] indices = getFractionIndices(fractions, progress); + if (indices[0] >= 0 && indices[0] < fractions.length && indices[1] >= 0 && indices[1] < fractions.length) { + float[] range = new float[]{fractions[indices[0]], fractions[indices[1]]}; + Color[] colorRange = new Color[]{colors[indices[0]], colors[indices[1]]}; + float max = range[1] - range[0]; + float value = progress - range[0]; + float weight = value / max; + color = blend(colorRange[0], colorRange[1], 1.0F - weight); + return color; + } else { + return colors[0]; + } + } else { + throw new IllegalArgumentException("Fractions and colours must have equal number of elements"); + } + } else { + throw new IllegalArgumentException("Colors can't be null"); + } + } else { + throw new IllegalArgumentException("Fractions can't be null"); + } + } + + public static int[] getFractionIndices(float[] fractions, float progress) { + int[] range = new int[2]; + + int startPoint; + for (startPoint = 0; startPoint < fractions.length && fractions[startPoint] <= progress; ++startPoint) { + } + + if (startPoint >= fractions.length) { + startPoint = fractions.length - 1; + } + + range[0] = startPoint - 1; + range[1] = startPoint; + return range; + } + + public static Color blend(Color color1, Color color2, double ratio) { + float r = (float) ratio; + float ir = 1.0F - r; + float[] rgb1 = new float[3]; + float[] rgb2 = new float[3]; + color1.getColorComponents(rgb1); + color2.getColorComponents(rgb2); + float red = rgb1[0] * r + rgb2[0] * ir; + float green = rgb1[1] * r + rgb2[1] * ir; + float blue = rgb1[2] * r + rgb2[2] * ir; + if (red < 0.0F) { + red = 0.0F; + } else if (red > 255.0F) { + red = 255.0F; + } + + if (green < 0.0F) { + green = 0.0F; + } else if (green > 255.0F) { + green = 255.0F; + } + + if (blue < 0.0F) { + blue = 0.0F; + } else if (blue > 255.0F) { + blue = 255.0F; + } + + Color color = null; + + try { + color = new Color(red, green, blue); + } catch (IllegalArgumentException var14) { + NumberFormat nf = NumberFormat.getNumberInstance(); + System.out.println(nf.format(red) + "; " + nf.format(green) + "; " + nf.format(blue)); + var14.printStackTrace(); + } + + return color; + } public static BlockPos getFirstBlockPosAfterVectors(Minecraft mc, Vec3 pos1, Vec3 pos2, int strength, int distance) { double x = pos2.xCoord - pos1.xCoord; @@ -441,5 +532,5 @@ public class Utils { return null; } } - + } -- cgit From cdaeca21f7d4382c3f8941b35b1836872967df9a Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 14 Dec 2020 12:53:28 -0500 Subject: Remove some random import --- src/main/java/me/Danker/commands/ScaleCommand.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index 85d0d5c..1c0843d 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -8,7 +8,6 @@ import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; -import sun.security.krb5.Config; import java.util.List; -- cgit From 3deb21c90e4d66b669c123d170c36d1a93d8243c Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 14 Dec 2020 13:25:26 -0500 Subject: Revert "Add feature trace inactive terminals" This reverts commit 12ff5bebbe431924e5c13f8a0f88843ce9709eae. --- src/main/java/me/Danker/DankersSkyblockMod.java | 81 ------------------- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 - .../java/me/Danker/commands/ToggleCommand.java | 12 +-- src/main/java/me/Danker/gui/PuzzleSolversGui.java | 20 ++--- .../java/me/Danker/handlers/ConfigHandler.java | 2 - src/main/java/me/Danker/utils/Utils.java | 93 +--------------------- 7 files changed, 11 insertions(+), 200 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 6665604..69f54cf 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -13,14 +13,9 @@ import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.inventory.GuiChest; -import net.minecraft.client.renderer.EntityRenderer; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntitySpider; @@ -57,8 +52,6 @@ import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.ObfuscationReflectionHelper; -import net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -69,16 +62,12 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; -import net.minecraftforge.fml.relauncher.ReflectionHelper; import org.apache.commons.lang3.time.StopWatch; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import java.awt.*; -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.text.NumberFormat; import java.util.List; import java.util.*; @@ -2823,9 +2812,6 @@ public class DankersSkyblockMod @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { - - Minecraft mc = Minecraft.getMinecraft(); - if (ToggleCommand.blazeToggled) { if (lowestBlaze != null) { BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); @@ -2848,73 +2834,6 @@ public class DankersSkyblockMod if (ToggleCommand.ticTacToeToggled && correctTicTacToeButton != null) { Utils.draw3DBox(correctTicTacToeButton, 0x40FF40, event.partialTicks); } - - if(ToggleCommand.traceInactiveTerminalsToggled && Utils.inDungeons && ScoreboardHandler.getSidebarLines().stream().anyMatch(l->ScoreboardHandler.cleanSB(l).contains("The Catacombs (F7)"))) { - for (Entity e : mc.theWorld.getLoadedEntityList()) { - if (e instanceof EntityArmorStand) { - EntityArmorStand entity = (EntityArmorStand) e; - if(!e.hasCustomName()) continue; - if(!e.getCustomNameTag().contains("Inactive")) continue; - - float distance = mc.thePlayer.getDistanceToEntity(entity); - - float[] fractions = new float[]{0.0F, 0.5F, 1.0F}; - Color[] colors = new Color[]{Color.RED, Color.YELLOW, Color.GREEN}; - float progress = distance * 1.25F * 0.01F; - - Color color = Utils.blendColors(fractions, colors, progress).brighter(); - float width = 1.0f; - float partialTicks = event.partialTicks; - - float r = ((float) 1 / 255) * color.getRed(); - float g = ((float) 1 / 255) * color.getGreen(); - float b = ((float) 1 / 255) * color.getBlue(); - GL11.glPushMatrix(); - - GL11.glLoadIdentity(); - - Method orientCamera = ReflectionHelper.findMethod(EntityRenderer.class, mc.entityRenderer, new String[]{"orientCamera"}, float.class); - try { - //mc.entityRenderer.orientCamera(partialTicks); - orientCamera.invoke(mc.entityRenderer, partialTicks); - } catch (IllegalAccessException illegalAccessException) { - illegalAccessException.printStackTrace(); - } catch (InvocationTargetException invocationTargetException) { - invocationTargetException.printStackTrace(); - } - - GL11.glDisable(2929); - GL11.glDisable(3553); - GL11.glEnable(3042); - GL11.glBlendFunc(770, 771); - - GL11.glEnable(GL11.GL_LINE_SMOOTH); - - double x = Utils.interpolate(entity.posX, entity.lastTickPosX, partialTicks) - mc.getRenderManager().viewerPosX; - double y = Utils.interpolate(entity.posY + entity.getEyeHeight(), entity.lastTickPosY + entity.getEyeHeight(), partialTicks) - mc.getRenderManager().viewerPosY; - double z = Utils.interpolate(entity.posZ, entity.lastTickPosZ, partialTicks) - mc.getRenderManager().viewerPosZ; - - GL11.glLineWidth(width); - - GL11.glBegin(GL11.GL_LINE_STRIP); - { - GL11.glColor3d(r, g, b); - GL11.glVertex3d(x, y, z); - GL11.glVertex3d(0.0, mc.thePlayer.getEyeHeight(), 0.0); - GL11.glEnd(); - GL11.glDisable(GL11.GL_LINE_SMOOTH); - - GL11.glDisable(3042); - GL11.glEnable(3553); - GL11.glEnable(2929); - - GL11.glPopMatrix(); - } - - } - } - } - } @SubscribeEvent diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 8e998f2..b2f6824 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index a003762..7c9c2f0 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -65,7 +65,6 @@ public class DankerGuiCommand extends CommandBase { debug.append("[creeperpuzzle][").append(ToggleCommand.creeperToggled).append("]\n"); debug.append("[waterpuzzle][").append(ToggleCommand.waterToggled).append("]\n"); debug.append("[tictactoepuzzle][").append(ToggleCommand.ticTacToeToggled).append("]\n"); - debug.append("[traceinactiveterminals][").append(ToggleCommand.traceInactiveTerminalsToggled).append("]\n"); debug.append("[startswithterminal][").append(ToggleCommand.startsWithToggled).append("]\n"); debug.append("[selectallterminal][").append(ToggleCommand.selectAllToggled).append("]\n"); debug.append("[clickinorderterminal][").append(ToggleCommand.clickInOrderToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index d9d7024..3b1c04d 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -48,7 +48,6 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean waterToggled; public static boolean ticTacToeToggled; // Terminal Helpers - public static boolean traceInactiveTerminalsToggled; public static boolean startsWithToggled; public static boolean selectAllToggled; public static boolean clickInOrderToggled; @@ -71,7 +70,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "watchermessage/traceinactiveterminals/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; + "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -88,7 +87,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle", - "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "traceinactiveterminals", "startswithterminal", + "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); } @@ -265,12 +264,7 @@ public class ToggleCommand extends CommandBase implements ICommand { watcherReadyToggled = !watcherReadyToggled; ConfigHandler.writeBooleanConfig("toggles", "WatcherReadyMessage", watcherReadyToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display Watcher ready message has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + watcherReadyToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); - break; - case "traceinactiveterminals": - traceInactiveTerminalsToggled = !traceInactiveTerminalsToggled; - ConfigHandler.writeBooleanConfig("toggles", "TraceInactiveTerminals", traceInactiveTerminalsToggled); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Trace inactive terminals has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + traceInactiveTerminalsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); - break; + break; case "startswithterminal": startsWithToggled = !startsWithToggled; ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", startsWithToggled); diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java index 693e6c4..17eb433 100644 --- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -22,7 +22,6 @@ public class PuzzleSolversGui extends GuiScreen { private GuiButton creeper; private GuiButton water; private GuiButton ticTacToe; - private GuiButton traceInactive; private GuiButton startsWith; private GuiButton selectAll; private GuiButton clickOrder; @@ -57,14 +56,12 @@ public class PuzzleSolversGui extends GuiScreen { creeper = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled)); water = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled)); ticTacToe = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Tic Tac Toe Solver: " + Utils.getColouredBoolean(ToggleCommand.ticTacToeToggled)); - traceInactive = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Trace Inactive Terminals: " + Utils.getColouredBoolean(ToggleCommand.traceInactiveTerminalsToggled)); - + startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); // Page 2 - startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled)); - selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); - clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Click in Order Terminal Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); - blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); - itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); + selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled)); + clickOrder = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click in Order Terminal Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled)); + blockClicks = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Block Wrong Clicks on Terminals: " + Utils.getColouredBoolean(ToggleCommand.blockWrongTerminalClicksToggled)); + itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled)); switch (page) { case 1: @@ -74,11 +71,10 @@ public class PuzzleSolversGui extends GuiScreen { this.buttonList.add(creeper); this.buttonList.add(water); this.buttonList.add(ticTacToe); - this.buttonList.add(traceInactive); + this.buttonList.add(startsWith); this.buttonList.add(nextPage); break; case 2: - this.buttonList.add(startsWith); this.buttonList.add(selectAll); this.buttonList.add(clickOrder); this.buttonList.add(blockClicks); @@ -127,10 +123,6 @@ public class PuzzleSolversGui extends GuiScreen { ToggleCommand.ticTacToeToggled = !ToggleCommand.ticTacToeToggled; ConfigHandler.writeBooleanConfig("toggles", "TicTacToePuzzle", ToggleCommand.ticTacToeToggled); ticTacToe.displayString = "Tic Tac Toe Solver: " + Utils.getColouredBoolean(ToggleCommand.ticTacToeToggled); - } else if (button == traceInactive) { - ToggleCommand.traceInactiveTerminalsToggled = !ToggleCommand.traceInactiveTerminalsToggled; - ConfigHandler.writeBooleanConfig("toggles", "TraceInactiveTerminals", ToggleCommand.traceInactiveTerminalsToggled); - traceInactive.displayString = "Trace Inactive Terminals: " + Utils.getColouredBoolean(ToggleCommand.traceInactiveTerminalsToggled); } else if (button == startsWith) { ToggleCommand.startsWithToggled = !ToggleCommand.startsWithToggled; ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", ToggleCommand.startsWithToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index aae3f59..531d631 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -202,7 +202,6 @@ public class ConfigHandler { if (!hasKey("toggles", "CreeperPuzzle")) writeBooleanConfig("toggles", "CreeperPuzzle", false); if (!hasKey("toggles", "WaterPuzzle")) writeBooleanConfig("toggles", "WaterPuzzle", false); if (!hasKey("toggles", "TicTacToePuzzle")) writeBooleanConfig("toggles", "TicTacToePuzzle", false); - if (!hasKey("toggles", "TraceInactiveTerminals")) writeBooleanConfig("toggles", "TraceInactiveTerminals", false); if (!hasKey("toggles", "StartsWithTerminal")) writeBooleanConfig("toggles", "StartsWithTerminal", false); if (!hasKey("toggles", "SelectAllTerminal")) writeBooleanConfig("toggles", "SelectAllTerminal", false); if (!hasKey("toggles", "ClickInOrderTerminal")) writeBooleanConfig("toggles", "ClickInOrderTerminal", false); @@ -470,7 +469,6 @@ public class ConfigHandler { ToggleCommand.creeperToggled = getBoolean("toggles", "CreeperPuzzle"); ToggleCommand.waterToggled = getBoolean("toggles", "WaterPuzzle"); ToggleCommand.ticTacToeToggled = getBoolean("toggles", "TicTacToePuzzle"); - ToggleCommand.traceInactiveTerminalsToggled = getBoolean("toggles", "TraceInactiveTerminals"); ToggleCommand.startsWithToggled = getBoolean("toggles", "StartsWithTerminal"); ToggleCommand.selectAllToggled = getBoolean("toggles", "SelectAllTerminal"); ToggleCommand.clickInOrderToggled = getBoolean("toggles", "ClickInOrderTerminal"); diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 6c1fadb..e4f7873 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -25,7 +25,6 @@ import net.minecraft.util.*; import org.lwjgl.opengl.GL11; import java.awt.*; -import java.text.NumberFormat; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -387,96 +386,6 @@ public class Utils { RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); } - - public static double interpolate(double current, double old, double scale) { - return old + (current - old) * scale; - } - - // Yoink! https://stackoverflow.com/a/51780112 - public static Color blendColors(float[] fractions, Color[] colors, float progress) { - Color color; - if (fractions != null) { - if (colors != null) { - if (fractions.length == colors.length) { - int[] indices = getFractionIndices(fractions, progress); - if (indices[0] >= 0 && indices[0] < fractions.length && indices[1] >= 0 && indices[1] < fractions.length) { - float[] range = new float[]{fractions[indices[0]], fractions[indices[1]]}; - Color[] colorRange = new Color[]{colors[indices[0]], colors[indices[1]]}; - float max = range[1] - range[0]; - float value = progress - range[0]; - float weight = value / max; - color = blend(colorRange[0], colorRange[1], 1.0F - weight); - return color; - } else { - return colors[0]; - } - } else { - throw new IllegalArgumentException("Fractions and colours must have equal number of elements"); - } - } else { - throw new IllegalArgumentException("Colors can't be null"); - } - } else { - throw new IllegalArgumentException("Fractions can't be null"); - } - } - - public static int[] getFractionIndices(float[] fractions, float progress) { - int[] range = new int[2]; - - int startPoint; - for (startPoint = 0; startPoint < fractions.length && fractions[startPoint] <= progress; ++startPoint) { - } - - if (startPoint >= fractions.length) { - startPoint = fractions.length - 1; - } - - range[0] = startPoint - 1; - range[1] = startPoint; - return range; - } - - public static Color blend(Color color1, Color color2, double ratio) { - float r = (float) ratio; - float ir = 1.0F - r; - float[] rgb1 = new float[3]; - float[] rgb2 = new float[3]; - color1.getColorComponents(rgb1); - color2.getColorComponents(rgb2); - float red = rgb1[0] * r + rgb2[0] * ir; - float green = rgb1[1] * r + rgb2[1] * ir; - float blue = rgb1[2] * r + rgb2[2] * ir; - if (red < 0.0F) { - red = 0.0F; - } else if (red > 255.0F) { - red = 255.0F; - } - - if (green < 0.0F) { - green = 0.0F; - } else if (green > 255.0F) { - green = 255.0F; - } - - if (blue < 0.0F) { - blue = 0.0F; - } else if (blue > 255.0F) { - blue = 255.0F; - } - - Color color = null; - - try { - color = new Color(red, green, blue); - } catch (IllegalArgumentException var14) { - NumberFormat nf = NumberFormat.getNumberInstance(); - System.out.println(nf.format(red) + "; " + nf.format(green) + "; " + nf.format(blue)); - var14.printStackTrace(); - } - - return color; - } public static BlockPos getFirstBlockPosAfterVectors(Minecraft mc, Vec3 pos1, Vec3 pos2, int strength, int distance) { double x = pos2.xCoord - pos1.xCoord; @@ -532,5 +441,5 @@ public class Utils { return null; } } - + } -- cgit From eb4bf8a8191add4fd50dbc0daa088ec42bf8eb6d Mon Sep 17 00:00:00 2001 From: Kal Draganov Date: Mon, 14 Dec 2020 18:49:29 -0500 Subject: Move EditLocations Button to Main Moved editLocations GUI button to the main pages. --- src/main/java/me/Danker/gui/DankerGui.java | 6 ++++++ src/main/java/me/Danker/gui/DisplayGui.java | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 613e968..de99686 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -24,6 +24,7 @@ public class DankerGui extends GuiScreen { private GuiButton nextPage; private GuiButton githubLink; private GuiButton discordLink; + private GuiButton editLocations; private GuiButton changeDisplay; private GuiButton onlySlayer; private GuiButton puzzleSolvers; @@ -80,6 +81,7 @@ public class DankerGui extends GuiScreen { nextPage = new GuiButton(0, width / 2 + 20, (int) (height * 0.8), 80, 20, "Next >"); githubLink = new GuiButton(0, 2, height - 50, 80, 20, "GitHub"); discordLink = new GuiButton(0, 2, height - 30, 80, 20, "Discord"); + editLocations = new GuiButton(0, 2, 5, 100, 20, "Edit Locations"); // Page 1 changeDisplay = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Change Display Settings"); @@ -117,6 +119,7 @@ public class DankerGui extends GuiScreen { stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + switch (page) { case 1: this.buttonList.add(changeDisplay); @@ -172,6 +175,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(githubLink); this.buttonList.add(discordLink); this.buttonList.add(closeGUI); + this.buttonList.add(editLocations); } @Override @@ -191,6 +195,8 @@ public class DankerGui extends GuiScreen { DankersSkyblockMod.guiToOpen = "dankergui" + (page + 1); } else if (button == backPage) { DankersSkyblockMod.guiToOpen = "dankergui" + (page - 1); + } else if (button == editLocations) { + DankersSkyblockMod.guiToOpen = "editlocations"; } else if (button == githubLink) { try { Desktop.getDesktop().browse(new URI("https://github.com/bowser0000/SkyblockMod")); diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java index f498a67..2f704b3 100644 --- a/src/main/java/me/Danker/gui/DisplayGui.java +++ b/src/main/java/me/Danker/gui/DisplayGui.java @@ -15,7 +15,6 @@ public class DisplayGui extends GuiScreen { private boolean addSession = false; private GuiButton goBack; - private GuiButton editLocations; private GuiButton off; private GuiButton showSession; private GuiButton zombie; @@ -49,7 +48,6 @@ public class DisplayGui extends GuiScreen { int width = sr.getScaledWidth(); goBack = new GuiButton(0, 2, height - 30, 100, 20, "Go Back"); - editLocations = new GuiButton(0, 2, height - 55, 100, 20, "Edit Locations"); showSession = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Current Session Only: " + Utils.getColouredBoolean(addSession)); off = new GuiButton(0, width / 2 - 210, (int) (height * 0.2), "Off"); auto = new GuiButton(0, width / 2 + 10, (int) (height * 0.2), "Auto"); @@ -87,7 +85,6 @@ public class DisplayGui extends GuiScreen { this.buttonList.add(catacombsF5); this.buttonList.add(catacombsF6); this.buttonList.add(catacombsF7); - this.buttonList.add(editLocations); this.buttonList.add(goBack); } @@ -116,8 +113,6 @@ public class DisplayGui extends GuiScreen { public void actionPerformed(GuiButton button) { if (button == goBack) { DankersSkyblockMod.guiToOpen = "dankergui1"; - } else if (button == editLocations) { - DankersSkyblockMod.guiToOpen = "editlocations"; } else if (button == showSession) { addSession = !addSession; showSession.displayString = "Current Session Only: " + Utils.getColouredBoolean(addSession); -- cgit From 120264a46d06a2dcc9e4f75e39c2411f98c24427 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 14 Dec 2020 19:15:53 -0500 Subject: Fixed click in order --- src/main/java/me/Danker/DankersSkyblockMod.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 69f54cf..b55131e 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2741,13 +2741,13 @@ public class DankersSkyblockMod } if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { - if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 14; + if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 15; for(int i = 10; i <= 25; i++) { if (i == 17 || i == 18) continue; ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); - if (prevStack == null) terminalNumberNeeded[0] = 14; - else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) terminalNumberNeeded[0] = 14; - else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 14; + if (prevStack == null) terminalNumberNeeded[0] = 15; + else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) terminalNumberNeeded[0] = 15; + else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 15; ItemStack itemStack = invSlots.get(i).getStack(); if (itemStack == null) continue; -- cgit From dc78cd7e258cf9f074652111627be02d419241ab Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 14 Dec 2020 22:15:15 -0800 Subject: fix indent --- src/main/java/me/Danker/gui/DankerGui.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 6cba141..0a4f0a3 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -120,7 +120,7 @@ public class DankerGui extends GuiScreen { watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); - flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); + flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); switch (page) { case 1: -- cgit From 638892cc5fe10a379ae5734b8d6e9e2caff1fa00 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Mon, 14 Dec 2020 22:17:19 -0800 Subject: indent still wrong bc im bad --- src/main/java/me/Danker/gui/DankerGui.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 0a4f0a3..dbb6c11 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -171,7 +171,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(watcherReadyMessage); this.buttonList.add(splitFishing); this.buttonList.add(notifySlayerSlain); - this.buttonList.add(flowerWeapons); + this.buttonList.add(flowerWeapons); this.buttonList.add(backPage); break; } -- cgit From eb239d0bc791d35fb6f37acf6b87193df07b1e0f Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Tue, 15 Dec 2020 19:22:32 -0500 Subject: New Color for Click In Order --- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index b55131e..77102bc 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3315,7 +3315,7 @@ public class DankersSkyblockMod if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { Slot slot = invSlots.get(terminalNumberNeeded[1]); - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); } if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { -- cgit From 31a53cbc4933c2a3b8ec11d4f55a67e42a4942ce Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Tue, 15 Dec 2020 20:51:11 -0500 Subject: Feature: Necron Notifications --- src/main/java/me/Danker/DankersSkyblockMod.java | 52 ++++++++++++++++++++++ src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 + .../java/me/Danker/commands/ToggleCommand.java | 9 +++- src/main/java/me/Danker/gui/DankerGui.java | 7 +++ .../java/me/Danker/handlers/ConfigHandler.java | 2 + 6 files changed, 70 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 77102bc..87fdd23 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -7,6 +7,8 @@ import me.Danker.handlers.*; import me.Danker.utils.TicTacToeUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; +import net.minecraft.block.state.BlockState; +import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.Gui; @@ -16,6 +18,7 @@ import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntitySpider; @@ -459,6 +462,55 @@ public class DankersSkyblockMod } } } + + if (ToggleCommand.necronNotificationsToggled && Utils.inDungeons && message.contains("[BOSS] Necron:")) { + Minecraft mc = Minecraft.getMinecraft(); + World world = mc.theWorld; + if (message.contains("You tricked me!") || message.contains("That beam, it hurts! IT HURTS!!")) { + Utils.createTitle(EnumChatFormatting.RED + "NECRON STUCK!", 2); + } else if (message.contains("STOP USING MY FACTORY AGAINST ME!") || message.contains("OOF") || message.contains("ANOTHER TRAP!! YOUR TRICKS ARE FUTILE!") || message.contains("SERIOUSLY? AGAIN?!") || message.contains("STOP!!!!!")) { + List necronLabels = world.getEntities(EntityArmorStand.class, (entity->{ + if (!entity.hasCustomName()) return false; + if (!entity.getCustomNameTag().contains("Necron")) return false; + return true; + })); + if(necronLabels.size() == 0) { + Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + } else { + EntityArmorStand necron = necronLabels.get(0); + double x = necron.posX; + double z = necron.posZ; + + BlockPos blockPos = new BlockPos(x, 168, z); + + IBlockState blockState = world.getBlockState(blockPos); + Block block = blockState.getBlock(); + + if (block != Blocks.stained_hardened_clay) { + Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + } else { + switch (block.getDamageValue(world, blockPos)) { + case 4: + Utils.createTitle(EnumChatFormatting.YELLOW + "YELLOW PILLAR!", 2); + break; + case 5: + Utils.createTitle(EnumChatFormatting.GREEN + "LIME PILLAR!", 2); + break; + case 11: + Utils.createTitle(EnumChatFormatting.BLUE + "BLUE PILLAR!", 2); + break; + default: + Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + } + } + + } + } else if (message.contains("I'VE HAD ENOUGH! YOU'RE NOT HITTING ME WITH ANY MORE PILLARS!")) { + Utils.createTitle(EnumChatFormatting.RED + "RED PILLAR!", 2); + } else if (message.contains("ARGH!")) { + Utils.createTitle(EnumChatFormatting.RED + "EXPLOSION OVER!", 2); + } + } if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { watcherClearTime = System.currentTimeMillis() / 1000; diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index b2f6824..e4e7037 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 7c9c2f0..813624e 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -59,6 +59,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n"); debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n"); debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); + debug.append("[necronnotifications][").append(ToggleCommand.necronNotificationsToggled).append("]\n"); debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 3b1c04d..30cbcc5 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -40,6 +40,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean watcherReadyToggled; public static boolean swapToPickBlockToggled; public static boolean notifySlayerSlainToggled; + public static boolean necronNotificationsToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -69,7 +70,7 @@ public class ToggleCommand extends CommandBase implements ICommand { return "/" + getCommandName() + " "; } @@ -86,7 +87,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", - "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); @@ -230,6 +231,10 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", notifySlayerSlainToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Notify when slayer slain has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + notifySlayerSlainToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "necronnotifications": + necronNotificationsToggled = !necronNotificationsToggled; + ConfigHandler.writeBooleanConfig("toggles", "NecronNotifications", necronNotificationsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Necron phase notifications has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); case "threemanpuzzle": threeManToggled = !threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index ff6d5d0..86ab1aa 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -57,6 +57,7 @@ public class DankerGui extends GuiScreen { private GuiButton watcherReadyMessage; private GuiButton pickBlock; private GuiButton notifySlayerSlain; + private GuiButton necronNotifications; public DankerGui(int page) { this.page = page; @@ -119,6 +120,7 @@ public class DankerGui extends GuiScreen { watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); + necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); switch (page) { case 1: @@ -169,6 +171,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(watcherReadyMessage); this.buttonList.add(splitFishing); this.buttonList.add(notifySlayerSlain); + this.buttonList.add(necronNotifications); this.buttonList.add(backPage); break; } @@ -321,6 +324,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.notifySlayerSlainToggled = !ToggleCommand.notifySlayerSlainToggled; ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", ToggleCommand.notifySlayerSlainToggled); notifySlayerSlain.displayString = "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled); + } else if (button == necronNotifications) { + ToggleCommand.necronNotificationsToggled = !ToggleCommand.necronNotificationsToggled; + ConfigHandler.writeBooleanConfig("toggles", "NecronNotifications", ToggleCommand.necronNotificationsToggled); + necronNotifications.displayString = "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled); } else if (button == pickBlock) { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 531d631..ce34b39 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -195,6 +195,8 @@ public class ConfigHandler { if (!hasKey("toggles", "WatcherReadyMessage")) writeBooleanConfig("toggles", "WatcherReadyMessage", false); if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); + if (!hasKey("toggles", "NecronNotifications")) writeBooleanConfig("toggles", "NecronNotifications", false); + // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); -- cgit From 68d5bf758118f07b006c4e333259b014b1954b5d Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Tue, 15 Dec 2020 23:35:34 -0500 Subject: Add a message if OldAnimationsMod is detected --- src/main/java/me/Danker/DankersSkyblockMod.java | 31 +++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 87fdd23..a1b9b2a 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -7,7 +7,6 @@ import me.Danker.handlers.*; import me.Danker.utils.TicTacToeUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; -import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; @@ -101,6 +100,7 @@ public class DankersSkyblockMod static double lastMaddoxTime = 0; static KeyBinding[] keyBindings = new KeyBinding[2]; static boolean usingLabymod = false; + static boolean usingSpiderFrogOldAnimationsMod = false; public static String guiToOpen = null; static boolean foundLivid = false; static Entity livid = null; @@ -310,6 +310,13 @@ public class DankersSkyblockMod public void postInit(final FMLPostInitializationEvent event) { usingLabymod = Loader.isModLoaded("labymod"); System.out.println("LabyMod detection: " + usingLabymod); + try { + Class clazz = Class.forName("com.spiderfrog.oldanimations.OldAnimationsMod"); + usingSpiderFrogOldAnimationsMod = true; + } catch (Exception var1) { + usingSpiderFrogOldAnimationsMod = false; + } + System.out.println("OldAnimationsMod detection: " + usingSpiderFrogOldAnimationsMod); } // Update checker @@ -317,7 +324,27 @@ public class DankersSkyblockMod public void onJoin(EntityJoinWorldEvent event) { if (!updateChecked) { updateChecked = true; - + + if (usingSpiderFrogOldAnimationsMod) { + new Thread(()->{ + while (true) { + if (Minecraft.getMinecraft().thePlayer == null) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } else { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + + "You are using spiderfrog's OldAnimationsMod.\n" + + "Danker's Skyblock Mod is incompatible with OldAnimationsMod.\n" + + "Please remove OldAnimationsMod or you may experience crashes or other issues.")); + break; + } + } + }).start(); + } + // MULTI THREAD DRIFTING new Thread(() -> { EntityPlayer player = Minecraft.getMinecraft().thePlayer; -- cgit From dee3a496e24335bfc9272f3cf4c13b5303dbcdfe Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 16 Dec 2020 13:42:13 -0500 Subject: Clear Tooltips on Click in Order --- src/main/java/me/Danker/DankersSkyblockMod.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index a1b9b2a..dfe8a9c 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2400,6 +2400,11 @@ public class DankersSkyblockMod if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { event.toolTip.clear(); } + + if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { + event.toolTip.clear(); + } + } } -- cgit From 930a7e51b12ccc005dc3bb19c34846c70084224b Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 16 Dec 2020 13:43:42 -0500 Subject: Config for Necron Notifications --- src/main/java/me/Danker/handlers/ConfigHandler.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index ce34b39..383dabf 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -463,7 +463,9 @@ public class ConfigHandler { ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); ToggleCommand.watcherReadyToggled = getBoolean("toggles", "WatcherReadyMessage"); ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain"); + ToggleCommand.necronNotificationsToggled = getBoolean("toggles", "NecronNotifications"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); + // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle"); -- cgit From e0796b9b06df462081048eb075febcefd230806f Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 16 Dec 2020 14:18:43 -0500 Subject: Update Click in Order! --- src/main/java/me/Danker/DankersSkyblockMod.java | 77 ++++++++++++++----------- 1 file changed, 44 insertions(+), 33 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index dfe8a9c..335d1ed 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -125,7 +125,7 @@ public class DankersSkyblockMod static String waterAnswers = null; static AxisAlignedBB correctTicTacToeButton = null; static Pattern startsWithTerminalPattern = Pattern.compile("[A-Z]{2,}"); - static Slot[] clickInOrderSlots = new Slot[36]; + static Slot[] ultraSequencerSlots = new Slot[36]; static int lastChronomatronRound = 0; static List chronomatronPattern = new ArrayList<>(); static int chronomatronMouseClicks = 0; @@ -134,7 +134,8 @@ public class DankersSkyblockMod static int pickBlockBind; static boolean pickBlockBindSwapped = false; static String terminalColorNeeded; - static int[] terminalNumberNeeded = new int[2]; + static int clickInOrderMouseClicks = 0; + static int[] clickInOrderSlots = new int[14]; static double dungeonStartTime = 0; static double bloodOpenTime = 0; @@ -2800,7 +2801,7 @@ public class DankersSkyblockMod String itemName = StringUtils.stripControlCodes(invSlots.get(i).getStack().getDisplayName()); if (itemName.matches("\\d+")) { int number = Integer.parseInt(itemName); - clickInOrderSlots[number - 1] = invSlots.get(i); + ultraSequencerSlots[number - 1] = invSlots.get(i); } } } @@ -2811,7 +2812,8 @@ public class DankersSkyblockMod ItemStack itemStack = invSlots.get(i).getStack(); if (itemStack == null) continue; String itemName = itemStack.getDisplayName(); - if (Item.getIdFromItem(itemStack.getItem()) == 95 || Item.getIdFromItem(itemStack.getItem()) == 160) continue; + if (Item.getIdFromItem(itemStack.getItem()) == 95 || Item.getIdFromItem(itemStack.getItem()) == 160) + continue; if (itemName.contains("Instant Find") || itemName.contains("Gained +")) continue; if (itemName.contains("Enchanted Book")) { itemName = itemStack.getTooltip(mc.thePlayer, false).get(3); @@ -2824,22 +2826,7 @@ public class DankersSkyblockMod } } - if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { - if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 15; - for(int i = 10; i <= 25; i++) { - if (i == 17 || i == 18) continue; - ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); - if (prevStack == null) terminalNumberNeeded[0] = 15; - else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) terminalNumberNeeded[0] = 15; - else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 15; - ItemStack itemStack = invSlots.get(i).getStack(); - if (itemStack == null) continue; - if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; - if (itemStack.getItemDamage() != 14) continue; - if (itemStack.stackSize < terminalNumberNeeded[0]) { - terminalNumberNeeded[0] = itemStack.stackSize; - terminalNumberNeeded[1] = i; } } } @@ -3151,7 +3138,7 @@ public class DankersSkyblockMod if (event.isCancelable()) event.setCanceled(true); return; } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a")) { - if (clickInOrderSlots[lastUltraSequencerClicked] != null && mouseSlot.getSlotIndex() != clickInOrderSlots[lastUltraSequencerClicked].getSlotIndex()) { + if (ultraSequencerSlots[lastUltraSequencerClicked] != null && mouseSlot.getSlotIndex() != ultraSequencerSlots[lastUltraSequencerClicked].getSlotIndex()) { if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) event.setCanceled(true); return; @@ -3217,9 +3204,10 @@ public class DankersSkyblockMod shouldCancel = true; break; } - int needed = terminalNumberNeeded[0]; - if(needed == 0) break; - shouldCancel = needed != -1 && item.stackSize != needed ; + if (clickInOrderMouseClicks > 13) break; + int slot = clickInOrderSlots[clickInOrderMouseClicks]; + if (slot == 0) break; + shouldCancel = mouseSlot.getSlotIndex() != slot; break; } @@ -3235,6 +3223,11 @@ public class DankersSkyblockMod } event.setCanceled(shouldCancel && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)); + return; + } + + if (ToggleCommand.clickInOrderToggled && inventoryName.equals("Click in order!")) { + clickInOrderMouseClicks++; } if (!BlockSlayerCommand.onlySlayerName.equals("") && item != null) { @@ -3302,13 +3295,13 @@ public class DankersSkyblockMod pickBlockBindSwapped = false; } } - clickInOrderSlots = new Slot[36]; + ultraSequencerSlots = new Slot[36]; lastChronomatronRound = 0; chronomatronPattern.clear(); chronomatronMouseClicks = 0; experimentTableSlots = new ItemStack[54]; terminalColorNeeded = null; - terminalNumberNeeded = new int[2]; + clickInOrderMouseClicks = 0; } @SubscribeEvent @@ -3398,15 +3391,33 @@ public class DankersSkyblockMod } if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { - Slot slot = invSlots.get(terminalNumberNeeded[1]); - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); + if(clickInOrderSlots[0] == 0) { + for(int i = 10; i <= 25; i++) { + if (i == 17 || i == 18) continue; + ItemStack itemStack = invSlots.get(i).getStack(); + if (itemStack == null) continue; + if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + clickInOrderSlots[itemStack.stackSize - 1] = i; + } + } + + if (clickInOrderMouseClicks < 14) { + Slot slot = invSlots.get(clickInOrderSlots[clickInOrderMouseClicks]); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); + + if (clickInOrderMouseClicks < 13) { + Slot nextSlot = invSlots.get(clickInOrderSlots[clickInOrderMouseClicks + 1]); + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(0, 255, 217, 255).getRGB()); + } + + } } if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a")) { lastUltraSequencerClicked = 0; - for (Slot slot : clickInOrderSlots) { + for (Slot slot : ultraSequencerSlots) { if (slot != null && slot.getStack() != null && StringUtils.stripControlCodes(slot.getStack().getDisplayName()).matches("\\d+")) { int number = Integer.parseInt(StringUtils.stripControlCodes(slot.getStack().getDisplayName())); if (number > lastUltraSequencerClicked) { @@ -3414,13 +3425,13 @@ public class DankersSkyblockMod } } } - if (clickInOrderSlots[lastUltraSequencerClicked] != null) { - Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; + if (ultraSequencerSlots[lastUltraSequencerClicked] != null) { + Slot nextSlot = ultraSequencerSlots[lastUltraSequencerClicked]; Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40); } - if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { - if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { - Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; + if (lastUltraSequencerClicked + 1 < ultraSequencerSlots.length) { + if (ultraSequencerSlots[lastUltraSequencerClicked + 1] != null) { + Slot nextSlot = ultraSequencerSlots[lastUltraSequencerClicked + 1]; Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6); } } -- cgit From 43f87af98b019166a79630ec425271d95fa7947f Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 16 Dec 2020 15:38:04 -0500 Subject: Revert "Update Click in Order!" This reverts commit e0796b9b06df462081048eb075febcefd230806f. --- src/main/java/me/Danker/DankersSkyblockMod.java | 77 +++++++++++-------------- 1 file changed, 33 insertions(+), 44 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 335d1ed..dfe8a9c 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -125,7 +125,7 @@ public class DankersSkyblockMod static String waterAnswers = null; static AxisAlignedBB correctTicTacToeButton = null; static Pattern startsWithTerminalPattern = Pattern.compile("[A-Z]{2,}"); - static Slot[] ultraSequencerSlots = new Slot[36]; + static Slot[] clickInOrderSlots = new Slot[36]; static int lastChronomatronRound = 0; static List chronomatronPattern = new ArrayList<>(); static int chronomatronMouseClicks = 0; @@ -134,8 +134,7 @@ public class DankersSkyblockMod static int pickBlockBind; static boolean pickBlockBindSwapped = false; static String terminalColorNeeded; - static int clickInOrderMouseClicks = 0; - static int[] clickInOrderSlots = new int[14]; + static int[] terminalNumberNeeded = new int[2]; static double dungeonStartTime = 0; static double bloodOpenTime = 0; @@ -2801,7 +2800,7 @@ public class DankersSkyblockMod String itemName = StringUtils.stripControlCodes(invSlots.get(i).getStack().getDisplayName()); if (itemName.matches("\\d+")) { int number = Integer.parseInt(itemName); - ultraSequencerSlots[number - 1] = invSlots.get(i); + clickInOrderSlots[number - 1] = invSlots.get(i); } } } @@ -2812,8 +2811,7 @@ public class DankersSkyblockMod ItemStack itemStack = invSlots.get(i).getStack(); if (itemStack == null) continue; String itemName = itemStack.getDisplayName(); - if (Item.getIdFromItem(itemStack.getItem()) == 95 || Item.getIdFromItem(itemStack.getItem()) == 160) - continue; + if (Item.getIdFromItem(itemStack.getItem()) == 95 || Item.getIdFromItem(itemStack.getItem()) == 160) continue; if (itemName.contains("Instant Find") || itemName.contains("Gained +")) continue; if (itemName.contains("Enchanted Book")) { itemName = itemStack.getTooltip(mc.thePlayer, false).get(3); @@ -2826,7 +2824,22 @@ public class DankersSkyblockMod } } + if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { + if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 15; + for(int i = 10; i <= 25; i++) { + if (i == 17 || i == 18) continue; + ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); + if (prevStack == null) terminalNumberNeeded[0] = 15; + else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) terminalNumberNeeded[0] = 15; + else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 15; + ItemStack itemStack = invSlots.get(i).getStack(); + if (itemStack == null) continue; + if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (itemStack.getItemDamage() != 14) continue; + if (itemStack.stackSize < terminalNumberNeeded[0]) { + terminalNumberNeeded[0] = itemStack.stackSize; + terminalNumberNeeded[1] = i; } } } @@ -3138,7 +3151,7 @@ public class DankersSkyblockMod if (event.isCancelable()) event.setCanceled(true); return; } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a")) { - if (ultraSequencerSlots[lastUltraSequencerClicked] != null && mouseSlot.getSlotIndex() != ultraSequencerSlots[lastUltraSequencerClicked].getSlotIndex()) { + if (clickInOrderSlots[lastUltraSequencerClicked] != null && mouseSlot.getSlotIndex() != clickInOrderSlots[lastUltraSequencerClicked].getSlotIndex()) { if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) event.setCanceled(true); return; @@ -3204,10 +3217,9 @@ public class DankersSkyblockMod shouldCancel = true; break; } - if (clickInOrderMouseClicks > 13) break; - int slot = clickInOrderSlots[clickInOrderMouseClicks]; - if (slot == 0) break; - shouldCancel = mouseSlot.getSlotIndex() != slot; + int needed = terminalNumberNeeded[0]; + if(needed == 0) break; + shouldCancel = needed != -1 && item.stackSize != needed ; break; } @@ -3223,11 +3235,6 @@ public class DankersSkyblockMod } event.setCanceled(shouldCancel && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)); - return; - } - - if (ToggleCommand.clickInOrderToggled && inventoryName.equals("Click in order!")) { - clickInOrderMouseClicks++; } if (!BlockSlayerCommand.onlySlayerName.equals("") && item != null) { @@ -3295,13 +3302,13 @@ public class DankersSkyblockMod pickBlockBindSwapped = false; } } - ultraSequencerSlots = new Slot[36]; + clickInOrderSlots = new Slot[36]; lastChronomatronRound = 0; chronomatronPattern.clear(); chronomatronMouseClicks = 0; experimentTableSlots = new ItemStack[54]; terminalColorNeeded = null; - clickInOrderMouseClicks = 0; + terminalNumberNeeded = new int[2]; } @SubscribeEvent @@ -3391,33 +3398,15 @@ public class DankersSkyblockMod } if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { - if(clickInOrderSlots[0] == 0) { - for(int i = 10; i <= 25; i++) { - if (i == 17 || i == 18) continue; - ItemStack itemStack = invSlots.get(i).getStack(); - if (itemStack == null) continue; - if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; - clickInOrderSlots[itemStack.stackSize - 1] = i; - } - } - - if (clickInOrderMouseClicks < 14) { - Slot slot = invSlots.get(clickInOrderSlots[clickInOrderMouseClicks]); - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); - - if (clickInOrderMouseClicks < 13) { - Slot nextSlot = invSlots.get(clickInOrderSlots[clickInOrderMouseClicks + 1]); - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(0, 255, 217, 255).getRGB()); - } - - } + Slot slot = invSlots.get(terminalNumberNeeded[1]); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); } if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a")) { lastUltraSequencerClicked = 0; - for (Slot slot : ultraSequencerSlots) { + for (Slot slot : clickInOrderSlots) { if (slot != null && slot.getStack() != null && StringUtils.stripControlCodes(slot.getStack().getDisplayName()).matches("\\d+")) { int number = Integer.parseInt(StringUtils.stripControlCodes(slot.getStack().getDisplayName())); if (number > lastUltraSequencerClicked) { @@ -3425,13 +3414,13 @@ public class DankersSkyblockMod } } } - if (ultraSequencerSlots[lastUltraSequencerClicked] != null) { - Slot nextSlot = ultraSequencerSlots[lastUltraSequencerClicked]; + if (clickInOrderSlots[lastUltraSequencerClicked] != null) { + Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40); } - if (lastUltraSequencerClicked + 1 < ultraSequencerSlots.length) { - if (ultraSequencerSlots[lastUltraSequencerClicked + 1] != null) { - Slot nextSlot = ultraSequencerSlots[lastUltraSequencerClicked + 1]; + if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { + if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { + Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6); } } -- cgit From 4b1addfd3d47085811693764c15a7dfafd443c6c Mon Sep 17 00:00:00 2001 From: Sychic Date: Thu, 17 Dec 2020 04:52:36 -0500 Subject: Warning for Spiderfrog's old animations mod. --- src/main/java/me/Danker/DankersSkyblockMod.java | 32 ++++++++++-- src/main/java/me/Danker/gui/WarningGui.java | 61 ++++++++++++++++++++++ .../java/me/Danker/gui/WarningGuiRedirect.java | 28 ++++++++++ 3 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 src/main/java/me/Danker/gui/WarningGui.java create mode 100644 src/main/java/me/Danker/gui/WarningGuiRedirect.java (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index b7c853d..1023cdb 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1,5 +1,6 @@ package me.Danker; +import akka.event.Logging; import com.google.gson.JsonObject; import me.Danker.commands.*; import me.Danker.gui.*; @@ -9,9 +10,7 @@ import me.Danker.utils.Utils; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.GuiChat; -import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.gui.*; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; @@ -68,6 +67,7 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import java.awt.*; +import java.net.URLDecoder; import java.text.NumberFormat; import java.util.List; import java.util.*; @@ -98,6 +98,8 @@ public class DankersSkyblockMod static double lastMaddoxTime = 0; static KeyBinding[] keyBindings = new KeyBinding[2]; static boolean usingLabymod = false; + static boolean usingOAM = false; + static boolean OAMWarning = false; public static String guiToOpen = null; static boolean foundLivid = false; static Entity livid = null; @@ -305,9 +307,33 @@ public class DankersSkyblockMod @EventHandler public void postInit(final FMLPostInitializationEvent event) { + Package[] packages = Package.getPackages(); + for(Package p : packages){ + if(p.getName().startsWith("com.spiderfrog.gadgets")){ + usingOAM = true; + break; + } + } + System.out.println("OAM detection: " + usingOAM); + + usingLabymod = Loader.isModLoaded("labymod"); System.out.println("LabyMod detection: " + usingLabymod); } + + @SubscribeEvent + public void onGuiOpenEvent(GuiOpenEvent event){ + if(event.gui instanceof GuiMainMenu && usingOAM && !OAMWarning){ + System.out.println("Gui opened: Instance of GuiMainMenu."); + if(!(event.gui instanceof WarningGui)){ + System.out.println("No instance of WarningGui"); + event.gui = new WarningGuiRedirect(new WarningGui()); + OAMWarning = true; + }else{ + System.out.println("Instance of WarningGui"); + } + } + } // Update checker @SubscribeEvent diff --git a/src/main/java/me/Danker/gui/WarningGui.java b/src/main/java/me/Danker/gui/WarningGui.java new file mode 100644 index 0000000..63b4710 --- /dev/null +++ b/src/main/java/me/Danker/gui/WarningGui.java @@ -0,0 +1,61 @@ +package me.Danker.gui; + +import akka.event.Logging; +import me.Danker.handlers.TextRenderer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiLabel; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.ScaledResolution; + +import javax.xml.soap.Text; +import java.util.ArrayList; +import java.util.List; + +public class WarningGui extends GuiScreen { + private GuiButton close; + + public WarningGui(){ + + } + + @Override + public boolean doesGuiPauseGame() { + return false; + } + + @Override + public void initGui() { + super.initGui(); + + ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft()); + int height = sr.getScaledHeight(); + int width = sr.getScaledWidth(); + + close = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Close"); + + this.buttonList.add(close); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + this.drawDefaultBackground(); + String text0 = "§cWARNING!§0"; + int text0Width = mc.fontRendererObj.getStringWidth(text0); + new TextRenderer(mc, text0, (int)(width * 0.45) - text0Width / 2, (int) (height * 0.1), 2 ); + String text1 = "You are using SpiderFrog's Old Animations mod."; + int text1Width = mc.fontRendererObj.getStringWidth(text1); + new TextRenderer(mc, text1, width / 2 - text1Width / 2, (int) (height * 0.3), 1D ); + String text2 = "This mod breaks Danker's Skyblock Mod."; + int text2Width = mc.fontRendererObj.getStringWidth(text2); + new TextRenderer(mc, text2, width / 2 - text2Width / 2, (int) (height * 0.4), 1D); + super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public void actionPerformed(GuiButton button){ + if(button == close) { + Minecraft.getMinecraft().displayGuiScreen(null); + } + } +} diff --git a/src/main/java/me/Danker/gui/WarningGuiRedirect.java b/src/main/java/me/Danker/gui/WarningGuiRedirect.java new file mode 100644 index 0000000..78e6f18 --- /dev/null +++ b/src/main/java/me/Danker/gui/WarningGuiRedirect.java @@ -0,0 +1,28 @@ +package me.Danker.gui; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.ScaledResolution; + +public class WarningGuiRedirect extends GuiMainMenu { + public GuiScreen guiToShow; + private GuiButton close; + + protected void keyTyped(char par1, int par2){} + public WarningGuiRedirect(GuiScreen g){ + guiToShow = g; + } + + public void initGui(){ + super.initGui(); + } + + + public void drawScreen(int par1, int par2, float par3){ + super.drawScreen(par1, par2, par3); + + mc.displayGuiScreen(guiToShow); + } +} -- cgit From b453d6a47f45d677d7c55b5e8ccc5981b7b90c5b Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 09:51:36 -0500 Subject: Update ScoreboardHandler.java add a null check --- src/main/java/me/Danker/handlers/ScoreboardHandler.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/handlers/ScoreboardHandler.java b/src/main/java/me/Danker/handlers/ScoreboardHandler.java index b81689c..c8bc7c7 100644 --- a/src/main/java/me/Danker/handlers/ScoreboardHandler.java +++ b/src/main/java/me/Danker/handlers/ScoreboardHandler.java @@ -31,6 +31,7 @@ public class ScoreboardHandler { public static List getSidebarLines() { List lines = new ArrayList<>(); + if (Minecraft.getMinecraft().theWorld == null) return lines; Scoreboard scoreboard = Minecraft.getMinecraft().theWorld.getScoreboard(); if (scoreboard == null) return lines; -- cgit From b161c4dec6ee6a05c769d407bbd51a43bff4b4d6 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 17 Dec 2020 11:00:09 -0500 Subject: Fix icons rendering with tints --- README.md | 4 +++- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- src/main/java/me/Danker/commands/ToggleCommand.java | 3 ++- src/main/java/me/Danker/handlers/TextRenderer.java | 2 ++ 5 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/main/java/me') diff --git a/README.md b/README.md index bbf50bd..e251a76 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Discord Server: https://discord.gg/QsEkNQS - Golden T10/T6/T4 enchant display - Block AOTD ability - Block Livid Dagger ability +- Block placing Flower of Truth/Spirit Sceptre on dirt/grass - Disable Spirit Sceptre messages - Disable Midas Staff messages - Disable Implosion messages @@ -34,6 +35,7 @@ Discord Server: https://discord.gg/QsEkNQS - Catacombs F7 Stage 3 solvers (Starts with letter, select all colour, ignore arrows on sea lanterns) - Find correct Livid (with graphic display of HP) - Experimentation solvers (Ultrasequencer, Chronomatron, Superpairs) +- Hide tooltips in experiment addons - Pet background colors based on level - Golem spawning alerts - Skill xp/hour tracker @@ -47,7 +49,7 @@ Discord Server: https://discord.gg/QsEkNQS ## Commands - /dhelp - Returns this message in-game. - /dsm - Opens the GUI for Danker's Skyblock Mod. -- /toggle - Toggles features. /toggle list returns values of every toggle. +- /toggle - Toggles features. /toggle list returns values of every toggle. - /setkey - Sets API key. - /getkey - Returns key set with /setkey and copies it to your clipboard. - /loot [winter/spooky/f(1-7)/session] - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead. diff --git a/build.gradle b/build.gradle index d046b38..441a4db 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta4" +version = "1.8.5-beta5" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 86d2087..563e466 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -78,7 +78,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta3"; + public static final String VERSION = "1.8.5-beta5"; static double checkItemsNow = 0; static double itemsChecked = 0; diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index dab4ce2..15693ef 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -71,7 +71,8 @@ public class ToggleCommand extends CommandBase implements ICommand { "aotd/lividdagger/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + - "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; + "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" + + "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override diff --git a/src/main/java/me/Danker/handlers/TextRenderer.java b/src/main/java/me/Danker/handlers/TextRenderer.java index cbf196b..769d164 100644 --- a/src/main/java/me/Danker/handlers/TextRenderer.java +++ b/src/main/java/me/Danker/handlers/TextRenderer.java @@ -3,6 +3,7 @@ package me.Danker.handlers; import me.Danker.commands.ToggleCommand; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; +import net.minecraft.client.renderer.GlStateManager; import net.minecraft.util.StringUtils; import org.lwjgl.opengl.GL11; @@ -26,5 +27,6 @@ public class TextRenderer extends Gui { } } GL11.glScaled(scaleReset, scaleReset, scaleReset); + GlStateManager.color(1, 1, 1, 1); } } -- cgit From a8c0c52d863d93e2edc737a8642cd4244d55e240 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 17 Dec 2020 11:09:07 -0500 Subject: Add tallgrass to block placing flower weapons --- README.md | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/README.md b/README.md index e251a76..703499e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Discord Server: https://discord.gg/QsEkNQS - Golden T10/T6/T4 enchant display - Block AOTD ability - Block Livid Dagger ability -- Block placing Flower of Truth/Spirit Sceptre on dirt/grass +- Block placing Flower of Truth/Spirit Sceptre - Disable Spirit Sceptre messages - Disable Midas Staff messages - Disable Implosion messages diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 563e466..bfd776d 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1206,7 +1206,7 @@ public class DankersSkyblockMod public void renderEverything() { if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return; - + Minecraft mc = Minecraft.getMinecraft(); if (ToggleCommand.coordsToggled) { @@ -2891,7 +2891,9 @@ public class DankersSkyblockMod ArrayList flowerPlaceable = new ArrayList<>(Arrays.asList( Blocks.grass, Blocks.dirt, - Blocks.flower_pot + Blocks.flower_pot, + Blocks.tallgrass, + Blocks.double_plant )); if (Utils.inDungeons) { interactables.add(Blocks.coal_block); -- cgit From 5a796d45211dfc9a7cc0a63a753e638dea9fc96c Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Thu, 17 Dec 2020 11:16:33 -0500 Subject: Update /dsm debug --- src/main/java/me/Danker/commands/DankerGuiCommand.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 7c9c2f0..380086a 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -7,6 +7,7 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.StringUtils; import java.awt.*; import java.awt.datatransfer.StringSelection; @@ -44,6 +45,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[spiritbearalerts][").append(ToggleCommand.spiritBearAlerts).append("]\n"); debug.append("[aotd][").append(ToggleCommand.aotdToggled).append("]\n"); debug.append("[lividdagger][").append(ToggleCommand.lividDaggerToggled).append("]\n"); + debug.append("[flowerweapons][").append(ToggleCommand.flowerWeaponsToggled).append("]\n"); debug.append("[sceptremessages][").append(ToggleCommand.sceptreMessages).append("]\n"); debug.append("[petcolors][").append(ToggleCommand.petColoursToggled).append("]\n"); debug.append("[dungeontimer][").append(ToggleCommand.dungeonTimerToggled).append("]\n"); @@ -65,6 +67,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[creeperpuzzle][").append(ToggleCommand.creeperToggled).append("]\n"); debug.append("[waterpuzzle][").append(ToggleCommand.waterToggled).append("]\n"); debug.append("[tictactoepuzzle][").append(ToggleCommand.ticTacToeToggled).append("]\n"); + debug.append("[watchermessage][").append(ToggleCommand.watcherReadyToggled).append("]\n"); debug.append("[startswithterminal][").append(ToggleCommand.startsWithToggled).append("]\n"); debug.append("[selectallterminal][").append(ToggleCommand.selectAllToggled).append("]\n"); debug.append("[clickinorderterminal][").append(ToggleCommand.clickInOrderToggled).append("]\n"); @@ -73,8 +76,8 @@ public class DankerGuiCommand extends CommandBase { debug.append("[ultrasequencer][").append(ToggleCommand.ultrasequencerToggled).append("]\n"); debug.append("[chronomatron][").append(ToggleCommand.chronomatronToggled).append("]\n"); debug.append("[superpairs][").append(ToggleCommand.superpairsToggled).append("]\n"); + debug.append("[hidetooltipsinaddons][").append(ToggleCommand.hideTooltipsInExperimentAddonsToggled).append("]\n"); debug.append("[pickblock][").append(ToggleCommand.swapToPickBlockToggled).append("]\n"); - debug.append("[watchermessage][").append(ToggleCommand.watcherReadyToggled).append("]\n"); debug.append("# Locations\n"); debug.append("[coords][").append(MoveCommand.coordsXY[0]).append(", ").append(MoveCommand.coordsXY[1]).append("]\n"); debug.append("[display][").append(MoveCommand.displayXY[0]).append(", ").append(MoveCommand.displayXY[1]).append("]\n"); @@ -93,7 +96,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("\n"); } else { for (ResourcePackRepository.Entry resource : Minecraft.getMinecraft().getResourcePackRepository().getRepositoryEntries()) { - debug.append("< ").append(resource.getResourcePackName()).append(" >\n"); + debug.append("< ").append(StringUtils.stripControlCodes(resource.getResourcePackName())).append(" >\n"); } } debug.append("```"); -- cgit From 2a43011799565bd03b489291272c5b0ff69b3644 Mon Sep 17 00:00:00 2001 From: Sychic Date: Thu, 17 Dec 2020 13:57:36 -0500 Subject: secrets found --- src/main/java/me/Danker/commands/DungeonsCommand.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index bdc1403..f557b93 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -84,6 +84,14 @@ public class DungeonsCommand extends CommandBase { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "This player has not played dungeons.")); return; } + + String playerURL = "https://api.hypixel.net/player?uuid=" + uuid + "&key=" + key; + System.out.println("Fetching player data..."); + JsonObject playerResponse = APIHandler.getResponse(playerURL); + if(!playerResponse.get("success").getAsBoolean()){ + String reason = playerResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "This player has not played on Hypixel.")); + } double catacombs = Utils.xpToDungeonsLevel(dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject().get("experience").getAsDouble()); double healer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("healer").getAsJsonObject().get("experience").getAsDouble()); @@ -92,6 +100,7 @@ public class DungeonsCommand extends CommandBase { double archer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("archer").getAsJsonObject().get("experience").getAsDouble()); double tank = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble()); String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString()); + int secrets = playerResponse.get("player").getAsJsonObject().get("achievements").getAsJsonObject().get("skyblock_treasure_hunter").getAsInt(); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" + @@ -100,7 +109,8 @@ public class DungeonsCommand extends CommandBase { EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" + EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + - EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n" + + EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n" + + EnumChatFormatting.WHITE + " Screts Found: " + secrets + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } -- cgit From 7032f3ee8bd86d430e9aac7d641b849171fe2472 Mon Sep 17 00:00:00 2001 From: Sychic Date: Thu, 17 Dec 2020 14:00:53 -0500 Subject: remove weird linebreak --- src/main/java/me/Danker/commands/DungeonsCommand.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index f557b93..79d5d96 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -114,5 +114,4 @@ public class DungeonsCommand extends CommandBase { DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } - } -- cgit From 09a83ca95a990bbdd901560c601efa68ff008c36 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 14:07:59 -0500 Subject: Update Utils.java Add getItemLore (taken from SkyblockAddons) and a function to check if the item has a right click ability. --- src/main/java/me/Danker/utils/Utils.java | 38 +++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index e4f7873..3f54b7d 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -20,6 +20,8 @@ import net.minecraft.entity.item.EntityItemFrame; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.scoreboard.ScoreObjective; import net.minecraft.util.*; import org.lwjgl.opengl.GL11; @@ -27,6 +29,7 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.List; import java.util.regex.Matcher; @@ -263,7 +266,40 @@ public class Utils { public static String getColouredBoolean(boolean bool) { return bool ? EnumChatFormatting.GREEN + "On" : EnumChatFormatting.RED + "Off"; } - + + //Taken from SkyblockAddons + public static List getItemLore(ItemStack itemStack) { + final int NBT_INTEGER = 3; + final int NBT_STRING = 8; + final int NBT_LIST = 9; + final int NBT_COMPOUND = 10; + + if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("display", NBT_COMPOUND)) { + NBTTagCompound display = itemStack.getTagCompound().getCompoundTag("display"); + + if (display.hasKey("Lore", NBT_LIST)) { + NBTTagList lore = display.getTagList("Lore", NBT_STRING); + + List loreAsList = new ArrayList<>(); + for (int lineNumber = 0; lineNumber < lore.tagCount(); lineNumber++) { + loreAsList.add(lore.getStringTagAt(lineNumber)); + } + + return Collections.unmodifiableList(loreAsList); + } + } + + return Collections.emptyList(); + } + + public static boolean hasRightClickAbility(ItemStack itemStack) { + return Utils.getItemLore(itemStack).stream().anyMatch(line->{ + String stripped = StringUtils.stripControlCodes(line); + return stripped.startsWith("Item Ability:") && stripped.endsWith("RIGHT CLICK"); + }); + } + + public static void draw3DLine(Vec3 pos1, Vec3 pos2, int colourInt, float partialTicks) { Entity render = Minecraft.getMinecraft().getRenderViewEntity(); WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer(); -- cgit From 8310ff1d171bfdec3de2a822134e91c16fd6bf51 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 14:09:43 -0500 Subject: Expand Notify Slayer Slain to include bows and items with abilities --- src/main/java/me/Danker/DankersSkyblockMod.java | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index dfe8a9c..902f4cf 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -2933,6 +2933,32 @@ public class DankersSkyblockMod if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) { event.setCanceled(true); } + if (ToggleCommand.notifySlayerSlainToggled) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->ScoreboardHandler.cleanSB(x).contains("Boss slain!"))) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->{ + String line = ScoreboardHandler.cleanSB(x); + return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); + })) { + if (item.getItem() == Items.bow) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + } else if (Utils.hasRightClickAbility(item)) { + List lore = Utils.getItemLore(item); + + int abilityLine = -1; + for (int i = 0; i < lore.size(); i++) { + String line = StringUtils.stripControlCodes(lore.get(i)); + if (line.startsWith("Item Ability:")) abilityLine = i; + if (abilityLine != -1 && i > abilityLine) { + if (line.toLowerCase().contains("damage")) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + break; + } + } + } + } + } + } + } } if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { -- cgit From 45577a8861674f14b2740bed95456c545cbaf9b5 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 14:55:08 -0500 Subject: Move non-working bow detection to arrownockevent --- src/main/java/me/Danker/DankersSkyblockMod.java | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 902f4cf..7a836ef 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -46,9 +46,7 @@ import net.minecraftforge.client.event.sound.PlaySoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.player.AttackEntityEvent; -import net.minecraftforge.event.entity.player.EntityInteractEvent; -import net.minecraftforge.event.entity.player.ItemTooltipEvent; -import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.*; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.Loader; @@ -2939,9 +2937,7 @@ public class DankersSkyblockMod String line = ScoreboardHandler.cleanSB(x); return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); })) { - if (item.getItem() == Items.bow) { - Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); - } else if (Utils.hasRightClickAbility(item)) { + if (Utils.hasRightClickAbility(item)) { List lore = Utils.getItemLore(item); int abilityLine = -1; @@ -3013,6 +3009,22 @@ public class DankersSkyblockMod } } + @SubscribeEvent + public void onArrowNock(ArrowNockEvent event) { + if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; + + if (ToggleCommand.notifySlayerSlainToggled) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->ScoreboardHandler.cleanSB(x).contains("Boss slain!"))) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->{ + String line = ScoreboardHandler.cleanSB(x); + return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); + })) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + } + } + } + } + @SubscribeEvent public void onAttackingEntity(AttackEntityEvent event) { if (ToggleCommand.notifySlayerSlainToggled && (event.target instanceof EntityZombie || event.target instanceof EntitySpider || event.target instanceof EntityWolf)) { -- cgit From 98ad455efd1cad0dffb6dfa0c0b688322ac83ede Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 18:16:33 -0500 Subject: Add Bonzo Mask Timer --- src/main/java/me/Danker/DankersSkyblockMod.java | 62 +++++++++++++++++---- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 + src/main/java/me/Danker/commands/MoveCommand.java | 14 ++++- src/main/java/me/Danker/commands/ScaleCommand.java | 10 +++- .../java/me/Danker/commands/ToggleCommand.java | 11 +++- src/main/java/me/Danker/gui/DankerGui.java | 7 +++ src/main/java/me/Danker/gui/EditLocationsGui.java | 32 +++++++++-- .../java/me/Danker/handlers/ConfigHandler.java | 17 +++++- src/main/resources/assets/dsm/icons/bonzo.png | Bin 0 -> 10809 bytes 10 files changed, 131 insertions(+), 25 deletions(-) create mode 100644 src/main/resources/assets/dsm/icons/bonzo.png (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 7a836ef..153a6ca 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -103,10 +103,12 @@ public class DankersSkyblockMod static boolean foundLivid = false; static Entity livid = null; public static double cakeTime; + public static double nextBonzoUse = 0; public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); - - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); + + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; static Map triviaSolutions = new HashMap<>(); @@ -174,6 +176,7 @@ public class DankersSkyblockMod public static String CAKE_COLOUR; public static String SKILL_TRACKER_COLOUR; public static String TRIVIA_WRONG_ANSWER_COLOUR; + public static String BONZO_COLOR; public static int LOWEST_BLAZE_COLOUR; public static int HIGHEST_BLAZE_COLOUR; public static int PET_1_TO_9; @@ -375,6 +378,7 @@ public class DankersSkyblockMod public void onWorldChange(WorldEvent.Load event) { foundLivid = false; livid = null; + nextBonzoUse = 0; } // It randomly broke, so I had to make it the highest priority @@ -476,17 +480,35 @@ public class DankersSkyblockMod } return; } + + if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons && message.contains("Bonzo's Mask") && message.contains("saved your life!")) { + double usedTime = System.currentTimeMillis() / 1000; + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + ItemStack bonzoMask = player.getCurrentArmor(3); + if (bonzoMask != null && bonzoMask.getItem() == Items.skull) { + int cooldownSeconds = 0; + for(String line : Utils.getItemLore(bonzoMask)) { + String stripped = StringUtils.stripControlCodes(line); + if (stripped.startsWith("Cooldown: ")) + cooldownSeconds = Integer.parseInt(stripped.replaceAll("[^\\d]", "")); + } + System.out.println("Parsed Bonzo Mask Cooldown: " + cooldownSeconds); + if (cooldownSeconds > 0) + nextBonzoUse = usedTime + cooldownSeconds; + } + } // Dungeon chat spoken by an NPC, containing : if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) { - for (String solution : riddleSolutions) { - if (message.contains(solution)) { - String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":")); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing.")); - break; - } - } - } + for (String solution : riddleSolutions) { + if (message.contains(solution)) { + String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":")); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing.")); + break; + } + } + } if (ToggleCommand.necronNotificationsToggled && Utils.inDungeons && message.contains("[BOSS] Necron:")) { Minecraft mc = Minecraft.getMinecraft(); @@ -1338,6 +1360,26 @@ public class DankersSkyblockMod GL11.glScaled(scaleReset, scaleReset, scaleReset); } + + if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons) { + double scale = ScaleCommand.bonzoTimerScale; + double scaleReset = Math.pow(scale, -1); + GL11.glScaled(scale, scale, scale); + + double timeNow = System.currentTimeMillis() / 1000; + mc.getTextureManager().bindTexture(BONZO_ICON); + Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); + + String bonzoText; + if (nextBonzoUse - timeNow < 0) { + bonzoText = EnumChatFormatting.GREEN + "READY"; + } else { + bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); + } + new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); + + GL11.glScaled(scaleReset, scaleReset, scaleReset); + } if (showSkillTracker && Utils.inSkyblock) { int xpPerHour; diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index e4e7037..9e29f5f 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 813624e..720a34c 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -60,6 +60,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n"); debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); debug.append("[necronnotifications][").append(ToggleCommand.necronNotificationsToggled).append("]\n"); + debug.append("[bonzotimer][").append(ToggleCommand.bonzoTimerToggled).append("]\n"); debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index e9bfe61..55ad695 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -21,7 +21,8 @@ public class MoveCommand extends CommandBase { public static int[] cakeTimerXY = {0, 0}; public static int[] skillTrackerXY = {0, 0}; public static int[] waterAnswerXY = {0, 0}; - + public static int[] bonzoTimerXY = {0, 0}; + @Override public String getCommandName() { return "move"; @@ -29,7 +30,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " "; + return "/" + getCommandName() + " "; } @Override @@ -40,7 +41,7 @@ public class MoveCommand extends CommandBase { @Override public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer"); } return null; } @@ -111,6 +112,13 @@ public class MoveCommand extends CommandBase { ConfigHandler.writeIntConfig("locations", "waterAnswerY", waterAnswerXY[1]); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Water solver answer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); break; + case "bonzotimer": + bonzoTimerXY[0] = Integer.parseInt(arg1[1]); + bonzoTimerXY[1] = Integer.parseInt(arg1[2]); + ConfigHandler.writeIntConfig("locations", "bonzoTimerX", bonzoTimerXY[0]); + ConfigHandler.writeIntConfig("locations", "bonzoTimerX", bonzoTimerXY[1]); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been moved to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[1] + ", " + arg1[2])); + break; default: player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index 1c0843d..79b3cb1 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -21,6 +21,7 @@ public class ScaleCommand extends CommandBase { public static double cakeTimerScale; public static double skillTrackerScale; public static double waterAnswerScale; + public static double bonzoTimerScale; @Override public String getCommandName() { @@ -29,7 +30,7 @@ public class ScaleCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " "; + return "/" + getCommandName() + " "; } @Override @@ -40,7 +41,7 @@ public class ScaleCommand extends CommandBase { @Override public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp", "caketimer", "skilltracker", "wateranswer", "bonzotimer"); } return null; } @@ -101,6 +102,11 @@ public class ScaleCommand extends CommandBase { ConfigHandler.writeDoubleConfig("scales", "waterAnswerScale", waterAnswerScale); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Water solver answer has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + waterAnswerScale + "x")); break; + case "bonzotimer": + bonzoTimerScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "bonzoTimerScale", bonzoTimerScale); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been scaled to " + DankersSkyblockMod.SECONDARY_COLOUR + bonzoTimerScale + "x")); + break; default: player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 30cbcc5..b0ad194 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -41,6 +41,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean swapToPickBlockToggled; public static boolean notifySlayerSlainToggled; public static boolean necronNotificationsToggled; + public static boolean bonzoTimerToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -70,7 +71,7 @@ public class ToggleCommand extends CommandBase implements ICommand { return "/" + getCommandName() + " "; } @@ -87,7 +88,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", - "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); @@ -235,6 +236,12 @@ public class ToggleCommand extends CommandBase implements ICommand { necronNotificationsToggled = !necronNotificationsToggled; ConfigHandler.writeBooleanConfig("toggles", "NecronNotifications", necronNotificationsToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Necron phase notifications has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "bonzotimer": + bonzoTimerToggled = !bonzoTimerToggled; + ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", bonzoTimerToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "threemanpuzzle": threeManToggled = !threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 86ab1aa..fa19a30 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -58,6 +58,7 @@ public class DankerGui extends GuiScreen { private GuiButton pickBlock; private GuiButton notifySlayerSlain; private GuiButton necronNotifications; + private GuiButton bonzoTimer; public DankerGui(int page) { this.page = page; @@ -121,6 +122,7 @@ public class DankerGui extends GuiScreen { splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); + bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); switch (page) { case 1: @@ -172,6 +174,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(splitFishing); this.buttonList.add(notifySlayerSlain); this.buttonList.add(necronNotifications); + this.buttonList.add(bonzoTimer); this.buttonList.add(backPage); break; } @@ -328,6 +331,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.necronNotificationsToggled = !ToggleCommand.necronNotificationsToggled; ConfigHandler.writeBooleanConfig("toggles", "NecronNotifications", ToggleCommand.necronNotificationsToggled); necronNotifications.displayString = "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled); + } else if (button == bonzoTimer) { + ToggleCommand.bonzoTimerToggled = !ToggleCommand.bonzoTimerToggled; + ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", ToggleCommand.bonzoTimerToggled); + bonzoTimer.displayString = "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled); } else if (button == pickBlock) { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java index b610ae0..e3d6b73 100644 --- a/src/main/java/me/Danker/gui/EditLocationsGui.java +++ b/src/main/java/me/Danker/gui/EditLocationsGui.java @@ -26,6 +26,7 @@ public class EditLocationsGui extends GuiScreen { private LocationButton cakeTimer; private LocationButton skillTracker; private LocationButton waterAnswer; + private LocationButton bonzoTimer; @Override public boolean doesGuiPauseGame() { @@ -91,6 +92,8 @@ public class EditLocationsGui extends GuiScreen { cakeTimer = new LocationButton(0, MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1] + 5, 85 * ScaleCommand.cakeTimerScale, 18 * ScaleCommand.cakeTimerScale, ScaleCommand.cakeTimerScale, DankersSkyblockMod.CAKE_COLOUR + " 11h16m", null, null); skillTracker = new LocationButton(0, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], 150 * ScaleCommand.skillTrackerScale, 28 * ScaleCommand.skillTrackerScale, ScaleCommand.skillTrackerScale, skillTrackerText, null, null); waterAnswer = new LocationButton(0, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], 190 * ScaleCommand.waterAnswerScale, 54 * ScaleCommand.waterAnswerScale, ScaleCommand.waterAnswerScale, waterAnswerText, null, null); + bonzoTimer = new LocationButton(0, MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1] + 5, 85 * ScaleCommand.bonzoTimerScale, 18 * ScaleCommand.bonzoTimerScale, ScaleCommand.bonzoTimerScale, DankersSkyblockMod.BONZO_COLOR + " 3m30s", null, null); + this.buttonList.add(coords); this.buttonList.add(dungeonTimer); @@ -98,6 +101,7 @@ public class EditLocationsGui extends GuiScreen { this.buttonList.add(cakeTimer); this.buttonList.add(skillTracker); this.buttonList.add(waterAnswer); + this.buttonList.add(bonzoTimer); this.buttonList.add(display); this.buttonList.add(skill50); } @@ -107,13 +111,21 @@ public class EditLocationsGui extends GuiScreen { this.drawDefaultBackground(); mouseMoved(mouseX, mouseY); - double scale = ScaleCommand.cakeTimerScale; - double scaleReset = Math.pow(scale, -1); - GL11.glScaled(scale, scale, scale); + double cakeTimerScale = ScaleCommand.cakeTimerScale; + double cakeTimerScaleReset = Math.pow(cakeTimerScale, -1); + GL11.glScaled(cakeTimerScale, cakeTimerScale, cakeTimerScale); mc.getTextureManager().bindTexture(DankersSkyblockMod.CAKE_ICON); Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16); - GL11.glScaled(scaleReset, scaleReset, scaleReset); - + GL11.glScaled(cakeTimerScaleReset, cakeTimerScaleReset, cakeTimerScaleReset); + + double bonzoTimerScale = ScaleCommand.bonzoTimerScale; + double bonzoTimerScaleReset = Math.pow(bonzoTimerScale, -1); + GL11.glScaled(bonzoTimerScale, bonzoTimerScale, bonzoTimerScale); + mc.getTextureManager().bindTexture(DankersSkyblockMod.BONZO_ICON); + Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); + GL11.glScaled(bonzoTimerScaleReset, bonzoTimerScaleReset, bonzoTimerScaleReset); + + super.drawScreen(mouseX, mouseY, partialTicks); } @@ -171,6 +183,12 @@ public class EditLocationsGui extends GuiScreen { waterAnswer.xPosition = MoveCommand.waterAnswerXY[0]; waterAnswer.yPosition = MoveCommand.waterAnswerXY[1]; break; + case "bonzoTimer": + MoveCommand.bonzoTimerXY[0] += xMoved; + MoveCommand.bonzoTimerXY[1] += yMoved; + bonzoTimer.xPosition = MoveCommand.bonzoTimerXY[0]; + bonzoTimer.yPosition = MoveCommand.bonzoTimerXY[1]; + break; } this.buttonList.clear(); initGui(); @@ -199,6 +217,8 @@ public class EditLocationsGui extends GuiScreen { moving = "skillTracker"; } else if (button == waterAnswer) { moving = "waterAnswer"; + } else if (button == bonzoTimer) { + moving = "bonzoTimer"; } } } @@ -223,6 +243,8 @@ public class EditLocationsGui extends GuiScreen { ConfigHandler.writeIntConfig("locations", "skillTrackerY", MoveCommand.skillTrackerXY[1]); ConfigHandler.writeIntConfig("locations", "waterAnswerX", MoveCommand.waterAnswerXY[0]); ConfigHandler.writeIntConfig("locations", "waterAnswerY", MoveCommand.waterAnswerXY[1]); + ConfigHandler.writeIntConfig("locations", "bonzoTimerX", MoveCommand.bonzoTimerXY[0]); + ConfigHandler.writeIntConfig("locations", "bonzoTimerY", MoveCommand.bonzoTimerXY[1]); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 383dabf..b1cf0c2 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -196,6 +196,8 @@ public class ConfigHandler { if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); if (!hasKey("toggles", "NecronNotifications")) writeBooleanConfig("toggles", "NecronNotifications", false); + if (!hasKey("toggles", "BonzoTimer")) writeBooleanConfig("toggles", "BonzoTimer", false); + // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); @@ -401,6 +403,8 @@ public class ConfigHandler { if (!hasKey("locations", "skillTrackerY")) writeIntConfig("locations", "skillTrackerY", 50); if (!hasKey("locations", "waterAnswerX")) writeIntConfig("locations", "waterAnswerX", 100); if (!hasKey("locations", "waterAnswerY")) writeIntConfig("locations", "waterAnswerY", 100); + if (!hasKey("locations", "bonzoTimerX")) writeIntConfig("locations", "bonzoTimerX", 40); + if (!hasKey("locations", "bonzoTimerY")) writeIntConfig("locations", "bonzoTimerY", 80); if (!hasKey("scales", "coordsScale")) writeDoubleConfig("scales", "coordsScale", 1); if (!hasKey("scales", "displayScale")) writeDoubleConfig("scales", "displayScale", 1); if (!hasKey("scales", "dungeonTimerScale")) writeDoubleConfig("scales", "dungeonTimerScale", 1); @@ -409,7 +413,9 @@ public class ConfigHandler { if (!hasKey("scales", "cakeTimerScale")) writeDoubleConfig("scales", "cakeTimerScale", 1); if (!hasKey("scales", "skillTrackerScale")) writeDoubleConfig("scales", "skillTrackerScale", 1); if (!hasKey("scales", "waterAnswerScale")) writeDoubleConfig("scales", "waterAnswerScale", 1); - + if (!hasKey("scales", "bonzoTimerScale")) writeDoubleConfig("scales", "bonzoTimerScale", 1); + + if (!hasKey("colors", "main")) writeStringConfig("colors", "main", EnumChatFormatting.GREEN.toString()); if (!hasKey("colors", "secondary")) writeStringConfig("colors", "secondary", EnumChatFormatting.DARK_GREEN.toString()); if (!hasKey("colors", "delimiter")) writeStringConfig("colors", "delimiter", EnumChatFormatting.AQUA.toString()); @@ -423,6 +429,7 @@ public class ConfigHandler { if (!hasKey("colors", "cakeDisplay")) writeStringConfig("colors", "cakeDisplay", EnumChatFormatting.GOLD.toString()); if (!hasKey("colors", "skillTracker")) writeStringConfig("colors", "skillTracker", EnumChatFormatting.AQUA.toString()); if (!hasKey("colors", "triviaWrongAnswer")) writeStringConfig("colors", "triviaWrongAnswer", EnumChatFormatting.RED.toString()); + if (!hasKey("colors", "bonzoDisplay")) writeStringConfig("colors", "bonzoDisplay", EnumChatFormatting.RED.toString()); if (!hasKey("colors", "blazeLowest")) writeIntConfig("colors", "blazeLowest", 0xFF0000); if (!hasKey("colors", "blazeHighest")) writeIntConfig("colors", "blazeHighest", 0x40FF40); if (!hasKey("colors", "pet1To9")) writeIntConfig("colors", "pet1To9", 0x999999); // Gray @@ -464,6 +471,7 @@ public class ConfigHandler { ToggleCommand.watcherReadyToggled = getBoolean("toggles", "WatcherReadyMessage"); ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain"); ToggleCommand.necronNotificationsToggled = getBoolean("toggles", "NecronNotifications"); + ToggleCommand.bonzoTimerToggled = getBoolean("toggles", "BonzoTimer"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); // Puzzle Solvers @@ -673,7 +681,10 @@ public class ConfigHandler { MoveCommand.skillTrackerXY[1] = getInt("locations", "skillTrackerY"); MoveCommand.waterAnswerXY[0] = getInt("locations", "waterAnswerX"); MoveCommand.waterAnswerXY[1] = getInt("locations", "waterAnswerY"); - + MoveCommand.bonzoTimerXY[0] = getInt("locations", "bonzoTimerX"); + MoveCommand.bonzoTimerXY[1] = getInt("locations", "bonzoTimerY"); + + ScaleCommand.coordsScale = getDouble("scales", "coordsScale"); ScaleCommand.displayScale = getDouble("scales", "displayScale"); ScaleCommand.dungeonTimerScale = getDouble("scales", "dungeonTimerScale"); @@ -682,6 +693,7 @@ public class ConfigHandler { ScaleCommand.cakeTimerScale = getDouble("scales", "cakeTimerScale"); ScaleCommand.skillTrackerScale = getDouble("scales", "skillTrackerScale"); ScaleCommand.waterAnswerScale = getDouble("scales", "waterAnswerScale"); + ScaleCommand.bonzoTimerScale = getDouble("scales", "bonzoTimerScale"); DankersSkyblockMod.MAIN_COLOUR = getString("colors", "main"); DankersSkyblockMod.SECONDARY_COLOUR = getString("colors", "secondary"); @@ -696,6 +708,7 @@ public class ConfigHandler { DankersSkyblockMod.CAKE_COLOUR = getString("colors", "cakeDisplay"); DankersSkyblockMod.SKILL_TRACKER_COLOUR = getString("colors", "skillTracker"); DankersSkyblockMod.TRIVIA_WRONG_ANSWER_COLOUR = getString("colors", "triviaWrongAnswer"); + DankersSkyblockMod.BONZO_COLOR = getString("colors", "bonzoDisplay"); DankersSkyblockMod.LOWEST_BLAZE_COLOUR = getInt("colors", "blazeLowest"); DankersSkyblockMod.HIGHEST_BLAZE_COLOUR = getInt("colors", "blazeHighest"); DankersSkyblockMod.PET_1_TO_9 = getInt("colors", "pet1To9"); diff --git a/src/main/resources/assets/dsm/icons/bonzo.png b/src/main/resources/assets/dsm/icons/bonzo.png new file mode 100644 index 0000000..e9537b4 Binary files /dev/null and b/src/main/resources/assets/dsm/icons/bonzo.png differ -- cgit From d60a1e3fa81abcaf72b854a59a5475352496f6ec Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 18:21:24 -0500 Subject: Only show bonzo cooldown if they are wearing the bonzo mask --- src/main/java/me/Danker/DankersSkyblockMod.java | 37 ++++++++++++++----------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 153a6ca..7acf51d 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1362,23 +1362,28 @@ public class DankersSkyblockMod } if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons) { - double scale = ScaleCommand.bonzoTimerScale; - double scaleReset = Math.pow(scale, -1); - GL11.glScaled(scale, scale, scale); - - double timeNow = System.currentTimeMillis() / 1000; - mc.getTextureManager().bindTexture(BONZO_ICON); - Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); - - String bonzoText; - if (nextBonzoUse - timeNow < 0) { - bonzoText = EnumChatFormatting.GREEN + "READY"; - } else { - bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); - } - new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); - GL11.glScaled(scaleReset, scaleReset, scaleReset); + ItemStack helmetSlot = mc.thePlayer.getCurrentArmor(3); + if ((helmetSlot != null && helmetSlot.getDisplayName().contains("Bonzo's Mask")) || nextBonzoUse > 0) { + + double scale = ScaleCommand.bonzoTimerScale; + double scaleReset = Math.pow(scale, -1); + GL11.glScaled(scale, scale, scale); + + double timeNow = System.currentTimeMillis() / 1000; + mc.getTextureManager().bindTexture(BONZO_ICON); + Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); + + String bonzoText; + if (nextBonzoUse - timeNow < 0) { + bonzoText = EnumChatFormatting.GREEN + "READY"; + } else { + bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); + } + new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); + + GL11.glScaled(scaleReset, scaleReset, scaleReset); + } } if (showSkillTracker && Utils.inSkyblock) { -- cgit From 676ee2ca5ad1de111d3fb68e2db19f9d6ea720db Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 17 Dec 2020 19:16:40 -0500 Subject: Manually merge changes from development --- src/main/java/me/Danker/DankersSkyblockMod.java | 19 +++++++++++++++++-- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 5 +++-- src/main/java/me/Danker/commands/ToggleCommand.java | 14 +++++++++++--- src/main/java/me/Danker/gui/DankerGui.java | 11 +++++++++-- src/main/java/me/Danker/handlers/ConfigHandler.java | 2 ++ 6 files changed, 43 insertions(+), 10 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 7acf51d..7f9d57c 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -78,7 +78,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta3"; + public static final String VERSION = "1.8.5-beta5"; static double checkItemsNow = 0; static double itemsChecked = 0; @@ -1305,7 +1305,7 @@ public class DankersSkyblockMod public void renderEverything() { if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return; - + Minecraft mc = Minecraft.getMinecraft(); if (ToggleCommand.coordsToggled) { @@ -3041,10 +3041,25 @@ public class DankersSkyblockMod Blocks.oak_door, Blocks.skull )); + ArrayList flowerPlaceable = new ArrayList<>(Arrays.asList( + Blocks.grass, + Blocks.dirt, + Blocks.flower_pot, + Blocks.tallgrass, + Blocks.double_plant + )); if (Utils.inDungeons) { interactables.add(Blocks.coal_block); interactables.add(Blocks.stained_hardened_clay); } + if(flowerPlaceable.contains(block)){ + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Flower of Truth")) { + event.setCanceled(true); + } + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Spirit Sceptre")) { + event.setCanceled(true); + } + } if (!interactables.contains(block)) { if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { event.setCanceled(true); diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 9e29f5f..a9632b9 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 720a34c..3e599f5 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -7,6 +7,7 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.util.ChatComponentText; +import net.minecraft.util.StringUtils; import java.awt.*; import java.awt.datatransfer.StringSelection; @@ -75,6 +76,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[ultrasequencer][").append(ToggleCommand.ultrasequencerToggled).append("]\n"); debug.append("[chronomatron][").append(ToggleCommand.chronomatronToggled).append("]\n"); debug.append("[superpairs][").append(ToggleCommand.superpairsToggled).append("]\n"); + debug.append("[hidetooltipsinaddons][").append(ToggleCommand.hideTooltipsInExperimentAddonsToggled).append("]\n"); debug.append("[pickblock][").append(ToggleCommand.swapToPickBlockToggled).append("]\n"); debug.append("[watchermessage][").append(ToggleCommand.watcherReadyToggled).append("]\n"); debug.append("# Locations\n"); @@ -95,8 +97,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("\n"); } else { for (ResourcePackRepository.Entry resource : Minecraft.getMinecraft().getResourcePackRepository().getRepositoryEntries()) { - debug.append("< ").append(resource.getResourcePackName()).append(" >\n"); - } + debug.append("< ").append(StringUtils.stripControlCodes(resource.getResourcePackName())).append(" >\n"); } } debug.append("```"); StringSelection clipboard = new StringSelection(debug.toString()); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index b0ad194..2b9bbd7 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -39,6 +39,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean stopSalvageStarredToggled; public static boolean watcherReadyToggled; public static boolean swapToPickBlockToggled; + public static boolean flowerWeaponsToggled; public static boolean notifySlayerSlainToggled; public static boolean necronNotificationsToggled; public static boolean bonzoTimerToggled; @@ -69,10 +70,11 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " "; + "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" + + "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; } @Override @@ -85,7 +87,7 @@ public class ToggleCommand extends CommandBase implements ICommand { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", - "sceptremessages", "petcolors", "dungeontimer", "golemalerts", + "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "threemanpuzzle", "oruopuzzle", "blazepuzzle", @@ -156,6 +158,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "LividDagger", lividDaggerToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Block Livid Dagger ability been set to " + DankersSkyblockMod.SECONDARY_COLOUR + lividDaggerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "flowerweapons": + flowerWeaponsToggled = !flowerWeaponsToggled; + ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", flowerWeaponsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Prevent Placing FoT/Spirit Sceptre been set to " + DankersSkyblockMod.SECONDARY_COLOUR + flowerWeaponsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "sceptremessages": sceptreMessages = !sceptreMessages; ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", sceptreMessages); @@ -338,6 +345,7 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Spirit Bear alerts: " + DankersSkyblockMod.VALUE_COLOUR + spiritBearAlerts + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Block AOTD ability: " + DankersSkyblockMod.VALUE_COLOUR + aotdToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Block Livid Dagger ability: " + DankersSkyblockMod.VALUE_COLOUR + lividDaggerToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Prevent Placing FoT/Spirit Sceptre: " + DankersSkyblockMod.VALUE_COLOUR + flowerWeaponsToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Spirit Sceptre messages: " + DankersSkyblockMod.VALUE_COLOUR + sceptreMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Midas Staff messages: " + DankersSkyblockMod.VALUE_COLOUR + midasStaffMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Implosion messages: " + DankersSkyblockMod.VALUE_COLOUR + implosionMessages + "\n" + diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index fa19a30..03937a8 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -55,6 +55,7 @@ public class DankerGui extends GuiScreen { private GuiButton lividSolver; private GuiButton stopSalvageStarred; private GuiButton watcherReadyMessage; + private GuiButton flowerWeapons; private GuiButton pickBlock; private GuiButton notifySlayerSlain; private GuiButton necronNotifications; @@ -121,8 +122,9 @@ public class DankerGui extends GuiScreen { watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); - necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); - bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); + flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); + necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); + bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); switch (page) { case 1: @@ -173,6 +175,7 @@ public class DankerGui extends GuiScreen { this.buttonList.add(watcherReadyMessage); this.buttonList.add(splitFishing); this.buttonList.add(notifySlayerSlain); + this.buttonList.add(flowerWeapons); this.buttonList.add(necronNotifications); this.buttonList.add(bonzoTimer); this.buttonList.add(backPage); @@ -339,6 +342,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); pickBlock.displayString = "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled); + } else if (button == flowerWeapons) { + ToggleCommand.flowerWeaponsToggled = !ToggleCommand.flowerWeaponsToggled; + ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", ToggleCommand.flowerWeaponsToggled); + flowerWeapons.displayString = "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index b1cf0c2..e09ccba 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -194,6 +194,7 @@ public class ConfigHandler { if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); if (!hasKey("toggles", "WatcherReadyMessage")) writeBooleanConfig("toggles", "WatcherReadyMessage", false); if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); + if (!hasKey("toggles", "FlowerWeapons")) writeBooleanConfig("toggles", "FlowerWeapons", false); if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); if (!hasKey("toggles", "NecronNotifications")) writeBooleanConfig("toggles", "NecronNotifications", false); if (!hasKey("toggles", "BonzoTimer")) writeBooleanConfig("toggles", "BonzoTimer", false); @@ -473,6 +474,7 @@ public class ConfigHandler { ToggleCommand.necronNotificationsToggled = getBoolean("toggles", "NecronNotifications"); ToggleCommand.bonzoTimerToggled = getBoolean("toggles", "BonzoTimer"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); + ToggleCommand.flowerWeaponsToggled = getBoolean("toggles", "FlowerWeapons"); // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); -- cgit From c64eea238237c80a0c8361685ce8b9e01d61f9cb Mon Sep 17 00:00:00 2001 From: Sychic Date: Thu, 17 Dec 2020 21:43:37 -0500 Subject: Add Repartying --- src/main/java/me/Danker/DankersSkyblockMod.java | 221 ++++++++++++--------- .../java/me/Danker/commands/RepartyCommand.java | 58 ++++++ .../java/me/Danker/commands/SetPartyCommand.java | 46 +++++ 3 files changed, 226 insertions(+), 99 deletions(-) create mode 100644 src/main/java/me/Danker/commands/RepartyCommand.java create mode 100644 src/main/java/me/Danker/commands/SetPartyCommand.java (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index a1468e4..734543e 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -33,6 +33,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemMap; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.play.client.C01PacketChatMessage; import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraft.world.storage.MapData; @@ -79,7 +80,7 @@ public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; public static final String VERSION = "1.8.5-beta5"; - + static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); @@ -96,7 +97,7 @@ public class DankersSkyblockMod static int tickAmount = 1; static String lastMaddoxCommand = "/cb placeholder"; static double lastMaddoxTime = 0; - static KeyBinding[] keyBindings = new KeyBinding[2]; + static KeyBinding[] keyBindings = new KeyBinding[3]; static boolean usingLabymod = false; static boolean usingOAM = false; static boolean OAMWarning = false; @@ -104,10 +105,10 @@ public class DankersSkyblockMod static boolean foundLivid = false; static Entity livid = null; public static double cakeTime; - + public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); - - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; static Map triviaSolutions = new HashMap<>(); @@ -142,7 +143,7 @@ public class DankersSkyblockMod static int witherDoors = 0; static int dungeonDeaths = 0; static int puzzleFails = 0; - + static String lastSkill = "Farming"; public static boolean showSkillTracker; public static StopWatch skillStopwatch = new StopWatch(); @@ -161,7 +162,7 @@ public class DankersSkyblockMod static double alchemyXP = 0; public static double alchemyXPGained = 0; static double xpLeft = 0; - + public static String MAIN_COLOUR; public static String SECONDARY_COLOUR; public static String ERROR_COLOUR; @@ -188,14 +189,14 @@ public class DankersSkyblockMod public static int PET_80_TO_89; public static int PET_90_TO_99; public static int PET_100; - + @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(new PacketHandler()); - + ConfigHandler.reloadConfig(); - + // For golden enchants t6Enchants.put("9Angler VI", "6Angler VI"); t6Enchants.put("9Bane of Arthropods VI", "6Bane of Arthropods VI"); @@ -212,7 +213,7 @@ public class DankersSkyblockMod t6Enchants.put("9Giant Killer VI", "6Giant Killer VI"); t6Enchants.put("9Growth VI", "6Growth VI"); t6Enchants.put("9Infinite Quiver X", "6Infinite Quiver X"); - t6Enchants.put("9Lethality VI", "6Lethality VI"); + t6Enchants.put("9Lethality VI", "6Lethality VI"); t6Enchants.put("9Life Steal IV", "6Life Steal IV"); t6Enchants.put("9Looting IV", "6Looting IV"); t6Enchants.put("9Luck VI", "6Luck VI"); @@ -229,7 +230,7 @@ public class DankersSkyblockMod t6Enchants.put("9Spiked Hook VI", "6Spiked Hook VI"); t6Enchants.put("9Thunderlord VI", "6Thunderlord VI"); t6Enchants.put("9Vampirism VI", "6Vampirism VI"); - + triviaSolutions.put("What is the status of The Watcher?", new String[]{"Stalker"}); triviaSolutions.put("What is the status of Bonzo?", new String[]{"New Necromancer"}); triviaSolutions.put("What is the status of Scarf?", new String[]{"Apprentice Necromancer"}); @@ -266,18 +267,19 @@ public class DankersSkyblockMod triviaSolutions.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"}); triviaSolutions.put("Which of these is not a dragon in The End?", new String[]{"Zoomer Dragon", "Weak Dragon", "Stonk Dragon", "Holy Dragon", "Boomer Dragon", "Booger Dragon", "Older Dragon", "Elder Dragon", "Stable Dragon", "Professor Dragon"}); - + String patternString = "(" + String.join("|", t6Enchants.keySet()) + ")"; t6EnchantPattern = Pattern.compile(patternString); - + keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); + keyBindings[2] = new KeyBinding("Reparty", Keyboard.KEY_P,"Danker's Skyblock Mod"); for (KeyBinding keyBinding : keyBindings) { ClientRegistry.registerKeyBinding(keyBinding); } } - + @EventHandler public void preInit(final FMLPreInitializationEvent event) { ClientCommandHandler.instance.registerCommand(new ToggleCommand()); @@ -303,8 +305,10 @@ public class DankersSkyblockMod ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); + ClientCommandHandler.instance.registerCommand(new SetPartyCommand()); + ClientCommandHandler.instance.registerCommand(new RepartyCommand()); } - + @EventHandler public void postInit(final FMLPostInitializationEvent event) { Package[] packages = Package.getPackages(); @@ -334,30 +338,30 @@ public class DankersSkyblockMod } } } - + // Update checker @SubscribeEvent public void onJoin(EntityJoinWorldEvent event) { if (!updateChecked) { updateChecked = true; - + // MULTI THREAD DRIFTING new Thread(() -> { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + System.out.println("Checking for updates..."); JsonObject latestRelease = APIHandler.getResponse("https://api.github.com/repos/bowser0000/SkyblockMod/releases/latest"); - + String latestTag = latestRelease.get("tag_name").getAsString(); DefaultArtifactVersion currentVersion = new DefaultArtifactVersion(VERSION); DefaultArtifactVersion latestVersion = new DefaultArtifactVersion(latestTag.substring(1)); - + if (currentVersion.compareTo(latestVersion) < 0) { String releaseURL = latestRelease.get("html_url").getAsString(); - + ChatComponentText update = new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + " [UPDATE] "); update.setChatStyle(update.getChatStyle().setChatClickEvent(new ClickEvent(Action.OPEN_URL, releaseURL))); - + try { Thread.sleep(2000); } catch (InterruptedException ex) { @@ -368,20 +372,20 @@ public class DankersSkyblockMod }).start(); } } - + @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) { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - + if (!Utils.inSkyblock) return; - + // Action Bar if (event.type == 2) { String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); @@ -449,7 +453,7 @@ public class DankersSkyblockMod System.err.println("Unknown skill."); } } - + if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) { String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); @@ -464,7 +468,7 @@ public class DankersSkyblockMod } int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit); double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D; - + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); skillTimer = SKILL_TIME; showSkill = true; @@ -474,7 +478,7 @@ public class DankersSkyblockMod } return; } - + // Dungeon chat spoken by an NPC, containing : if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) { for (String solution : riddleSolutions) { @@ -485,7 +489,7 @@ public class DankersSkyblockMod } } } - + if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { watcherClearTime = System.currentTimeMillis() / 1000; } @@ -495,9 +499,9 @@ public class DankersSkyblockMod if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { puzzleFails++; } - + if (message.contains(":")) return; - + // Spirit Sceptre if (!ToggleCommand.sceptreMessages && message.contains("Your Spirit Sceptre hit ")) { event.setCanceled(true); @@ -530,18 +534,18 @@ public class DankersSkyblockMod return; } } - + if (ToggleCommand.oruoToggled && Utils.inDungeons) { // Don't set every answer to wrong with this question if (message.contains("What SkyBlock year is it?")) triviaAnswers = null; - + for (String question : triviaSolutions.keySet()) { if (message.contains(question)) { triviaAnswers = triviaSolutions.get(question); break; } } - + // Set wrong answers to red and remove click events if (triviaAnswers != null && (message.contains("ⓐ") || message.contains("ⓑ") || message.contains("ⓒ"))) { boolean isSolution = false; @@ -559,7 +563,7 @@ public class DankersSkyblockMod } } } - + if (ToggleCommand.gpartyToggled) { if (message.contains(" has invited all members of ")) { try { @@ -576,18 +580,18 @@ public class DankersSkyblockMod } } } - + if (ToggleCommand.golemAlertToggled) { if (message.contains("The ground begins to shake as an Endstone Protector rises from below!")) { Utils.createTitle(EnumChatFormatting.RED + "GOLEM SPAWNING!", 3); } } - + if (message.contains("Yum! You gain +") && message.contains(" for 48 hours!")) { cakeTime = System.currentTimeMillis() / 1000 + 172800; // Add 48 hours ConfigHandler.writeDoubleConfig("misc", "cakeTime", cakeTime); } - + boolean wolfRNG = false; boolean spiderRNG = false; boolean zombieRNG = false; @@ -815,7 +819,7 @@ public class DankersSkyblockMod increaseSeaCreatures(); } else if (message.contains("The Sea Emperor arises from the depths")) { increaseSeaCreatures(); - + LootCommand.seaEmperors++; LootCommand.empTime = System.currentTimeMillis() / 1000; LootCommand.empSCs = 0; @@ -958,7 +962,7 @@ public class DankersSkyblockMod } } } - + if (wolfRNG) { LootCommand.wolfTime = System.currentTimeMillis() / 1000; LootCommand.wolfBosses = 0; @@ -983,7 +987,7 @@ public class DankersSkyblockMod ConfigHandler.writeDoubleConfig("zombie", "timeRNG", LootCommand.zombieTime); ConfigHandler.writeIntConfig("zombie", "bossRNG", 0); } - + // Mythological Tracker if (message.contains("You dug out")) { if (message.contains(" coins!")) { @@ -1029,7 +1033,7 @@ public class DankersSkyblockMod ConfigHandler.writeIntConfig("mythological", "minosInquisitor", LootCommand.minosInquisitors); } } - + // Dungeons Trackers if (message.contains(" ")) { if (message.contains("Recombobulator 3000")) { @@ -1091,7 +1095,7 @@ public class DankersSkyblockMod LootCommand.legSpiritPets++; LootCommand.legSpiritPetsSession++; ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", LootCommand.legSpiritPets); - } + } } else if (message.contains("Spirit Sword")) { LootCommand.spiritSwords++; LootCommand.spiritSwordsSession++; @@ -1206,7 +1210,7 @@ public class DankersSkyblockMod ConfigHandler.writeIntConfig("catacombs", "witherBoot", LootCommand.witherBoots); } } - + // Chat Maddox if (message.contains("[OPEN MENU]")) { List listOfSiblings = event.message.getSiblings(); @@ -1218,20 +1222,20 @@ public class DankersSkyblockMod } if (ToggleCommand.chatMaddoxToggled) Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Open chat then click anywhere on-screen to open Maddox")); } - + // Spirit Bear alerts if (ToggleCommand.spiritBearAlerts && message.contains("The Spirit Bear has appeared!")) { Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "SPIRIT BEAR", 2); } } - + @SubscribeEvent public void renderPlayerInfo(final RenderGameOverlayEvent.Post event) { if (usingLabymod && !(Minecraft.getMinecraft().ingameGUI instanceof GuiIngameForge)) return; if (event.type != RenderGameOverlayEvent.ElementType.EXPERIENCE && event.type != RenderGameOverlayEvent.ElementType.JUMPBAR) return; renderEverything(); } - + // LabyMod Support @SubscribeEvent public void renderPlayerInfoLabyMod(final RenderGameOverlayEvent event) { @@ -1239,24 +1243,24 @@ public class DankersSkyblockMod if (event.type != null) return; renderEverything(); } - + public void renderEverything() { if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return; Minecraft mc = Minecraft.getMinecraft(); - + if (ToggleCommand.coordsToggled) { EntityPlayer player = mc.thePlayer; - + double xDir = (player.rotationYaw % 360 + 360) % 360; if (xDir > 180) xDir -= 360; xDir = (double) Math.round(xDir * 10d) / 10d; double yDir = (double) Math.round(player.rotationPitch * 10d) / 10d; - + String coordText = COORDS_COLOUR + (int) player.posX + " / " + (int) player.posY + " / " + (int) player.posZ + " (" + xDir + " / " + yDir + ")"; new TextRenderer(mc, coordText, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], ScaleCommand.coordsScale); } - + if (ToggleCommand.dungeonTimerToggled && Utils.inDungeons) { String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + EnumChatFormatting.DARK_RED + "Blood Open:\n" + @@ -1273,20 +1277,20 @@ public class DankersSkyblockMod new TextRenderer(mc, dungeonTimerText, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); new TextRenderer(mc, dungeonTimers, (int) (MoveCommand.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); } - + if (ToggleCommand.lividSolverToggled && foundLivid && livid != null) { new TextRenderer(mc, livid.getName().replace("" + EnumChatFormatting.BOLD, ""), MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], ScaleCommand.lividHpScale); } - + if (ToggleCommand.cakeTimerToggled && Utils.inSkyblock) { double scale = ScaleCommand.cakeTimerScale; double scaleReset = Math.pow(scale, -1); GL11.glScaled(scale, scale, scale); - + double timeNow = System.currentTimeMillis() / 1000; mc.getTextureManager().bindTexture(CAKE_ICON); Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16); - + String cakeText; if (cakeTime - timeNow < 0) { cakeText = EnumChatFormatting.RED + "NONE"; @@ -1294,10 +1298,10 @@ public class DankersSkyblockMod cakeText = CAKE_COLOUR + Utils.getTimeBetween(timeNow, cakeTime); } new TextRenderer(mc, cakeText, MoveCommand.cakeTimerXY[0] + 20, MoveCommand.cakeTimerXY[1] + 5, 1); - + GL11.glScaled(scaleReset, scaleReset, scaleReset); } - + if (showSkillTracker && Utils.inSkyblock) { int xpPerHour; double xpToShow = 0; @@ -1337,7 +1341,7 @@ public class DankersSkyblockMod if (!skillStopwatch.isStarted() || skillStopwatch.isSuspended()) { skillTrackerText += "\n" + EnumChatFormatting.RED + "PAUSED"; } - + new TextRenderer(mc, skillTrackerText, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], ScaleCommand.skillTrackerScale); } @@ -1355,7 +1359,7 @@ public class DankersSkyblockMod String drop20; double timeNow = System.currentTimeMillis() / 1000; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); - + switch (DisplayCommand.display) { case "wolf": if (LootCommand.wolfTime == -1) { @@ -1373,11 +1377,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.wolfWheelsDrops) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + EnumChatFormatting.WHITE + "Critical VI Books:\n" + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + EnumChatFormatting.GOLD + "Couture Runes:\n" + @@ -1388,7 +1392,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvens) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeeth) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + EnumChatFormatting.WHITE + LootCommand.wolfBooks + "\n" + EnumChatFormatting.DARK_RED + LootCommand.wolfEggs + "\n" + EnumChatFormatting.GOLD + LootCommand.wolfCoutures + "\n" + @@ -1413,11 +1417,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.wolfWheelsDropsSession) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + EnumChatFormatting.WHITE + "Critical VI Books:\n" + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + EnumChatFormatting.GOLD + "Couture Runes:\n" + @@ -1428,7 +1432,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvensSession) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeethSession) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + EnumChatFormatting.WHITE + LootCommand.wolfBooksSession + "\n" + EnumChatFormatting.DARK_RED + LootCommand.wolfEggsSession + "\n" + EnumChatFormatting.GOLD + LootCommand.wolfCouturesSession + "\n" + @@ -1453,11 +1457,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.spiderTAPDrops) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + EnumChatFormatting.WHITE + "Bane VI Books:\n" + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + @@ -1468,7 +1472,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulas) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebs) + "\n" + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + EnumChatFormatting.WHITE + LootCommand.spiderBooks + "\n" + EnumChatFormatting.AQUA + LootCommand.spiderCatalysts + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismans + "\n" + @@ -1493,11 +1497,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.spiderTAPDropsSession) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + EnumChatFormatting.WHITE + "Bane VI Books:\n" + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + @@ -1508,7 +1512,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulasSession) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebsSession) + "\n" + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + EnumChatFormatting.WHITE + LootCommand.spiderBooksSession + "\n" + EnumChatFormatting.AQUA + LootCommand.spiderCatalystsSession + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismansSession + "\n" + @@ -1533,11 +1537,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.zombieFoulFleshDrops) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + EnumChatFormatting.WHITE + "Smite VI Books:\n" + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + @@ -1549,7 +1553,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevs) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFlesh) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + EnumChatFormatting.WHITE + LootCommand.zombieBooks + "\n" + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatas + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadeds + "\n" + @@ -1575,11 +1579,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.zombieFoulFleshDropsSession) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + EnumChatFormatting.WHITE + "Smite VI Books:\n" + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + @@ -1591,7 +1595,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevsSession) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFleshSession) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + EnumChatFormatting.WHITE + LootCommand.zombieBooksSession + "\n" + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatasSession + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadedsSession + "\n" + @@ -1612,7 +1616,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.empSCs); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -1654,7 +1658,7 @@ public class DankersSkyblockMod EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperors) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; - + if (ToggleCommand.splitFishing) { new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); @@ -1674,7 +1678,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.empSCsSession); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -1716,7 +1720,7 @@ public class DankersSkyblockMod EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperorsSession) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; - + if (ToggleCommand.splitFishing) { new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); @@ -1736,7 +1740,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.yetiSCs); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -1769,7 +1773,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.yetiSCsSession); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -2223,7 +2227,7 @@ public class DankersSkyblockMod new TextRenderer(mc, dropsText, MoveCommand.displayXY[0], MoveCommand.displayXY[1], ScaleCommand.displayScale); new TextRenderer(mc, countText, (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); } - + if (showTitle) { Utils.drawTitle(titleText); } @@ -2231,17 +2235,17 @@ public class DankersSkyblockMod new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale); } } - + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSound(final PlaySoundEvent event) { if (!Utils.inSkyblock) return; if (event.name.equals("note.pling")) { - // Don't check twice within 3 seconds + // Don't check twice within 3 seconds checkItemsNow = System.currentTimeMillis() / 1000; if (checkItemsNow - itemsChecked < 3) return; - + List scoreboard = ScoreboardHandler.getSidebarLines(); - + for (String line : scoreboard) { String cleanedLine = ScoreboardHandler.cleanSB(line); // If Hypixel lags and scoreboard doesn't update @@ -2252,7 +2256,7 @@ public class DankersSkyblockMod int itemTAP = Utils.getItems("Toxic Arrow Poison"); int itemRev = Utils.getItems("Revenant Flesh"); int itemFoul = Utils.getItems("Foul Flesh"); - + // If no items, are detected, allow check again. Should fix items not being found if (itemTeeth + itemWheels + itemWebs + itemTAP + itemRev + itemFoul > 0) { itemsChecked = System.currentTimeMillis() / 1000; @@ -2268,7 +2272,7 @@ public class DankersSkyblockMod LootCommand.spiderTAPSession += itemTAP; LootCommand.zombieRevFleshSession += itemRev; LootCommand.zombieFoulFleshSession += itemFoul; - + ConfigHandler.writeIntConfig("wolf", "teeth", LootCommand.wolfTeeth); ConfigHandler.writeIntConfig("wolf", "wheel", LootCommand.wolfWheels); ConfigHandler.writeIntConfig("spider", "web", LootCommand.spiderWebs); @@ -2280,12 +2284,12 @@ public class DankersSkyblockMod } } } - + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onTooltip(ItemTooltipEvent event) { if (!Utils.inSkyblock) return; if (event.toolTip == null) return; - + ItemStack item = event.itemStack; Minecraft mc = Minecraft.getMinecraft(); EntityPlayerSP player = mc.thePlayer; @@ -2295,7 +2299,7 @@ public class DankersSkyblockMod event.toolTip.set(i, Utils.returnGoldenEnchants(event.toolTip.get(i))); } } - + if (ToggleCommand.expertiseLoreToggled) { if (item.hasTagCompound()) { NBTTagCompound tags = item.getSubCompound("ExtraAttributes", false); @@ -2303,7 +2307,7 @@ public class DankersSkyblockMod if (tags.hasKey("expertise_kills")) { int index = 4; if (!Minecraft.getMinecraft().gameSettings.advancedItemTooltips) index -= 2; - + event.toolTip.add(event.toolTip.size() - index, ""); event.toolTip.add(event.toolTip.size() - index, "Expertise Kills: " + EnumChatFormatting.RED + tags.getInteger("expertise_kills")); if (Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) != -1) { @@ -2987,9 +2991,27 @@ public class DankersSkyblockMod @SubscribeEvent public void onKey(KeyInputEvent event) { + + + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + + // Check for pressing P for reparty + if (keyBindings[2].isPressed()) { + if(!SetPartyCommand.set){ + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + SetPartyCommand.getUsage())); + return; + } + + String members = String.join("\n" + EnumChatFormatting.GOLD, RepartyCommand.players); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + "Repartying: \n" + + EnumChatFormatting.GOLD + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------")); + RepartyCommand.processCommand(); + } + if (!Utils.inSkyblock) return; - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; if (keyBindings[0].isPressed()) { player.sendChatMessage(lastMaddoxCommand); } @@ -3005,6 +3027,7 @@ public class DankersSkyblockMod player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker paused.")); } } + } @SubscribeEvent diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java new file mode 100644 index 0000000..1658298 --- /dev/null +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -0,0 +1,58 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import net.minecraft.client.Minecraft; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; + +public class RepartyCommand extends CommandBase implements ICommand { + public static String[] players; + + @Override + public String getCommandName() { return "reparty"; } + + @Override + public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName(); } + + @Override + public int getRequiredPermissionLevel() { return 0; } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + + final EntityPlayer player = (EntityPlayer) sender; + + if(!SetPartyCommand.set){ + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); + return; + } + try{ + Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); + Thread.sleep(210); + Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + } + + public static void processCommand() { + + if(!SetPartyCommand.set){ + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); + return; + } + try{ + Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); + Thread.sleep(210); + Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + } +} diff --git a/src/main/java/me/Danker/commands/SetPartyCommand.java b/src/main/java/me/Danker/commands/SetPartyCommand.java new file mode 100644 index 0000000..f840527 --- /dev/null +++ b/src/main/java/me/Danker/commands/SetPartyCommand.java @@ -0,0 +1,46 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import net.minecraft.client.Minecraft; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; + +public class SetPartyCommand extends CommandBase implements ICommand { + + public static boolean set = false; + + @Override + public String getCommandName() { return "setparty"; } + public static String getName() { return "setparty"; } + + @Override + public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName() + " "; } + public static String getUsage(){ return "/" + getName() + " "; } + + @Override + public int getRequiredPermissionLevel() { return 0; } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + final EntityPlayer player = (EntityPlayer) sender; + + if(args.length == 0) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(sender))); + return; + } + + RepartyCommand.players = args; + + String members = String.join("\n" + EnumChatFormatting.GOLD,RepartyCommand.players); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.GOLD + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------")); + + set = true; + } +} -- cgit From 6baa9f89600d23e0b7265b0a30d6003b928bf4a0 Mon Sep 17 00:00:00 2001 From: Sychic Date: Thu, 17 Dec 2020 21:52:20 -0500 Subject: update version --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 441a4db..3056755 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta5" +version = "1.8.5-beta6" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 734543e..95c5436 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -79,7 +79,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta5"; + public static final String VERSION = "1.8.5-beta6"; static double checkItemsNow = 0; static double itemsChecked = 0; -- cgit From 9aad7c40eb5fe681f05d995645122a1c33c7088a Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Fri, 18 Dec 2020 09:25:57 -0500 Subject: Highlight next Click in Order slot in aqua --- src/main/java/me/Danker/DankersSkyblockMod.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 7f9d57c..529c392 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -134,7 +134,7 @@ public class DankersSkyblockMod static int pickBlockBind; static boolean pickBlockBindSwapped = false; static String terminalColorNeeded; - static int[] terminalNumberNeeded = new int[2]; + static int[] terminalNumberNeeded = new int[4]; static double dungeonStartTime = 0; static double bloodOpenTime = 0; @@ -2871,6 +2871,7 @@ public class DankersSkyblockMod if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 15; + if(terminalNumberNeeded[2] == 0) terminalNumberNeeded[2] = 15; for(int i = 10; i <= 25; i++) { if (i == 17 || i == 18) continue; ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); @@ -2885,6 +2886,9 @@ public class DankersSkyblockMod if (itemStack.stackSize < terminalNumberNeeded[0]) { terminalNumberNeeded[0] = itemStack.stackSize; terminalNumberNeeded[1] = i; + } else if (itemStack.stackSize == terminalNumberNeeded[0] + 1) { + terminalNumberNeeded[2] = itemStack.stackSize; + terminalNumberNeeded[3] = i; } } } @@ -3309,6 +3313,11 @@ public class DankersSkyblockMod break; case "Click in order!": + + if (mouseSlot.getSlotIndex() > 35) { + break; + } + if((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { shouldCancel = true; break; @@ -3408,7 +3417,7 @@ public class DankersSkyblockMod chronomatronMouseClicks = 0; experimentTableSlots = new ItemStack[54]; terminalColorNeeded = null; - terminalNumberNeeded = new int[2]; + terminalNumberNeeded = new int[4]; } @SubscribeEvent @@ -3500,6 +3509,10 @@ public class DankersSkyblockMod if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { Slot slot = invSlots.get(terminalNumberNeeded[1]); Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); + Slot nextSlot = invSlots.get(terminalNumberNeeded[3]); + if (nextSlot != slot && nextSlot.getSlotIndex() != 0) { + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(11, 239, 231, 255).getRGB()); + } } if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { -- cgit From 20034c5391551471ab9d534002c1167dbe87aba4 Mon Sep 17 00:00:00 2001 From: Sychic Date: Fri, 18 Dec 2020 10:34:43 -0500 Subject: Separate partying thread to allow for it to wait separately from main thread. --- src/main/java/me/Danker/commands/RepartyCommand.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 1658298..d3ac7f0 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -46,13 +46,15 @@ public class RepartyCommand extends CommandBase implements ICommand { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); return; } - try{ - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); - Thread.sleep(210); - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); - } catch (InterruptedException e) { - e.printStackTrace(); - } + (new Thread(() -> { + try{ + Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); + Thread.sleep(210); + Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); + } catch (InterruptedException e) { + e.printStackTrace(); + } + })).start(); } } -- cgit From 5805888e0c1dea9602122595cf74b35bf90d696d Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Fri, 18 Dec 2020 11:20:18 -0500 Subject: Add a first launch message --- src/main/java/me/Danker/DankersSkyblockMod.java | 29 ++++++++++++++++++++++ .../java/me/Danker/handlers/ConfigHandler.java | 7 ++++-- 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 529c392..2035784 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -26,6 +26,7 @@ import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.event.ClickEvent; import net.minecraft.event.ClickEvent.Action; +import net.minecraft.event.HoverEvent; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.Container; @@ -104,6 +105,7 @@ public class DankersSkyblockMod static Entity livid = null; public static double cakeTime; public static double nextBonzoUse = 0; + public static boolean firstLaunch = false; public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); @@ -323,6 +325,33 @@ public class DankersSkyblockMod // Update checker @SubscribeEvent public void onJoin(EntityJoinWorldEvent event) { + + if (firstLaunch) { + firstLaunch = false; + ConfigHandler.writeBooleanConfig("misc", "firstLaunch", false); + + IChatComponent chatComponent = new ChatComponentText( + EnumChatFormatting.GOLD + "Thank you for downloading Danker's Skyblock Mod.\n" + + "To get started, run the command " + EnumChatFormatting.GOLD + "/dsm" + EnumChatFormatting.RESET + " to view all the mod features." + ); + chatComponent.setChatStyle(chatComponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("Click to open the DSM menu."))).setChatClickEvent(new ClickEvent(Action.RUN_COMMAND, "/dsm"))); + + new Thread(()->{ + while (true) { + if (Minecraft.getMinecraft().thePlayer == null) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + continue; + } + Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent); + break; + } + }).start(); + } + if (!updateChecked) { updateChecked = true; diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index e09ccba..2822738 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -385,7 +385,9 @@ public class ConfigHandler { if (!hasKey("misc", "skill50Time")) writeIntConfig("misc", "skill50Time", 3); if (!hasKey("misc", "cakeTime")) writeDoubleConfig("misc", "cakeTime", 0); if (!hasKey("misc", "showSkillTracker")) writeBooleanConfig("misc", "showSkillTracker", false); - + if (!hasKey("misc", "firstLaunch")) writeBooleanConfig("misc", "firstLaunch", true); + + ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft()); int height = scaled.getScaledHeight(); if (!hasKey("locations", "coordsX")) writeIntConfig("locations", "coordsX", 5); @@ -666,7 +668,8 @@ public class ConfigHandler { DankersSkyblockMod.SKILL_TIME = getInt("misc", "skill50Time") * 20; DankersSkyblockMod.cakeTime = getDouble("misc", "cakeTime"); DankersSkyblockMod.showSkillTracker = getBoolean("misc", "showSkillTracker"); - + DankersSkyblockMod.firstLaunch = getBoolean("misc", "firstLaunch"); + MoveCommand.coordsXY[0] = getInt("locations", "coordsX"); MoveCommand.coordsXY[1] = getInt("locations", "coordsY"); MoveCommand.displayXY[0] = getInt("locations", "displayX"); -- cgit From 2ea0943f42c428aa946f5163083a891529657f41 Mon Sep 17 00:00:00 2001 From: Sychic Date: Fri, 18 Dec 2020 23:35:22 -0500 Subject: Werewolf fishing writes to correct value --- src/main/java/me/Danker/handlers/ConfigHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index af61cfe..f295c38 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -577,7 +577,7 @@ public class ConfigHandler { // Spooky Fishing LootCommand.scarecrows = getInt("fishing", "scarecrow"); LootCommand.nightmares = getInt("fishing", "nightmare"); - LootCommand.werewolfs = getInt("fishing", "nightmare"); + LootCommand.werewolfs = getInt("fishing", "werewolf"); LootCommand.phantomFishers = getInt("fishing", "phantomFisher"); LootCommand.grimReapers = getInt("fishing", "grimReaper"); -- cgit From 6143fa32651bebd85afa46d8f8a4eeaea9fee595 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 19 Dec 2020 11:22:32 -0500 Subject: Feat: Prevent Breaking Farms --- src/main/java/me/Danker/DankersSkyblockMod.java | 37 ++++++++++++++++++++-- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 + .../java/me/Danker/commands/ToggleCommand.java | 11 +++++-- src/main/java/me/Danker/gui/DankerGui.java | 14 +++++++- .../java/me/Danker/handlers/ConfigHandler.java | 2 ++ 6 files changed, 60 insertions(+), 7 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 2035784..da82fdb 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3003,8 +3003,9 @@ public class DankersSkyblockMod if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; ItemStack item = event.entityPlayer.getHeldItem(); if (item == null) return; + Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); - if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) { + if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) { if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { event.setCanceled(true); } @@ -3037,8 +3038,7 @@ public class DankersSkyblockMod } } - if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { - Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + else if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { ArrayList interactables = new ArrayList<>(Arrays.asList( Blocks.acacia_door, Blocks.anvil, @@ -3102,6 +3102,37 @@ public class DankersSkyblockMod } } } + + else if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { + if (ToggleCommand.blockBreakingFarmsToggled) { + ArrayList tools = new ArrayList(Arrays.asList( + Items.wooden_hoe, + Items.stone_hoe, + Items.iron_hoe, + Items.golden_hoe, + Items.diamond_hoe, + Items.wooden_axe, + Items.stone_axe, + Items.iron_axe, + Items.golden_axe, + Items.diamond_axe + )); + + ArrayList farmBlocks = new ArrayList(Arrays.asList( + Blocks.dirt, + Blocks.farmland, + Blocks.carpet, + Blocks.glowstone, + Blocks.sea_lantern + )); + + if (tools.contains(item) && farmBlocks.contains(block)) { + event.setCanceled(true); + } + + } + } + } @SubscribeEvent diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index a9632b9..699374d 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 3e599f5..dea6859 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -62,6 +62,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); debug.append("[necronnotifications][").append(ToggleCommand.necronNotificationsToggled).append("]\n"); debug.append("[bonzotimer][").append(ToggleCommand.bonzoTimerToggled).append("]\n"); + debug.append("[blockbreakingfarms][").append(ToggleCommand.blockBreakingFarmsToggled).append("]\n"); debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 2b9bbd7..81e3f9c 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -43,6 +43,8 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean notifySlayerSlainToggled; public static boolean necronNotificationsToggled; public static boolean bonzoTimerToggled; + public static boolean blockBreakingFarmsToggled; + // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -72,7 +74,7 @@ public class ToggleCommand extends CommandBase implements ICommand { return "/" + getCommandName() + " "; } @@ -90,7 +92,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", - "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "blockbreakingfarms", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); @@ -249,6 +251,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", bonzoTimerToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "blockbreakingfarms": + blockBreakingFarmsToggled = !blockBreakingFarmsToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlockBreakingFarms", blockBreakingFarmsToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Prevent breaking farms has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "threemanpuzzle": threeManToggled = !threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 03937a8..2860997 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -60,6 +60,7 @@ public class DankerGui extends GuiScreen { private GuiButton notifySlayerSlain; private GuiButton necronNotifications; private GuiButton bonzoTimer; + private GuiButton blockBreakingFarms; public DankerGui(int page) { this.page = page; @@ -125,6 +126,8 @@ public class DankerGui extends GuiScreen { flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); + //Page 6 + blockBreakingFarms = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled)); switch (page) { case 1: @@ -178,6 +181,11 @@ public class DankerGui extends GuiScreen { this.buttonList.add(flowerWeapons); this.buttonList.add(necronNotifications); this.buttonList.add(bonzoTimer); + this.buttonList.add(nextPage); + this.buttonList.add(backPage); + break; + case 6: + this.buttonList.add(blockBreakingFarms); this.buttonList.add(backPage); break; } @@ -190,7 +198,7 @@ public class DankerGui extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); - String pageText = "Page: " + page + "/5"; + String pageText = "Page: " + page + "/6"; int pageWidth = mc.fontRendererObj.getStringWidth(pageText); new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D); super.drawScreen(mouseX, mouseY, partialTicks); @@ -338,6 +346,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.bonzoTimerToggled = !ToggleCommand.bonzoTimerToggled; ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", ToggleCommand.bonzoTimerToggled); bonzoTimer.displayString = "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled); + } else if (button == blockBreakingFarms) { + ToggleCommand.blockBreakingFarmsToggled = !ToggleCommand.blockBreakingFarmsToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlockBreakingFarms", ToggleCommand.blockBreakingFarmsToggled); + blockBreakingFarms.displayString = "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled); } else if (button == pickBlock) { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 2822738..3d1855e 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -198,6 +198,7 @@ public class ConfigHandler { if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); if (!hasKey("toggles", "NecronNotifications")) writeBooleanConfig("toggles", "NecronNotifications", false); if (!hasKey("toggles", "BonzoTimer")) writeBooleanConfig("toggles", "BonzoTimer", false); + if (!hasKey("toggles", "BlockBreakingFarms")) writeBooleanConfig("toggles", "BlockBreakingFarms", true); // Puzzle Solvers @@ -475,6 +476,7 @@ public class ConfigHandler { ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain"); ToggleCommand.necronNotificationsToggled = getBoolean("toggles", "NecronNotifications"); ToggleCommand.bonzoTimerToggled = getBoolean("toggles", "BonzoTimer"); + ToggleCommand.blockBreakingFarmsToggled = getBoolean("toggles", "BlockBreakingFarms"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); ToggleCommand.flowerWeaponsToggled = getBoolean("toggles", "FlowerWeapons"); -- cgit From 7777fe8a544a347013c4790e16b061eca5b5e0de Mon Sep 17 00:00:00 2001 From: Sychic Date: Sat, 19 Dec 2020 15:37:39 -0500 Subject: Grab party with a button. Manual command still works, this just grabs from the current party. --- src/main/java/me/Danker/DankersSkyblockMod.java | 41 +++++++++++++++++++++- .../java/me/Danker/commands/SetPartyCommand.java | 20 +++++++++++ .../java/me/Danker/commands/SetkeyCommand.java | 1 - 3 files changed, 60 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 95c5436..e253646 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -97,7 +97,7 @@ public class DankersSkyblockMod static int tickAmount = 1; static String lastMaddoxCommand = "/cb placeholder"; static double lastMaddoxTime = 0; - static KeyBinding[] keyBindings = new KeyBinding[3]; + static KeyBinding[] keyBindings = new KeyBinding[4]; static boolean usingLabymod = false; static boolean usingOAM = false; static boolean OAMWarning = false; @@ -274,6 +274,7 @@ public class DankersSkyblockMod keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); keyBindings[2] = new KeyBinding("Reparty", Keyboard.KEY_P,"Danker's Skyblock Mod"); + keyBindings[3] = new KeyBinding("Get Party", Keyboard.KEY_O, "Danker's Skyblock Mod"); for (KeyBinding keyBinding : keyBindings) { ClientRegistry.registerKeyBinding(keyBinding); @@ -384,6 +385,39 @@ public class DankersSkyblockMod public void onChat(ClientChatReceivedEvent event) { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + if(SetPartyCommand.gettingParty){ + if(message.contains("-----------------------------")){ + switch(SetPartyCommand.delimiter){ + case 0: + System.out.println("Delimiter Cancelled"); + SetPartyCommand.delimiter++; + event.setCanceled(true); + return; + case 1: + System.out.println("Done Querying Party"); + SetPartyCommand.gettingParty = false; + SetPartyCommand.delimiter = 0; + event.setCanceled(true); + return; + } + } else if(message.contains("Party M")){ + // Looks for number between parentheses + Matcher members = (Pattern.compile("^.*?\\([^\\d]*(\\d+)[^\\d]*\\).*$")).matcher(message); + if(members.find()){ + System.out.println("Number of members read: " + members.group(1)); + event.setCanceled(true); + return; + } + System.out.println("Reading Party"); + SetPartyCommand.partyResponse += message.substring(message.indexOf(":") + 2); + event.setCanceled(true); + return; + } else if (message.contains("Party Leader")){ + event.setCanceled(true); + return; + } + } + if (!Utils.inSkyblock) return; // Action Bar @@ -2995,6 +3029,11 @@ public class DankersSkyblockMod EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + //Check for pressing O to read party + if(keyBindings[3].isPressed()){ + SetPartyCommand.getParty(); + } + // Check for pressing P for reparty if (keyBindings[2].isPressed()) { if(!SetPartyCommand.set){ diff --git a/src/main/java/me/Danker/commands/SetPartyCommand.java b/src/main/java/me/Danker/commands/SetPartyCommand.java index f840527..40551d3 100644 --- a/src/main/java/me/Danker/commands/SetPartyCommand.java +++ b/src/main/java/me/Danker/commands/SetPartyCommand.java @@ -10,9 +10,14 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; +import java.util.Arrays; + public class SetPartyCommand extends CommandBase implements ICommand { public static boolean set = false; + public static int delimiter = 0; + public static boolean gettingParty; + public static String partyResponse = ""; @Override public String getCommandName() { return "setparty"; } @@ -43,4 +48,19 @@ public class SetPartyCommand extends CommandBase implements ICommand { set = true; } + + public static void getParty() { + gettingParty = true; + partyResponse = ""; + Minecraft.getMinecraft().thePlayer.sendChatMessage("/pl"); + (new Thread(() ->{ + try{ + Thread.sleep(500); + RepartyCommand.players = Arrays.stream(partyResponse.split(" ")).filter(e -> !e.contains("[") && !e.contains("●")).toArray(String[]::new); + set = true; + } catch (InterruptedException e) { + e.printStackTrace(); + } + })).start(); + } } diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java index db5fb9a..ee4b5a5 100644 --- a/src/main/java/me/Danker/commands/SetkeyCommand.java +++ b/src/main/java/me/Danker/commands/SetkeyCommand.java @@ -38,5 +38,4 @@ public class SetkeyCommand extends CommandBase implements ICommand { ConfigHandler.writeStringConfig("api", "APIKey", arg1[0]); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set API key to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[0])); } - } -- cgit From d56b5061cf874d97a66e1ffeac4992a35476f29a Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 19 Dec 2020 19:12:25 -0500 Subject: Fix: Terminal Solvers highlighting items in inventory --- src/main/java/me/Danker/DankersSkyblockMod.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index da82fdb..325696e 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3536,7 +3536,8 @@ public class DankersSkyblockMod if (ToggleCommand.startsWithToggled && Utils.inDungeons && displayName.startsWith("What starts with:")) { char letter = displayName.charAt(displayName.indexOf("'") + 1); for (Slot slot : invSlots) { - ItemStack item = slot.getStack(); + if (slot.getSlotIndex() > 53) continue; + ItemStack item = slot.getStack(); if (item == null) continue; if (item.isItemEnchanted()) continue; if (StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter) { @@ -3556,6 +3557,7 @@ public class DankersSkyblockMod terminalColorNeeded = colour; for (Slot slot : invSlots) { + if (slot.getSlotIndex() > 53) continue; ItemStack item = slot.getStack(); if (item == null) continue; if (item.isItemEnchanted()) continue; -- cgit From dbef82994f3e437a2e674fb34f5e989944f53290 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 19 Dec 2020 19:46:29 -0500 Subject: Change default for prevent breaking farms to false --- src/main/java/me/Danker/handlers/ConfigHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 3d1855e..199936f 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -198,7 +198,7 @@ public class ConfigHandler { if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); if (!hasKey("toggles", "NecronNotifications")) writeBooleanConfig("toggles", "NecronNotifications", false); if (!hasKey("toggles", "BonzoTimer")) writeBooleanConfig("toggles", "BonzoTimer", false); - if (!hasKey("toggles", "BlockBreakingFarms")) writeBooleanConfig("toggles", "BlockBreakingFarms", true); + if (!hasKey("toggles", "BlockBreakingFarms")) writeBooleanConfig("toggles", "BlockBreakingFarms", false); // Puzzle Solvers -- cgit From 0fad92f9a890f74f2a1c7b0a792325a641f5d322 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sat, 19 Dec 2020 20:19:31 -0500 Subject: Fixed prevent breaking farms Could be improved with a mixin --- src/main/java/me/Danker/DankersSkyblockMod.java | 69 +++++++++++++------------ 1 file changed, 36 insertions(+), 33 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 325696e..84a181d 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3003,7 +3003,39 @@ public class DankersSkyblockMod if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; ItemStack item = event.entityPlayer.getHeldItem(); if (item == null) return; - Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + + if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { + + Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + + if (ToggleCommand.blockBreakingFarmsToggled) { + ArrayList tools = new ArrayList<>(Arrays.asList( + Items.wooden_hoe, + Items.stone_hoe, + Items.iron_hoe, + Items.golden_hoe, + Items.diamond_hoe, + Items.wooden_axe, + Items.stone_axe, + Items.iron_axe, + Items.golden_axe, + Items.diamond_axe + )); + + ArrayList farmBlocks = new ArrayList<>(Arrays.asList( + Blocks.dirt, + Blocks.farmland, + Blocks.carpet, + Blocks.glowstone, + Blocks.sea_lantern + )); + + if (tools.contains(item.getItem()) && farmBlocks.contains(block)) { + event.setCanceled(true); + } + + } + } if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) { if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { @@ -3038,7 +3070,9 @@ public class DankersSkyblockMod } } - else if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { + if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { + Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + ArrayList interactables = new ArrayList<>(Arrays.asList( Blocks.acacia_door, Blocks.anvil, @@ -3102,37 +3136,6 @@ public class DankersSkyblockMod } } } - - else if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { - if (ToggleCommand.blockBreakingFarmsToggled) { - ArrayList tools = new ArrayList(Arrays.asList( - Items.wooden_hoe, - Items.stone_hoe, - Items.iron_hoe, - Items.golden_hoe, - Items.diamond_hoe, - Items.wooden_axe, - Items.stone_axe, - Items.iron_axe, - Items.golden_axe, - Items.diamond_axe - )); - - ArrayList farmBlocks = new ArrayList(Arrays.asList( - Blocks.dirt, - Blocks.farmland, - Blocks.carpet, - Blocks.glowstone, - Blocks.sea_lantern - )); - - if (tools.contains(item) && farmBlocks.contains(block)) { - event.setCanceled(true); - } - - } - } - } @SubscribeEvent -- cgit From 8f9b562c093d99a40bb4ea9af61131331f1b0c31 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Sun, 20 Dec 2020 00:37:40 -0500 Subject: Reformat DankersSkyblockMod.java --- src/main/java/me/Danker/DankersSkyblockMod.java | 7035 ++++++++++++----------- 1 file changed, 3525 insertions(+), 3510 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 84a181d..d4d9b47 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -76,16 +76,15 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) -public class DankersSkyblockMod -{ +public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; public static final String VERSION = "1.8.5-beta5"; - + static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); public static Pattern t6EnchantPattern = Pattern.compile(""); - static Pattern petPattern = Pattern.compile("\\[Lvl [\\d]{1,3}]"); + static Pattern petPattern = Pattern.compile("\\[Lvl [\\d]{1,3}]"); static boolean updateChecked = false; public static int titleTimer = -1; public static boolean showTitle = false; @@ -101,70 +100,70 @@ public class DankersSkyblockMod static boolean usingLabymod = false; static boolean usingSpiderFrogOldAnimationsMod = false; public static String guiToOpen = null; - static boolean foundLivid = false; - static Entity livid = null; - public static double cakeTime; - public static double nextBonzoUse = 0; - public static boolean firstLaunch = false; - - public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); - public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); - - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", - "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", - "The reward isn't in any of our chests", "Both of them are telling the truth."}; - static Map triviaSolutions = new HashMap<>(); - static String[] triviaAnswers = null; - static Entity highestBlaze = null; - static Entity lowestBlaze = null; - // Among Us colours - static final int[] CREEPER_COLOURS = {0x50EF39, 0xC51111, 0x132ED1, 0x117F2D, 0xED54BA, 0xEF7D0D, 0xF5F557, 0xD6E0F0, 0x6B2FBB, 0x39FEDC}; - static boolean drawCreeperLines = false; - static Vec3 creeperLocation = new Vec3(0, 0, 0); - static List creeperLines = new ArrayList<>(); - static boolean prevInWaterRoom = false; - static boolean inWaterRoom = false; - static String waterAnswers = null; - static AxisAlignedBB correctTicTacToeButton = null; - static Pattern startsWithTerminalPattern = Pattern.compile("[A-Z]{2,}"); - static Slot[] clickInOrderSlots = new Slot[36]; - static int lastChronomatronRound = 0; - static List chronomatronPattern = new ArrayList<>(); - static int chronomatronMouseClicks = 0; - static int lastUltraSequencerClicked = 0; - static ItemStack[] experimentTableSlots = new ItemStack[54]; - static int pickBlockBind; - static boolean pickBlockBindSwapped = false; - static String terminalColorNeeded; - static int[] terminalNumberNeeded = new int[4]; - - static double dungeonStartTime = 0; + static boolean foundLivid = false; + static Entity livid = null; + public static double cakeTime; + public static double nextBonzoUse = 0; + public static boolean firstLaunch = false; + + public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); + public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); + + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", + "The reward isn't in any of our chests", "Both of them are telling the truth."}; + static Map triviaSolutions = new HashMap<>(); + static String[] triviaAnswers = null; + static Entity highestBlaze = null; + static Entity lowestBlaze = null; + // Among Us colours + static final int[] CREEPER_COLOURS = {0x50EF39, 0xC51111, 0x132ED1, 0x117F2D, 0xED54BA, 0xEF7D0D, 0xF5F557, 0xD6E0F0, 0x6B2FBB, 0x39FEDC}; + static boolean drawCreeperLines = false; + static Vec3 creeperLocation = new Vec3(0, 0, 0); + static List creeperLines = new ArrayList<>(); + static boolean prevInWaterRoom = false; + static boolean inWaterRoom = false; + static String waterAnswers = null; + static AxisAlignedBB correctTicTacToeButton = null; + static Pattern startsWithTerminalPattern = Pattern.compile("[A-Z]{2,}"); + static Slot[] clickInOrderSlots = new Slot[36]; + static int lastChronomatronRound = 0; + static List chronomatronPattern = new ArrayList<>(); + static int chronomatronMouseClicks = 0; + static int lastUltraSequencerClicked = 0; + static ItemStack[] experimentTableSlots = new ItemStack[54]; + static int pickBlockBind; + static boolean pickBlockBindSwapped = false; + static String terminalColorNeeded; + static int[] terminalNumberNeeded = new int[4]; + + static double dungeonStartTime = 0; static double bloodOpenTime = 0; static double watcherClearTime = 0; static double bossClearTime = 0; static int witherDoors = 0; static int dungeonDeaths = 0; static int puzzleFails = 0; - + static String lastSkill = "Farming"; public static boolean showSkillTracker; public static StopWatch skillStopwatch = new StopWatch(); - static double farmingXP = 0; - public static double farmingXPGained = 0; - static double miningXP = 0; - public static double miningXPGained = 0; - static double combatXP = 0; - public static double combatXPGained = 0; - static double foragingXP = 0; - public static double foragingXPGained = 0; - static double fishingXP = 0; - public static double fishingXPGained = 0; - static double enchantingXP = 0; - public static double enchantingXPGained = 0; - static double alchemyXP = 0; - public static double alchemyXPGained = 0; - static double xpLeft = 0; - + static double farmingXP = 0; + public static double farmingXPGained = 0; + static double miningXP = 0; + public static double miningXPGained = 0; + static double combatXP = 0; + public static double combatXPGained = 0; + static double foragingXP = 0; + public static double foragingXPGained = 0; + static double fishingXP = 0; + public static double fishingXPGained = 0; + static double enchantingXP = 0; + public static double enchantingXPGained = 0; + static double alchemyXP = 0; + public static double alchemyXPGained = 0; + static double xpLeft = 0; + public static String MAIN_COLOUR; public static String SECONDARY_COLOUR; public static String ERROR_COLOUR; @@ -192,3556 +191,3572 @@ public class DankersSkyblockMod public static int PET_80_TO_89; public static int PET_90_TO_99; public static int PET_100; - + @EventHandler public void init(FMLInitializationEvent event) { - MinecraftForge.EVENT_BUS.register(this); - MinecraftForge.EVENT_BUS.register(new PacketHandler()); - - ConfigHandler.reloadConfig(); - - // For golden enchants - t6Enchants.put("9Angler VI", "6Angler VI"); - t6Enchants.put("9Bane of Arthropods VI", "6Bane of Arthropods VI"); - t6Enchants.put("9Caster VI", "6Caster VI"); - t6Enchants.put("9Compact X", "6Compact X"); - t6Enchants.put("9Critical VI", "6Critical VI"); - t6Enchants.put("9Dragon Hunter V", "6Dragon Hunter V"); - t6Enchants.put("9Efficiency VI", "6Efficiency VI"); - t6Enchants.put("9Ender Slayer VI", "6Ender Slayer VI"); - t6Enchants.put("9Experience IV", "6Experience IV"); - t6Enchants.put("9Expertise X", "6Expertise X"); - t6Enchants.put("9Feather Falling X", "6Feather Falling X"); - t6Enchants.put("9Frail VI", "6Frail VI"); - t6Enchants.put("9Giant Killer VI", "6Giant Killer VI"); - t6Enchants.put("9Growth VI", "6Growth VI"); - t6Enchants.put("9Infinite Quiver X", "6Infinite Quiver X"); - t6Enchants.put("9Lethality VI", "6Lethality VI"); - t6Enchants.put("9Life Steal IV", "6Life Steal IV"); - t6Enchants.put("9Looting IV", "6Looting IV"); - t6Enchants.put("9Luck VI", "6Luck VI"); - t6Enchants.put("9Luck of the Sea VI", "6Luck of the Sea VI"); - t6Enchants.put("9Lure VI", "6Lure VI"); - t6Enchants.put("9Magnet VI", "6Magnet VI"); - t6Enchants.put("9Overload V", "6Overload V"); - t6Enchants.put("9Power VI", "6Power VI"); - t6Enchants.put("9Protection VI", "6Protection VI"); - t6Enchants.put("9Scavenger IV", "6Scavenger IV"); - t6Enchants.put("9Scavenger V", "6Scavenger V"); - t6Enchants.put("9Sharpness VI", "6Sharpness VI"); - t6Enchants.put("9Smite VI", "6Smite VI"); - t6Enchants.put("9Spiked Hook VI", "6Spiked Hook VI"); - t6Enchants.put("9Thunderlord VI", "6Thunderlord VI"); - t6Enchants.put("9Vampirism VI", "6Vampirism VI"); - - triviaSolutions.put("What is the status of The Watcher?", new String[]{"Stalker"}); - triviaSolutions.put("What is the status of Bonzo?", new String[]{"New Necromancer"}); - triviaSolutions.put("What is the status of Scarf?", new String[]{"Apprentice Necromancer"}); - triviaSolutions.put("What is the status of The Professor?", new String[]{"Professor"}); - triviaSolutions.put("What is the status of Thorn?", new String[]{"Shaman Necromancer"}); - triviaSolutions.put("What is the status of Livid?", new String[]{"Master Necromancer"}); - triviaSolutions.put("What is the status of Sadan?", new String[]{"Necromancer Lord"}); - triviaSolutions.put("What is the status of Maxor?", new String[]{"Young Wither"}); - triviaSolutions.put("What is the status of Goldor?", new String[]{"Wither Soldier"}); - triviaSolutions.put("What is the status of Storm?", new String[]{"Elementalist"}); - triviaSolutions.put("What is the status of Necron?", new String[]{"Wither Lord"}); - triviaSolutions.put("How many total Fairy Souls are there?", new String[]{"209 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Spider's Den?", new String[]{"17 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in The End?", new String[]{"12 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in The Barn?", new String[]{"7 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Mushroom Desert?", new String[]{"8 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Blazing Fortress?", new String[]{"19 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in The Park?", new String[]{"11 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Jerry's Workshop?", new String[]{"5 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Hub?", new String[]{"79 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in The Hub?", new String[]{"79 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Deep Caverns?", new String[]{"21 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Gold Mine?", new String[]{"12 Fairy Souls"}); - triviaSolutions.put("How many Fairy Souls are there in Dungeon Hub?", new String[]{"7 Fairy Souls"}); - triviaSolutions.put("Which brother is on the Spider's Den?", new String[]{"Rick"}); - triviaSolutions.put("What is the name of Rick's brother?", new String[]{"Pat"}); - triviaSolutions.put("What is the name of the Painter in the Hub?", new String[]{"Marco"}); - triviaSolutions.put("What is the name of the person that upgrades pets?", new String[]{"Kat"}); - triviaSolutions.put("What is the name of the lady of the Nether?", new String[]{"Elle"}); - triviaSolutions.put("Which villager in the Village gives you a Rogue Sword?", new String[]{"Jamie"}); - triviaSolutions.put("How many unique minions are there?", new String[]{"52 Minions"}); - triviaSolutions.put("Which of these enemies does not spawn in the Spider's Den?", new String[]{"Zombie Spider", "Cave Spider", "Wither Skeleton", - "Dashing Spooder", "Broodfather", "Night Spider"}); - triviaSolutions.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"}); - triviaSolutions.put("Which of these is not a dragon in The End?", new String[]{"Zoomer Dragon", "Weak Dragon", "Stonk Dragon", "Holy Dragon", "Boomer Dragon", - "Booger Dragon", "Older Dragon", "Elder Dragon", "Stable Dragon", "Professor Dragon"}); - - String patternString = "(" + String.join("|", t6Enchants.keySet()) + ")"; - t6EnchantPattern = Pattern.compile(patternString); - - keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); - keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); - - for (KeyBinding keyBinding : keyBindings) { - ClientRegistry.registerKeyBinding(keyBinding); - } + MinecraftForge.EVENT_BUS.register(this); + MinecraftForge.EVENT_BUS.register(new PacketHandler()); + + ConfigHandler.reloadConfig(); + + // For golden enchants + t6Enchants.put("9Angler VI", "6Angler VI"); + t6Enchants.put("9Bane of Arthropods VI", "6Bane of Arthropods VI"); + t6Enchants.put("9Caster VI", "6Caster VI"); + t6Enchants.put("9Compact X", "6Compact X"); + t6Enchants.put("9Critical VI", "6Critical VI"); + t6Enchants.put("9Dragon Hunter V", "6Dragon Hunter V"); + t6Enchants.put("9Efficiency VI", "6Efficiency VI"); + t6Enchants.put("9Ender Slayer VI", "6Ender Slayer VI"); + t6Enchants.put("9Experience IV", "6Experience IV"); + t6Enchants.put("9Expertise X", "6Expertise X"); + t6Enchants.put("9Feather Falling X", "6Feather Falling X"); + t6Enchants.put("9Frail VI", "6Frail VI"); + t6Enchants.put("9Giant Killer VI", "6Giant Killer VI"); + t6Enchants.put("9Growth VI", "6Growth VI"); + t6Enchants.put("9Infinite Quiver X", "6Infinite Quiver X"); + t6Enchants.put("9Lethality VI", "6Lethality VI"); + t6Enchants.put("9Life Steal IV", "6Life Steal IV"); + t6Enchants.put("9Looting IV", "6Looting IV"); + t6Enchants.put("9Luck VI", "6Luck VI"); + t6Enchants.put("9Luck of the Sea VI", "6Luck of the Sea VI"); + t6Enchants.put("9Lure VI", "6Lure VI"); + t6Enchants.put("9Magnet VI", "6Magnet VI"); + t6Enchants.put("9Overload V", "6Overload V"); + t6Enchants.put("9Power VI", "6Power VI"); + t6Enchants.put("9Protection VI", "6Protection VI"); + t6Enchants.put("9Scavenger IV", "6Scavenger IV"); + t6Enchants.put("9Scavenger V", "6Scavenger V"); + t6Enchants.put("9Sharpness VI", "6Sharpness VI"); + t6Enchants.put("9Smite VI", "6Smite VI"); + t6Enchants.put("9Spiked Hook VI", "6Spiked Hook VI"); + t6Enchants.put("9Thunderlord VI", "6Thunderlord VI"); + t6Enchants.put("9Vampirism VI", "6Vampirism VI"); + + triviaSolutions.put("What is the status of The Watcher?", new String[]{"Stalker"}); + triviaSolutions.put("What is the status of Bonzo?", new String[]{"New Necromancer"}); + triviaSolutions.put("What is the status of Scarf?", new String[]{"Apprentice Necromancer"}); + triviaSolutions.put("What is the status of The Professor?", new String[]{"Professor"}); + triviaSolutions.put("What is the status of Thorn?", new String[]{"Shaman Necromancer"}); + triviaSolutions.put("What is the status of Livid?", new String[]{"Master Necromancer"}); + triviaSolutions.put("What is the status of Sadan?", new String[]{"Necromancer Lord"}); + triviaSolutions.put("What is the status of Maxor?", new String[]{"Young Wither"}); + triviaSolutions.put("What is the status of Goldor?", new String[]{"Wither Soldier"}); + triviaSolutions.put("What is the status of Storm?", new String[]{"Elementalist"}); + triviaSolutions.put("What is the status of Necron?", new String[]{"Wither Lord"}); + triviaSolutions.put("How many total Fairy Souls are there?", new String[]{"209 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Spider's Den?", new String[]{"17 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in The End?", new String[]{"12 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in The Barn?", new String[]{"7 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Mushroom Desert?", new String[]{"8 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Blazing Fortress?", new String[]{"19 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in The Park?", new String[]{"11 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Jerry's Workshop?", new String[]{"5 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Hub?", new String[]{"79 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in The Hub?", new String[]{"79 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Deep Caverns?", new String[]{"21 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Gold Mine?", new String[]{"12 Fairy Souls"}); + triviaSolutions.put("How many Fairy Souls are there in Dungeon Hub?", new String[]{"7 Fairy Souls"}); + triviaSolutions.put("Which brother is on the Spider's Den?", new String[]{"Rick"}); + triviaSolutions.put("What is the name of Rick's brother?", new String[]{"Pat"}); + triviaSolutions.put("What is the name of the Painter in the Hub?", new String[]{"Marco"}); + triviaSolutions.put("What is the name of the person that upgrades pets?", new String[]{"Kat"}); + triviaSolutions.put("What is the name of the lady of the Nether?", new String[]{"Elle"}); + triviaSolutions.put("Which villager in the Village gives you a Rogue Sword?", new String[]{"Jamie"}); + triviaSolutions.put("How many unique minions are there?", new String[]{"52 Minions"}); + triviaSolutions.put("Which of these enemies does not spawn in the Spider's Den?", new String[]{"Zombie Spider", "Cave Spider", "Wither Skeleton", + "Dashing Spooder", "Broodfather", "Night Spider"}); + triviaSolutions.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"}); + triviaSolutions.put("Which of these is not a dragon in The End?", new String[]{"Zoomer Dragon", "Weak Dragon", "Stonk Dragon", "Holy Dragon", "Boomer Dragon", + "Booger Dragon", "Older Dragon", "Elder Dragon", "Stable Dragon", "Professor Dragon"}); + + String patternString = "(" + String.join("|", t6Enchants.keySet()) + ")"; + t6EnchantPattern = Pattern.compile(patternString); + + keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); + keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); + + for (KeyBinding keyBinding : keyBindings) { + ClientRegistry.registerKeyBinding(keyBinding); + } } - + @EventHandler public void preInit(final FMLPreInitializationEvent event) { - ClientCommandHandler.instance.registerCommand(new ToggleCommand()); - ClientCommandHandler.instance.registerCommand(new SetkeyCommand()); - ClientCommandHandler.instance.registerCommand(new GetkeyCommand()); - ClientCommandHandler.instance.registerCommand(new LootCommand()); - ClientCommandHandler.instance.registerCommand(new ReloadConfigCommand()); - ClientCommandHandler.instance.registerCommand(new DisplayCommand()); - ClientCommandHandler.instance.registerCommand(new MoveCommand()); - ClientCommandHandler.instance.registerCommand(new SlayerCommand()); - ClientCommandHandler.instance.registerCommand(new SkillsCommand()); - ClientCommandHandler.instance.registerCommand(new GuildOfCommand()); - ClientCommandHandler.instance.registerCommand(new DHelpCommand()); - ClientCommandHandler.instance.registerCommand(new PetsCommand()); - ClientCommandHandler.instance.registerCommand(new BankCommand()); - ClientCommandHandler.instance.registerCommand(new ArmourCommand()); - ClientCommandHandler.instance.registerCommand(new ImportFishingCommand()); - ClientCommandHandler.instance.registerCommand(new ResetLootCommand()); - ClientCommandHandler.instance.registerCommand(new ScaleCommand()); - ClientCommandHandler.instance.registerCommand(new SkyblockPlayersCommand()); - ClientCommandHandler.instance.registerCommand(new BlockSlayerCommand()); - ClientCommandHandler.instance.registerCommand(new DungeonsCommand()); - ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); - ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); - ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); + ClientCommandHandler.instance.registerCommand(new ToggleCommand()); + ClientCommandHandler.instance.registerCommand(new SetkeyCommand()); + ClientCommandHandler.instance.registerCommand(new GetkeyCommand()); + ClientCommandHandler.instance.registerCommand(new LootCommand()); + ClientCommandHandler.instance.registerCommand(new ReloadConfigCommand()); + ClientCommandHandler.instance.registerCommand(new DisplayCommand()); + ClientCommandHandler.instance.registerCommand(new MoveCommand()); + ClientCommandHandler.instance.registerCommand(new SlayerCommand()); + ClientCommandHandler.instance.registerCommand(new SkillsCommand()); + ClientCommandHandler.instance.registerCommand(new GuildOfCommand()); + ClientCommandHandler.instance.registerCommand(new DHelpCommand()); + ClientCommandHandler.instance.registerCommand(new PetsCommand()); + ClientCommandHandler.instance.registerCommand(new BankCommand()); + ClientCommandHandler.instance.registerCommand(new ArmourCommand()); + ClientCommandHandler.instance.registerCommand(new ImportFishingCommand()); + ClientCommandHandler.instance.registerCommand(new ResetLootCommand()); + ClientCommandHandler.instance.registerCommand(new ScaleCommand()); + ClientCommandHandler.instance.registerCommand(new SkyblockPlayersCommand()); + ClientCommandHandler.instance.registerCommand(new BlockSlayerCommand()); + ClientCommandHandler.instance.registerCommand(new DungeonsCommand()); + ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); + ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); + ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); } - + @EventHandler public void postInit(final FMLPostInitializationEvent event) { - usingLabymod = Loader.isModLoaded("labymod"); - System.out.println("LabyMod detection: " + usingLabymod); - try { - Class clazz = Class.forName("com.spiderfrog.oldanimations.OldAnimationsMod"); - usingSpiderFrogOldAnimationsMod = true; - } catch (Exception var1) { - usingSpiderFrogOldAnimationsMod = false; - } - System.out.println("OldAnimationsMod detection: " + usingSpiderFrogOldAnimationsMod); + usingLabymod = Loader.isModLoaded("labymod"); + System.out.println("LabyMod detection: " + usingLabymod); + try { + Class clazz = Class.forName("com.spiderfrog.oldanimations.OldAnimationsMod"); + usingSpiderFrogOldAnimationsMod = true; + } catch (Exception var1) { + usingSpiderFrogOldAnimationsMod = false; + } + System.out.println("OldAnimationsMod detection: " + usingSpiderFrogOldAnimationsMod); } - + // Update checker @SubscribeEvent public void onJoin(EntityJoinWorldEvent event) { - if (firstLaunch) { - firstLaunch = false; - ConfigHandler.writeBooleanConfig("misc", "firstLaunch", false); - - IChatComponent chatComponent = new ChatComponentText( - EnumChatFormatting.GOLD + "Thank you for downloading Danker's Skyblock Mod.\n" + - "To get started, run the command " + EnumChatFormatting.GOLD + "/dsm" + EnumChatFormatting.RESET + " to view all the mod features." - ); - chatComponent.setChatStyle(chatComponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("Click to open the DSM menu."))).setChatClickEvent(new ClickEvent(Action.RUN_COMMAND, "/dsm"))); - - new Thread(()->{ - while (true) { - if (Minecraft.getMinecraft().thePlayer == null) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - e.printStackTrace(); - } - continue; - } - Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent); - break; - } - }).start(); - } - - if (!updateChecked) { - updateChecked = true; - - if (usingSpiderFrogOldAnimationsMod) { - new Thread(()->{ - while (true) { - if (Minecraft.getMinecraft().thePlayer == null) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } else { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + - "You are using spiderfrog's OldAnimationsMod.\n" + - "Danker's Skyblock Mod is incompatible with OldAnimationsMod.\n" + - "Please remove OldAnimationsMod or you may experience crashes or other issues.")); - break; - } - } - }).start(); - } - - // MULTI THREAD DRIFTING - new Thread(() -> { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - - System.out.println("Checking for updates..."); - JsonObject latestRelease = APIHandler.getResponse("https://api.github.com/repos/bowser0000/SkyblockMod/releases/latest"); - - String latestTag = latestRelease.get("tag_name").getAsString(); - DefaultArtifactVersion currentVersion = new DefaultArtifactVersion(VERSION); - DefaultArtifactVersion latestVersion = new DefaultArtifactVersion(latestTag.substring(1)); - - if (currentVersion.compareTo(latestVersion) < 0) { - String releaseURL = latestRelease.get("html_url").getAsString(); - - ChatComponentText update = new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + " [UPDATE] "); - update.setChatStyle(update.getChatStyle().setChatClickEvent(new ClickEvent(Action.OPEN_URL, releaseURL))); - - try { - Thread.sleep(2000); - } catch (InterruptedException ex) { - ex.printStackTrace(); - } - player.addChatMessage(new ChatComponentText(ERROR_COLOUR + MODID + " is outdated. Please update to " + latestTag + ".\n").appendSibling(update)); - } - }).start(); - } + if (firstLaunch) { + firstLaunch = false; + ConfigHandler.writeBooleanConfig("misc", "firstLaunch", false); + + IChatComponent chatComponent = new ChatComponentText( + EnumChatFormatting.GOLD + "Thank you for downloading Danker's Skyblock Mod.\n" + + "To get started, run the command " + EnumChatFormatting.GOLD + "/dsm" + EnumChatFormatting.RESET + " to view all the mod features." + ); + chatComponent.setChatStyle(chatComponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("Click to open the DSM menu."))).setChatClickEvent(new ClickEvent(Action.RUN_COMMAND, "/dsm"))); + + new Thread(() -> { + while (true) { + if (Minecraft.getMinecraft().thePlayer == null) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + continue; + } + Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent); + break; + } + }).start(); + } + + if (!updateChecked) { + updateChecked = true; + + if (usingSpiderFrogOldAnimationsMod) { + new Thread(() -> { + while (true) { + if (Minecraft.getMinecraft().thePlayer == null) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } else { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + + "You are using spiderfrog's OldAnimationsMod.\n" + + "Danker's Skyblock Mod is incompatible with OldAnimationsMod.\n" + + "Please remove OldAnimationsMod or you may experience crashes or other issues.")); + break; + } + } + }).start(); + } + + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + + System.out.println("Checking for updates..."); + JsonObject latestRelease = APIHandler.getResponse("https://api.github.com/repos/bowser0000/SkyblockMod/releases/latest"); + + String latestTag = latestRelease.get("tag_name").getAsString(); + DefaultArtifactVersion currentVersion = new DefaultArtifactVersion(VERSION); + DefaultArtifactVersion latestVersion = new DefaultArtifactVersion(latestTag.substring(1)); + + if (currentVersion.compareTo(latestVersion) < 0) { + String releaseURL = latestRelease.get("html_url").getAsString(); + + ChatComponentText update = new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + " [UPDATE] "); + update.setChatStyle(update.getChatStyle().setChatClickEvent(new ClickEvent(Action.OPEN_URL, releaseURL))); + + try { + Thread.sleep(2000); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + player.addChatMessage(new ChatComponentText(ERROR_COLOUR + MODID + " is outdated. Please update to " + latestTag + ".\n").appendSibling(update)); + } + }).start(); + } } - + @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { - foundLivid = false; - livid = null; - nextBonzoUse = 0; + foundLivid = false; + livid = null; + nextBonzoUse = 0; } - + // It randomly broke, so I had to make it the highest priority @SubscribeEvent(priority = EventPriority.HIGHEST) public void onChat(ClientChatReceivedEvent event) { - String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - - if (!Utils.inSkyblock) return; - - // Action Bar - if (event.type == 2) { - String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); - for (String section : actionBarSections) { - if (section.contains("+") && section.contains("/") && section.contains("(")) { - if (!section.contains("Runecrafting") && !section.contains("Carpentry")) { - int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50; - double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); - int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")); - xpLeft = xpToLevelUp - currentXP; - int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit); - double totalXP = currentXP + previousXP; - String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" ")); - switch (skill) { - case "Farming": - lastSkill = "Farming"; - if (farmingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) farmingXPGained += totalXP - farmingXP; - } - farmingXP = totalXP; - break; - case "Mining": - lastSkill = "Mining"; - if (miningXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) miningXPGained += totalXP - miningXP; - } - miningXP = totalXP; - break; - case "Combat": - lastSkill = "Combat"; - if (combatXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) combatXPGained += totalXP - combatXP; - } - combatXP = totalXP; - break; - case "Foraging": - lastSkill = "Foraging"; - if (foragingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) foragingXPGained += totalXP - foragingXP; - } - foragingXP = totalXP; - break; - case "Fishing": - lastSkill = "Fishing"; - if (fishingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) fishingXPGained += totalXP - fishingXP; - } - fishingXP = totalXP; - break; - case "Enchanting": - lastSkill = "Enchanting"; - if (enchantingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) enchantingXPGained += totalXP - enchantingXP; - } - enchantingXP = totalXP; - break; - case "Alchemy": - lastSkill = "Alchemy"; - if (alchemyXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) alchemyXPGained += totalXP - alchemyXP; - } - alchemyXP = totalXP; - break; - default: - System.err.println("Unknown skill."); - } - } - - if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) { - String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); - double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); - int limit; - int totalXp; - if (section.contains("Farming") || section.contains("Enchanting")) { - limit = 60; - totalXp = 111672425; - } else { - limit = 50; - totalXp = 55172425; - } - int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit); - double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D; - - NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); - skillTimer = SKILL_TIME; - showSkill = true; - skillText = SKILL_50_COLOUR + xpGained + " (" + nf.format(currentXp + previousXp) + "/" + nf.format(totalXp) + ") " + percentage + "%"; - } - } - } - return; - } - - if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons && message.contains("Bonzo's Mask") && message.contains("saved your life!")) { - double usedTime = System.currentTimeMillis() / 1000; - Minecraft mc = Minecraft.getMinecraft(); - EntityPlayerSP player = mc.thePlayer; - ItemStack bonzoMask = player.getCurrentArmor(3); - if (bonzoMask != null && bonzoMask.getItem() == Items.skull) { - int cooldownSeconds = 0; - for(String line : Utils.getItemLore(bonzoMask)) { - String stripped = StringUtils.stripControlCodes(line); - if (stripped.startsWith("Cooldown: ")) - cooldownSeconds = Integer.parseInt(stripped.replaceAll("[^\\d]", "")); - } - System.out.println("Parsed Bonzo Mask Cooldown: " + cooldownSeconds); - if (cooldownSeconds > 0) - nextBonzoUse = usedTime + cooldownSeconds; - } - } - + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + + // Action Bar + if (event.type == 2) { + String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); + for (String section : actionBarSections) { + if (section.contains("+") && section.contains("/") && section.contains("(")) { + if (!section.contains("Runecrafting") && !section.contains("Carpentry")) { + int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50; + double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); + int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")); + xpLeft = xpToLevelUp - currentXP; + int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit); + double totalXP = currentXP + previousXP; + String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" ")); + switch (skill) { + case "Farming": + lastSkill = "Farming"; + if (farmingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + farmingXPGained += totalXP - farmingXP; + } + farmingXP = totalXP; + break; + case "Mining": + lastSkill = "Mining"; + if (miningXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + miningXPGained += totalXP - miningXP; + } + miningXP = totalXP; + break; + case "Combat": + lastSkill = "Combat"; + if (combatXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + combatXPGained += totalXP - combatXP; + } + combatXP = totalXP; + break; + case "Foraging": + lastSkill = "Foraging"; + if (foragingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + foragingXPGained += totalXP - foragingXP; + } + foragingXP = totalXP; + break; + case "Fishing": + lastSkill = "Fishing"; + if (fishingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + fishingXPGained += totalXP - fishingXP; + } + fishingXP = totalXP; + break; + case "Enchanting": + lastSkill = "Enchanting"; + if (enchantingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + enchantingXPGained += totalXP - enchantingXP; + } + enchantingXP = totalXP; + break; + case "Alchemy": + lastSkill = "Alchemy"; + if (alchemyXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) + alchemyXPGained += totalXP - alchemyXP; + } + alchemyXP = totalXP; + break; + default: + System.err.println("Unknown skill."); + } + } + + if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) { + String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); + double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); + int limit; + int totalXp; + if (section.contains("Farming") || section.contains("Enchanting")) { + limit = 60; + totalXp = 111672425; + } else { + limit = 50; + totalXp = 55172425; + } + int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit); + double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D; + + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); + skillTimer = SKILL_TIME; + showSkill = true; + skillText = SKILL_50_COLOUR + xpGained + " (" + nf.format(currentXp + previousXp) + "/" + nf.format(totalXp) + ") " + percentage + "%"; + } + } + } + return; + } + + if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons && message.contains("Bonzo's Mask") && message.contains("saved your life!")) { + double usedTime = System.currentTimeMillis() / 1000; + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + ItemStack bonzoMask = player.getCurrentArmor(3); + if (bonzoMask != null && bonzoMask.getItem() == Items.skull) { + int cooldownSeconds = 0; + for (String line : Utils.getItemLore(bonzoMask)) { + String stripped = StringUtils.stripControlCodes(line); + if (stripped.startsWith("Cooldown: ")) + cooldownSeconds = Integer.parseInt(stripped.replaceAll("[^\\d]", "")); + } + System.out.println("Parsed Bonzo Mask Cooldown: " + cooldownSeconds); + if (cooldownSeconds > 0) + nextBonzoUse = usedTime + cooldownSeconds; + } + } + // Dungeon chat spoken by an NPC, containing : if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) { - for (String solution : riddleSolutions) { - if (message.contains(solution)) { - String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":")); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing.")); - break; - } - } - } + for (String solution : riddleSolutions) { + if (message.contains(solution)) { + String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":")); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing.")); + break; + } + } + } if (ToggleCommand.necronNotificationsToggled && Utils.inDungeons && message.contains("[BOSS] Necron:")) { - Minecraft mc = Minecraft.getMinecraft(); - World world = mc.theWorld; - if (message.contains("You tricked me!") || message.contains("That beam, it hurts! IT HURTS!!")) { - Utils.createTitle(EnumChatFormatting.RED + "NECRON STUCK!", 2); - } else if (message.contains("STOP USING MY FACTORY AGAINST ME!") || message.contains("OOF") || message.contains("ANOTHER TRAP!! YOUR TRICKS ARE FUTILE!") || message.contains("SERIOUSLY? AGAIN?!") || message.contains("STOP!!!!!")) { - List necronLabels = world.getEntities(EntityArmorStand.class, (entity->{ - if (!entity.hasCustomName()) return false; - if (!entity.getCustomNameTag().contains("Necron")) return false; - return true; - })); - if(necronLabels.size() == 0) { - Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); - } else { - EntityArmorStand necron = necronLabels.get(0); - double x = necron.posX; - double z = necron.posZ; - - BlockPos blockPos = new BlockPos(x, 168, z); - - IBlockState blockState = world.getBlockState(blockPos); - Block block = blockState.getBlock(); - - if (block != Blocks.stained_hardened_clay) { - Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); - } else { - switch (block.getDamageValue(world, blockPos)) { - case 4: - Utils.createTitle(EnumChatFormatting.YELLOW + "YELLOW PILLAR!", 2); - break; - case 5: - Utils.createTitle(EnumChatFormatting.GREEN + "LIME PILLAR!", 2); - break; - case 11: - Utils.createTitle(EnumChatFormatting.BLUE + "BLUE PILLAR!", 2); - break; - default: - Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); - } - } - - } - } else if (message.contains("I'VE HAD ENOUGH! YOU'RE NOT HITTING ME WITH ANY MORE PILLARS!")) { - Utils.createTitle(EnumChatFormatting.RED + "RED PILLAR!", 2); - } else if (message.contains("ARGH!")) { - Utils.createTitle(EnumChatFormatting.RED + "EXPLOSION OVER!", 2); - } - } - + Minecraft mc = Minecraft.getMinecraft(); + World world = mc.theWorld; + if (message.contains("You tricked me!") || message.contains("That beam, it hurts! IT HURTS!!")) { + Utils.createTitle(EnumChatFormatting.RED + "NECRON STUCK!", 2); + } else if (message.contains("STOP USING MY FACTORY AGAINST ME!") || message.contains("OOF") || message.contains("ANOTHER TRAP!! YOUR TRICKS ARE FUTILE!") || message.contains("SERIOUSLY? AGAIN?!") || message.contains("STOP!!!!!")) { + List necronLabels = world.getEntities(EntityArmorStand.class, (entity -> { + if (!entity.hasCustomName()) return false; + if (!entity.getCustomNameTag().contains("Necron")) return false; + return true; + })); + if (necronLabels.size() == 0) { + Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + } else { + EntityArmorStand necron = necronLabels.get(0); + double x = necron.posX; + double z = necron.posZ; + + BlockPos blockPos = new BlockPos(x, 168, z); + + IBlockState blockState = world.getBlockState(blockPos); + Block block = blockState.getBlock(); + + if (block != Blocks.stained_hardened_clay) { + Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + } else { + switch (block.getDamageValue(world, blockPos)) { + case 4: + Utils.createTitle(EnumChatFormatting.YELLOW + "YELLOW PILLAR!", 2); + break; + case 5: + Utils.createTitle(EnumChatFormatting.GREEN + "LIME PILLAR!", 2); + break; + case 11: + Utils.createTitle(EnumChatFormatting.BLUE + "BLUE PILLAR!", 2); + break; + default: + Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + } + } + + } + } else if (message.contains("I'VE HAD ENOUGH! YOU'RE NOT HITTING ME WITH ANY MORE PILLARS!")) { + Utils.createTitle(EnumChatFormatting.RED + "RED PILLAR!", 2); + } else if (message.contains("ARGH!")) { + Utils.createTitle(EnumChatFormatting.RED + "EXPLOSION OVER!", 2); + } + } + if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { - watcherClearTime = System.currentTimeMillis() / 1000; - } - if (message.contains("[BOSS] The Watcher: That will be enough for now.")) { - if (ToggleCommand.watcherReadyToggled) Utils.createTitle(EnumChatFormatting.RED + "WATCHER READY", 2); - } - if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { - puzzleFails++; - } - - if (message.contains(":")) return; - - // Spirit Sceptre - if (!ToggleCommand.sceptreMessages && message.contains("Your Spirit Sceptre hit ")) { - event.setCanceled(true); - return; - } - // Midas Staff - if (!ToggleCommand.midasStaffMessages && message.contains("Your Molten Wave hit ")) { - event.setCanceled(true); - return; - } - // Heals - if (!ToggleCommand.healMessages && message.contains(" health!") && (message.contains("You healed ") || message.contains(" healed you for "))) { - event.setCanceled(true); - return; - } - // Implosion - if (!ToggleCommand.implosionMessages) { - if (message.contains("Your Implosion hit ") || message.contains("There are blocks in the way")) { - event.setCanceled(true); - return; - } - } - + watcherClearTime = System.currentTimeMillis() / 1000; + } + if (message.contains("[BOSS] The Watcher: That will be enough for now.")) { + if (ToggleCommand.watcherReadyToggled) Utils.createTitle(EnumChatFormatting.RED + "WATCHER READY", 2); + } + if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { + puzzleFails++; + } + + if (message.contains(":")) return; + + // Spirit Sceptre + if (!ToggleCommand.sceptreMessages && message.contains("Your Spirit Sceptre hit ")) { + event.setCanceled(true); + return; + } + // Midas Staff + if (!ToggleCommand.midasStaffMessages && message.contains("Your Molten Wave hit ")) { + event.setCanceled(true); + return; + } + // Heals + if (!ToggleCommand.healMessages && message.contains(" health!") && (message.contains("You healed ") || message.contains(" healed you for "))) { + event.setCanceled(true); + return; + } + // Implosion + if (!ToggleCommand.implosionMessages) { + if (message.contains("Your Implosion hit ") || message.contains("There are blocks in the way")) { + event.setCanceled(true); + return; + } + } + if (ToggleCommand.oruoToggled && Utils.inDungeons) { - // Don't set every answer to wrong with this question - if (message.contains("What SkyBlock year is it?")) triviaAnswers = null; - - for (String question : triviaSolutions.keySet()) { - if (message.contains(question)) { - triviaAnswers = triviaSolutions.get(question); - break; - } - } - - // Set wrong answers to red and remove click events - if (triviaAnswers != null && (message.contains("ⓐ") || message.contains("ⓑ") || message.contains("ⓒ"))) { - boolean isSolution = false; - for (String solution : triviaAnswers) { - if (message.contains(solution)) { - isSolution = true; - break; - } - } - if (!isSolution) { - char letter = message.charAt(5); - String option = message.substring(6); - event.message = new ChatComponentText(" " + EnumChatFormatting.GOLD + letter + TRIVIA_WRONG_ANSWER_COLOUR + option); - return; - } - } - } - - if (ToggleCommand.gpartyToggled) { - if (message.contains(" has invited all members of ")) { - try { - final SystemTray tray = SystemTray.getSystemTray(); - final Image image = Toolkit.getDefaultToolkit().createImage("icon.png"); - final TrayIcon trayIcon = new TrayIcon(image, "Guild Party Notifier"); - trayIcon.setImageAutoSize(true); - trayIcon.setToolTip("Guild Party Notifier"); - tray.add(trayIcon); - trayIcon.displayMessage("Guild Party", message, TrayIcon.MessageType.INFO); - tray.remove(trayIcon); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - } - - if (ToggleCommand.golemAlertToggled) { - if (message.contains("The ground begins to shake as an Endstone Protector rises from below!")) { - Utils.createTitle(EnumChatFormatting.RED + "GOLEM SPAWNING!", 3); - } - } - - if (message.contains("Yum! You gain +") && message.contains(" for 48 hours!")) { - cakeTime = System.currentTimeMillis() / 1000 + 172800; // Add 48 hours - ConfigHandler.writeDoubleConfig("misc", "cakeTime", cakeTime); - } - - boolean wolfRNG = false; - boolean spiderRNG = false; - boolean zombieRNG = false; - // T6 books - if (message.contains("VERY RARE DROP! (Enchanted Book)") || message.contains("CRAZY RARE DROP! (Enchanted Book)")) { - // Loop through scoreboard to see what boss you're doing - List scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("Sven Packmaster")) { - LootCommand.wolfBooks++; - ConfigHandler.writeIntConfig("wolf", "book", LootCommand.wolfBooks); - } else if (sCleaned.contains("Tarantula Broodfather")) { - LootCommand.spiderBooks++; - ConfigHandler.writeIntConfig("spider", "book", LootCommand.spiderBooks); - } else if (sCleaned.contains("Revenant Horror")) { - LootCommand.zombieBooks++; - ConfigHandler.writeIntConfig("zombie", "book", LootCommand.zombieBooks); - } - } - } - - // Wolf - if (message.contains("Talk to Maddox to claim your Wolf Slayer XP!")) { - LootCommand.wolfSvens++; - LootCommand.wolfSvensSession++; - if (LootCommand.wolfBosses != -1) { - LootCommand.wolfBosses++; - } - if (LootCommand.wolfBossesSession != -1) { - LootCommand.wolfBossesSession++; - } - ConfigHandler.writeIntConfig("wolf", "svens", LootCommand.wolfSvens); - ConfigHandler.writeIntConfig("wolf", "bossRNG", LootCommand.wolfBosses); - } else if (message.contains("RARE DROP! (Hamster Wheel)")) { - LootCommand.wolfWheelsDrops++; - LootCommand.wolfWheelsDropsSession++; - ConfigHandler.writeIntConfig("wolf", "wheelDrops", LootCommand.wolfWheelsDrops); - } else if (message.contains("VERY RARE DROP! (") && message.contains(" Spirit Rune I)")) { // Removing the unicode here *should* fix rune drops not counting - LootCommand.wolfSpirits++; - LootCommand.wolfSpiritsSession++; - ConfigHandler.writeIntConfig("wolf", "spirit", LootCommand.wolfSpirits); - } else if (message.contains("CRAZY RARE DROP! (Red Claw Egg)")) { - wolfRNG = true; - LootCommand.wolfEggs++; - LootCommand.wolfEggsSession++; - ConfigHandler.writeIntConfig("wolf", "egg", LootCommand.wolfEggs); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_RED + "RED CLAW EGG!", 3); - } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Couture Rune I)")) { - wolfRNG = true; - LootCommand.wolfCoutures++; - LootCommand.wolfCouturesSession++; - ConfigHandler.writeIntConfig("wolf", "couture", LootCommand.wolfCoutures); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "COUTURE RUNE!", 3); - } else if (message.contains("CRAZY RARE DROP! (Grizzly Bait)") || message.contains("CRAZY RARE DROP! (Rename Me)")) { // How did Skyblock devs even manage to make this item Rename Me - wolfRNG = true; - LootCommand.wolfBaits++; - LootCommand.wolfBaitsSession++; - ConfigHandler.writeIntConfig("wolf", "bait", LootCommand.wolfBaits); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "GRIZZLY BAIT!", 3); - } else if (message.contains("CRAZY RARE DROP! (Overflux Capacitor)")) { - wolfRNG = true; - LootCommand.wolfFluxes++; - LootCommand.wolfFluxesSession++; - ConfigHandler.writeIntConfig("wolf", "flux", LootCommand.wolfFluxes); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "OVERFLUX CAPACITOR!", 5); - } else if (message.contains("Talk to Maddox to claim your Spider Slayer XP!")) { // Spider - LootCommand.spiderTarantulas++; - LootCommand.spiderTarantulasSession++; - if (LootCommand.spiderBosses != -1) { - LootCommand.spiderBosses++; - } - if (LootCommand.spiderBossesSession != -1) { - LootCommand.spiderBossesSession++; - } - ConfigHandler.writeIntConfig("spider", "tarantulas", LootCommand.spiderTarantulas); - ConfigHandler.writeIntConfig("spider", "bossRNG", LootCommand.spiderBosses); - } else if (message.contains("RARE DROP! (Toxic Arrow Poison)")) { - LootCommand.spiderTAPDrops++; - LootCommand.spiderTAPDropsSession++; - ConfigHandler.writeIntConfig("spider", "tapDrops", LootCommand.spiderTAPDrops); - } else if (message.contains("VERY RARE DROP! (") && message.contains(" Bite Rune I)")) { - LootCommand.spiderBites++; - LootCommand.spiderBitesSession++; - ConfigHandler.writeIntConfig("spider", "bite", LootCommand.spiderBites); - } else if (message.contains("VERY RARE DROP! (Spider Catalyst)")) { - LootCommand.spiderCatalysts++; - LootCommand.spiderCatalystsSession++; - ConfigHandler.writeIntConfig("spider", "catalyst", LootCommand.spiderCatalysts); - } else if (message.contains("CRAZY RARE DROP! (Fly Swatter)")) { - spiderRNG = true; - LootCommand.spiderSwatters++; - LootCommand.spiderSwattersSession++; - ConfigHandler.writeIntConfig("spider", "swatter", LootCommand.spiderSwatters); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.LIGHT_PURPLE + "FLY SWATTER!", 3); - } else if (message.contains("CRAZY RARE DROP! (Tarantula Talisman")) { - spiderRNG = true; - LootCommand.spiderTalismans++; - LootCommand.spiderTalismansSession++; - ConfigHandler.writeIntConfig("spider", "talisman", LootCommand.spiderTalismans); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "TARANTULA TALISMAN!", 3); - } else if (message.contains("CRAZY RARE DROP! (Digested Mosquito)")) { - spiderRNG = true; - LootCommand.spiderMosquitos++; - LootCommand.spiderMosquitosSession++; - ConfigHandler.writeIntConfig("spider", "mosquito", LootCommand.spiderMosquitos); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "DIGESTED MOSQUITO!", 5); - } else if (message.contains("Talk to Maddox to claim your Zombie Slayer XP!")) { // Zombie - LootCommand.zombieRevs++; - LootCommand.zombieRevsSession++; - if (LootCommand.zombieBosses != -1) { - LootCommand.zombieBosses++; - } - if (LootCommand.zombieBossesSession != 1) { - LootCommand.zombieBossesSession++; - } - ConfigHandler.writeIntConfig("zombie", "revs", LootCommand.zombieRevs); - ConfigHandler.writeIntConfig("zombie", "bossRNG", LootCommand.zombieBosses); - } else if (message.contains("RARE DROP! (Foul Flesh)")) { - LootCommand.zombieFoulFleshDrops++; - LootCommand.zombieFoulFleshDropsSession++; - ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", LootCommand.zombieFoulFleshDrops); - } else if (message.contains("VERY RARE DROP! (Revenant Catalyst)")) { - LootCommand.zombieRevCatas++; - LootCommand.zombieRevCatasSession++; - ConfigHandler.writeIntConfig("zombie", "revCatalyst", LootCommand.zombieRevCatas); - } else if (message.contains("VERY RARE DROP! (") && message.contains(" Pestilence Rune I)")) { - LootCommand.zombiePestilences++; - LootCommand.zombiePestilencesSession++; - ConfigHandler.writeIntConfig("zombie", "pestilence", LootCommand.zombiePestilences); - } else if (message.contains("VERY RARE DROP! (Undead Catalyst)")) { - LootCommand.zombieUndeadCatas++; - LootCommand.zombieUndeadCatasSession++; - ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", LootCommand.zombieUndeadCatas); - } else if (message.contains("CRAZY RARE DROP! (Beheaded Horror)")) { - zombieRNG = true; - LootCommand.zombieBeheadeds++; - LootCommand.zombieBeheadedsSession++; - ConfigHandler.writeIntConfig("zombie", "beheaded", LootCommand.zombieBeheadeds); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3); - } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Snake Rune I)")) { - zombieRNG = true; - LootCommand.zombieSnakes++; - LootCommand.zombieSnakesSession++; - ConfigHandler.writeIntConfig("zombie", "snake", LootCommand.zombieSnakes); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3); - } else if (message.contains("CRAZY RARE DROP! (Scythe Blade)")) { - zombieRNG = true; - LootCommand.zombieScythes++; - LootCommand.zombieScythesSession++; - ConfigHandler.writeIntConfig("zombie", "scythe", LootCommand.zombieScythes); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5); - } else if (message.contains("GOOD CATCH!")) { // Fishing - LootCommand.goodCatches++; - LootCommand.goodCatchesSession++; - ConfigHandler.writeIntConfig("fishing", "goodCatch", LootCommand.goodCatches); - } else if (message.contains("GREAT CATCH!")) { - LootCommand.greatCatches++; - LootCommand.greatCatchesSession++; - ConfigHandler.writeIntConfig("fishing", "greatCatch", LootCommand.greatCatches); - } else if (message.contains("A Squid appeared")) { - LootCommand.squids++; - LootCommand.squidsSession++; - ConfigHandler.writeIntConfig("fishing", "squid", LootCommand.squids); - increaseSeaCreatures(); - } else if (message.contains("You caught a Sea Walker")) { - LootCommand.seaWalkers++; - LootCommand.seaWalkersSession++; - ConfigHandler.writeIntConfig("fishing", "seaWalker", LootCommand.seaWalkers); - increaseSeaCreatures(); - } else if (message.contains("Pitch darkness reveals a Night Squid")) { - LootCommand.nightSquids++; - LootCommand.nightSquidsSession++; - ConfigHandler.writeIntConfig("fishing", "nightSquid", LootCommand.nightSquids); - increaseSeaCreatures(); - } else if (message.contains("You stumbled upon a Sea Guardian")) { - LootCommand.seaGuardians++; - LootCommand.seaGuardiansSession++; - ConfigHandler.writeIntConfig("fishing", "seaGuardian", LootCommand.seaGuardians); - increaseSeaCreatures(); - } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) { - LootCommand.seaWitches++; - LootCommand.seaWitchesSession++; - ConfigHandler.writeIntConfig("fishing", "seaWitch", LootCommand.seaWitches); - increaseSeaCreatures(); - } else if (message.contains("You reeled in a Sea Archer")) { - LootCommand.seaArchers++; - LootCommand.seaArchersSession++; - ConfigHandler.writeIntConfig("fishing", "seaArcher", LootCommand.seaArchers); - increaseSeaCreatures(); - } else if (message.contains("The Monster of the Deep has emerged")) { - LootCommand.monsterOfTheDeeps++; - LootCommand.monsterOfTheDeepsSession++; - ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", LootCommand.monsterOfTheDeeps); - increaseSeaCreatures(); - } else if (message.contains("Huh? A Catfish")) { - LootCommand.catfishes++; - LootCommand.catfishesSession++; - ConfigHandler.writeIntConfig("fishing", "catfish", LootCommand.catfishes); - increaseSeaCreatures(); - } else if (message.contains("Is this even a fish? It's the Carrot King")) { - LootCommand.carrotKings++; - LootCommand.carrotKingsSession++; - ConfigHandler.writeIntConfig("fishing", "carrotKing", LootCommand.carrotKings); - increaseSeaCreatures(); - } else if (message.contains("Gross! A Sea Leech")) { - LootCommand.seaLeeches++; - LootCommand.seaLeechesSession++; - ConfigHandler.writeIntConfig("fishing", "seaLeech", LootCommand.seaLeeches); - increaseSeaCreatures(); - } else if (message.contains("You've discovered a Guardian Defender of the sea")) { - LootCommand.guardianDefenders++; - LootCommand.guardianDefendersSession++; - ConfigHandler.writeIntConfig("fishing", "guardianDefender", LootCommand.guardianDefenders); - increaseSeaCreatures(); - } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) { - LootCommand.deepSeaProtectors++; - LootCommand.deepSeaProtectorsSession++; - ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", LootCommand.deepSeaProtectors); - increaseSeaCreatures(); - } else if (message.contains("The Water Hydra has come to test your strength")) { - LootCommand.hydras++; - LootCommand.hydrasSession++; - ConfigHandler.writeIntConfig("fishing", "hydra", LootCommand.hydras); - increaseSeaCreatures(); - } else if (message.contains("The Sea Emperor arises from the depths")) { - increaseSeaCreatures(); - - LootCommand.seaEmperors++; - LootCommand.empTime = System.currentTimeMillis() / 1000; - LootCommand.empSCs = 0; - LootCommand.seaEmperorsSession++; - LootCommand.empTimeSession = System.currentTimeMillis() / 1000; - LootCommand.empSCsSession = 0; - ConfigHandler.writeIntConfig("fishing", "seaEmperor", LootCommand.seaEmperors); - ConfigHandler.writeDoubleConfig("fishing", "empTime", LootCommand.empTime); - ConfigHandler.writeIntConfig("fishing", "empSC", LootCommand.empSCs); - } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter - LootCommand.frozenSteves++; - LootCommand.frozenStevesSession++; - ConfigHandler.writeIntConfig("fishing", "frozenSteve", LootCommand.frozenSteves); - increaseSeaCreatures(); - } else if (message.contains("It's a snowman! He looks harmless")) { - LootCommand.frostyTheSnowmans++; - LootCommand.frostyTheSnowmansSession++; - ConfigHandler.writeIntConfig("fishing", "snowman", LootCommand.frostyTheSnowmans); - increaseSeaCreatures(); - } else if (message.contains("stole Jerry's Gifts...get them back")) { - LootCommand.grinches++; - LootCommand.grinchesSession++; - ConfigHandler.writeIntConfig("fishing", "grinch", LootCommand.grinches); - increaseSeaCreatures(); - } else if (message.contains("What is this creature")) { - LootCommand.yetis++; - LootCommand.yetiTime = System.currentTimeMillis() / 1000; - LootCommand.yetiSCs = 0; - LootCommand.yetisSession++; - LootCommand.yetiTimeSession = System.currentTimeMillis() / 1000; - LootCommand.yetiSCsSession = 0; - ConfigHandler.writeIntConfig("fishing", "yeti", LootCommand.yetis); - ConfigHandler.writeDoubleConfig("fishing", "yetiTime", LootCommand.yetiTime); - ConfigHandler.writeIntConfig("fishing", "yetiSC", LootCommand.yetiSCs); - increaseSeaCreatures(); - } else if (message.contains("A tiny fin emerges from the water, you've caught a Nurse Shark")) { // Fishing Festival - LootCommand.nurseSharks++; - LootCommand.nurseSharksSession++; - ConfigHandler.writeIntConfig("fishing", "nurseShark", LootCommand.nurseSharks); - increaseSeaCreatures(); - } else if (message.contains("You spot a fin as blue as the water it came from, it's a Blue Shark")) { - LootCommand.blueSharks++; - LootCommand.blueSharksSession++; - ConfigHandler.writeIntConfig("fishing", "blueShark", LootCommand.blueSharks); - increaseSeaCreatures(); - } else if (message.contains("A striped beast bounds from the depths, the wild Tiger Shark")) { - LootCommand.tigerSharks++; - LootCommand.tigerSharksSession++; - ConfigHandler.writeIntConfig("fishing", "tigerShark", LootCommand.tigerSharks); - increaseSeaCreatures(); - } else if (message.contains("Hide no longer, a Great White Shark has tracked your scent and thirsts for your blood")) { - LootCommand.greatWhiteSharks++; - LootCommand.greatWhiteSharksSession++; - ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", LootCommand.greatWhiteSharks); - increaseSeaCreatures(); - } else if (message.contains("Phew! It's only a Scarecrow")) { - LootCommand.scarecrows++; - LootCommand.scarecrowsSession++; - ConfigHandler.writeIntConfig("fishing", "scarecrow", LootCommand.scarecrows); - increaseSeaCreatures(); - } else if (message.contains("You hear trotting from beneath the waves, you caught a Nightmare")) { - LootCommand.nightmares++; - LootCommand.nightmaresSession++; - ConfigHandler.writeIntConfig("fishing", "nightmare", LootCommand.nightmares); - increaseSeaCreatures(); - } else if (message.contains("It must be a full moon, a Werewolf appears")) { - LootCommand.werewolfs++; - LootCommand.werewolfsSession++; - ConfigHandler.writeIntConfig("fishing", "werewolf", LootCommand.werewolfs); - increaseSeaCreatures(); - } else if (message.contains("The spirit of a long lost Phantom Fisher has come to haunt you")) { - LootCommand.phantomFishers++; - LootCommand.phantomFishersSession++; - ConfigHandler.writeIntConfig("fishing", "phantomFisher", LootCommand.phantomFishers); - increaseSeaCreatures(); - } else if (message.contains("This can't be! The manifestation of death himself")) { - LootCommand.grimReapers++; - LootCommand.grimReapersSession++; - ConfigHandler.writeIntConfig("fishing", "grimReaper", LootCommand.grimReapers); - increaseSeaCreatures(); - } else if (message.contains("Dungeon starts in 1 second.")) { // Dungeons Stuff - dungeonStartTime = System.currentTimeMillis() / 1000 + 1; - bloodOpenTime = dungeonStartTime; - watcherClearTime = dungeonStartTime; - bossClearTime = dungeonStartTime; - witherDoors = 0; - dungeonDeaths = 0; - puzzleFails = 0; - } else if (message.contains("The BLOOD DOOR has been opened!")) { - bloodOpenTime = System.currentTimeMillis() / 1000; - } else if (message.contains(" opened a WITHER door!")) { - witherDoors++; - } else if (message.contains(" and became a ghost.")) { - dungeonDeaths++; - } else if (message.contains(" Defeated ") && message.contains(" in ")) { - bossClearTime = System.currentTimeMillis() / 1000; - } else if (message.contains("EXTRA STATS ")) { - List 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")) { - LootCommand.f1TimeSpent = Math.floor(LootCommand.f1TimeSpent + timeToAdd); - LootCommand.f1TimeSpentSession = Math.floor(LootCommand.f1TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", LootCommand.f1TimeSpent); - } else if (sCleaned.contains("F2")) { - LootCommand.f2TimeSpent = Math.floor(LootCommand.f2TimeSpent + timeToAdd); - LootCommand.f2TimeSpentSession = Math.floor(LootCommand.f2TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", LootCommand.f2TimeSpent); - } else if (sCleaned.contains("F3")) { - LootCommand.f3TimeSpent = Math.floor(LootCommand.f3TimeSpent + timeToAdd); - LootCommand.f3TimeSpentSession = Math.floor(LootCommand.f3TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", LootCommand.f3TimeSpent); - } else if (sCleaned.contains("F4")) { - LootCommand.f4TimeSpent = Math.floor(LootCommand.f4TimeSpent + timeToAdd); - LootCommand.f4TimeSpentSession = Math.floor(LootCommand.f4TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", LootCommand.f4TimeSpent); - } else if (sCleaned.contains("F5")) { - LootCommand.f5TimeSpent = Math.floor(LootCommand.f5TimeSpent + timeToAdd); - LootCommand.f5TimeSpentSession = Math.floor(LootCommand.f5TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", LootCommand.f5TimeSpent); - } else if (sCleaned.contains("F6")) { - LootCommand.f6TimeSpent = Math.floor(LootCommand.f6TimeSpent + timeToAdd); - LootCommand.f6TimeSpentSession = Math.floor(LootCommand.f6TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", LootCommand.f6TimeSpent); - } else if (sCleaned.contains("F7")) { - LootCommand.f7TimeSpent = Math.floor(LootCommand.f7TimeSpent + timeToAdd); - LootCommand.f7TimeSpentSession = Math.floor(LootCommand.f7TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", LootCommand.f7TimeSpent); - } - } else 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; - } - } - } - - if (wolfRNG) { - LootCommand.wolfTime = System.currentTimeMillis() / 1000; - LootCommand.wolfBosses = 0; - LootCommand.wolfTimeSession = System.currentTimeMillis() / 1000; - LootCommand.wolfBossesSession = 0; - ConfigHandler.writeDoubleConfig("wolf", "timeRNG", LootCommand.wolfTime); - ConfigHandler.writeIntConfig("wolf", "bossRNG", 0); - } - if (spiderRNG) { - LootCommand.spiderTime = System.currentTimeMillis() / 1000; - LootCommand.spiderBosses = 0; - LootCommand.spiderTimeSession = System.currentTimeMillis() / 1000; - LootCommand.spiderBossesSession = 0; - ConfigHandler.writeDoubleConfig("spider", "timeRNG", LootCommand.spiderTime); - ConfigHandler.writeIntConfig("spider", "bossRNG", 0); - } - if (zombieRNG) { - LootCommand.zombieTime = System.currentTimeMillis() / 1000; - LootCommand.zombieBosses = 0; - LootCommand.zombieTimeSession = System.currentTimeMillis() / 1000; - LootCommand.zombieBossesSession = 0; - ConfigHandler.writeDoubleConfig("zombie", "timeRNG", LootCommand.zombieTime); - ConfigHandler.writeIntConfig("zombie", "bossRNG", 0); - } - - // Mythological Tracker - if (message.contains("You dug out")) { - if (message.contains(" coins!")) { - double coinsEarned = Double.parseDouble(message.replaceAll("[^\\d]", "")); - LootCommand.mythCoins += coinsEarned; - LootCommand.mythCoinsSession += coinsEarned; - ConfigHandler.writeDoubleConfig("mythological", "coins", LootCommand.mythCoins); - } else if (message.contains("a Griffin Feather!")) { - LootCommand.griffinFeathers++; - LootCommand.griffinFeathersSession++; - ConfigHandler.writeIntConfig("mythological", "griffinFeather", LootCommand.griffinFeathers); - } else if (message.contains("a Crown of Greed!")) { - LootCommand.crownOfGreeds++; - LootCommand.crownOfGreedsSession++; - ConfigHandler.writeIntConfig("mythological", "crownOfGreed", LootCommand.crownOfGreeds); - } else if (message.contains("a Washed-up Souvenir!")) { - LootCommand.washedUpSouvenirs++; - LootCommand.washedUpSouvenirsSession++; - ConfigHandler.writeIntConfig("mythological", "washedUpSouvenir", LootCommand.washedUpSouvenirs); - } else if (message.contains("a Minos Hunter!")) { - LootCommand.minosHunters++; - LootCommand.minosHuntersSession++; - ConfigHandler.writeIntConfig("mythological", "minosHunter", LootCommand.minosHunters); - } else if (message.contains("Siamese Lynxes!")) { - LootCommand.siameseLynxes++; - LootCommand.siameseLynxesSession++; - ConfigHandler.writeIntConfig("mythological", "siameseLynx", LootCommand.siameseLynxes); - } else if (message.contains("a Minotaur!")) { - LootCommand.minotaurs++; - LootCommand.minotaursSession++; - ConfigHandler.writeIntConfig("mythological", "minotaur", LootCommand.minotaurs); - } else if (message.contains("a Gaia Construct!")) { - LootCommand.gaiaConstructs++; - LootCommand.gaiaConstructsSession++; - ConfigHandler.writeIntConfig("mythological", "gaiaConstruct", LootCommand.gaiaConstructs); - } else if (message.contains("a Minos Champion!")) { - LootCommand.minosChampions++; - LootCommand.minosChampionsSession++; - ConfigHandler.writeIntConfig("mythological", "minosChampion", LootCommand.minosChampions); - } else if (message.contains("a Minos Inquisitor!")) { - LootCommand.minosInquisitors++; - LootCommand.minosInquisitorsSession++; - ConfigHandler.writeIntConfig("mythological", "minosInquisitor", LootCommand.minosInquisitors); - } - } - - // Dungeons Trackers - if (message.contains(" ")) { - if (message.contains("Recombobulator 3000")) { - LootCommand.recombobulators++; - LootCommand.recombobulatorsSession++; - ConfigHandler.writeIntConfig("catacombs", "recombobulator", LootCommand.recombobulators); - } else if (message.contains("Fuming Potato Book")) { - LootCommand.fumingPotatoBooks++; - LootCommand.fumingPotatoBooksSession++; - ConfigHandler.writeIntConfig("catacombs", "fumingBooks", LootCommand.fumingPotatoBooks); - } else if (message.contains("Bonzo's Staff")) { // F1 - LootCommand.bonzoStaffs++; - LootCommand.bonzoStaffsSession++; - ConfigHandler.writeIntConfig("catacombs", "bonzoStaff", LootCommand.bonzoStaffs); - } else if (message.contains("Scarf's Studies")) { // F2 - LootCommand.scarfStudies++; - LootCommand.scarfStudiesSession++; - ConfigHandler.writeIntConfig("catacombs", "scarfStudies", LootCommand.scarfStudies); - } else if (message.contains("Adaptive Helmet")) { // F3 - LootCommand.adaptiveHelms++; - LootCommand.adaptiveHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveHelm", LootCommand.adaptiveHelms); - } else if (message.contains("Adaptive Chestplate")) { - LootCommand.adaptiveChests++; - LootCommand.adaptiveChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveChest", LootCommand.adaptiveChests); - } else if (message.contains("Adaptive Leggings")) { - LootCommand.adaptiveLegs++; - LootCommand.adaptiveLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveLegging", LootCommand.adaptiveLegs); - } else if (message.contains("Adaptive Boots")) { - LootCommand.adaptiveBoots++; - LootCommand.adaptiveBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveBoot", LootCommand.adaptiveBoots); - } else if (message.contains("Adaptive Blade")) { - LootCommand.adaptiveSwords++; - LootCommand.adaptiveSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveSword", LootCommand.adaptiveSwords); - } else if (message.contains("Spirit Wing")) { // F4 - LootCommand.spiritWings++; - LootCommand.spiritWingsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritWing", LootCommand.spiritWings); - } else if (message.contains("Spirit Bone")) { - LootCommand.spiritBones++; - LootCommand.spiritBonesSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritBone", LootCommand.spiritBones); - } else if (message.contains("Spirit Boots")) { - LootCommand.spiritBoots++; - LootCommand.spiritBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritBoot", LootCommand.spiritBoots); - } else if (message.contains("[Lvl 1] Spirit")) { - String formattedMessage = event.message.getFormattedText(); - // Unicode colour code messes up here, just gonna remove the symbols - if (formattedMessage.contains("5Spirit")) { - LootCommand.epicSpiritPets++; - LootCommand.epicSpiritPetsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritPetEpic", LootCommand.epicSpiritPets); - } else if (formattedMessage.contains("6Spirit")) { - LootCommand.legSpiritPets++; - LootCommand.legSpiritPetsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", LootCommand.legSpiritPets); - } - } else if (message.contains("Spirit Sword")) { - LootCommand.spiritSwords++; - LootCommand.spiritSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritSword", LootCommand.spiritSwords); - } else if (message.contains("Spirit Bow")) { - LootCommand.spiritBows++; - LootCommand.spiritBowsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritBow", LootCommand.spiritBows); - } else if (message.contains("Warped Stone")) { // F5 - LootCommand.warpedStones++; - LootCommand.warpedStonesSession++; - ConfigHandler.writeIntConfig("catacombs", "warpedStone", LootCommand.warpedStones); - } else if (message.contains("Shadow Assassin Helmet")) { - LootCommand.shadowAssHelms++; - LootCommand.shadowAssHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinHelm", LootCommand.shadowAssHelms); - } else if (message.contains("Shadow Assassin Chestplate")) { - LootCommand.shadowAssChests++; - LootCommand.shadowAssChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinChest", LootCommand.shadowAssChests); - } else if (message.contains("Shadow Assassin Leggings")) { - LootCommand.shadowAssLegs++; - LootCommand.shadowAssLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinLegging", LootCommand.shadowAssLegs); - } else if (message.contains("Shadow Assassin Boots")) { - LootCommand.shadowAssBoots++; - LootCommand.shadowAssBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinBoot", LootCommand.shadowAssBoots); - } else if (message.contains("Livid Dagger")) { - LootCommand.lividDaggers++; - LootCommand.lividDaggersSession++; - ConfigHandler.writeIntConfig("catacombs", "lividDagger", LootCommand.lividDaggers); - } else if (message.contains("Shadow Fury")) { - LootCommand.shadowFurys++; - LootCommand.shadowFurysSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowFury", LootCommand.shadowFurys); - } else if (message.contains("Ancient Rose")) { // F6 - LootCommand.ancientRoses++; - LootCommand.ancientRosesSession++; - ConfigHandler.writeIntConfig("catacombs", "ancientRose", LootCommand.ancientRoses); - } else if (message.contains("Precursor Eye")) { - LootCommand.precursorEyes++; - LootCommand.precursorEyesSession++; - ConfigHandler.writeIntConfig("catacombs", "precursorEye", LootCommand.precursorEyes); - } else if (message.contains("Giant's Sword")) { - LootCommand.giantsSwords++; - LootCommand.giantsSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "giantsSword", LootCommand.giantsSwords); - } else if (message.contains("Necromancer Lord Helmet")) { - LootCommand.necroLordHelms++; - LootCommand.necroLordHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordHelm", LootCommand.necroLordHelms); - } else if (message.contains("Necromancer Lord Chestplate")) { - LootCommand.necroLordChests++; - LootCommand.necroLordChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordChest", LootCommand.necroLordChests); - } else if (message.contains("Necromancer Lord Leggings")) { - LootCommand.necroLordLegs++; - LootCommand.necroLordLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordLegging", LootCommand.necroLordLegs); - } else if (message.contains("Necromancer Lord Boots")) { - LootCommand.necroLordBoots++; - LootCommand.necroLordBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordBoot", LootCommand.necroLordBoots); - } else if (message.contains("Necromancer Sword")) { - LootCommand.necroSwords++; - LootCommand.necroSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroSword", LootCommand.necroSwords); - } else if (message.contains("Wither Blood")) { // F7 - LootCommand.witherBloods++; - LootCommand.witherBloodsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherBlood", LootCommand.witherBloods); - } else if (message.contains("Wither Cloak")) { - LootCommand.witherCloaks++; - LootCommand.witherCloaksSession++; - ConfigHandler.writeIntConfig("catacombs", "witherCloak", LootCommand.witherCloaks); - } else if (message.contains("Implosion")) { - LootCommand.implosions++; - LootCommand.implosionsSession++; - ConfigHandler.writeIntConfig("catacombs", "implosion", LootCommand.implosions); - } else if (message.contains("Wither Shield")) { - LootCommand.witherShields++; - LootCommand.witherShieldsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherShield", LootCommand.witherShields); - } else if (message.contains("Shadow Warp")) { - LootCommand.shadowWarps++; - LootCommand.shadowWarpsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowWarp", LootCommand.shadowWarps); - } else if (message.contains("Necron's Handle")) { - LootCommand.necronsHandles++; - LootCommand.necronsHandlesSession++; - ConfigHandler.writeIntConfig("catacombs", "necronsHandle", LootCommand.necronsHandles); - } else if (message.contains("Auto Recombobulator")) { - LootCommand.autoRecombs++; - LootCommand.autoRecombsSession++; - ConfigHandler.writeIntConfig("catacombs", "autoRecomb", LootCommand.autoRecombs); - } else if (message.contains("Wither Helmet")) { - LootCommand.witherHelms++; - LootCommand.witherHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherHelm", LootCommand.witherHelms); - } else if (message.contains("Wither Chestplate")) { - LootCommand.witherChests++; - LootCommand.witherChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherChest", LootCommand.witherChests); - } else if (message.contains("Wither Leggings")) { - LootCommand.witherLegs++; - LootCommand.witherLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherLegging", LootCommand.witherLegs); - } else if (message.contains("Wither Boots")) { - LootCommand.witherBoots++; - LootCommand.witherBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherBoot", LootCommand.witherBoots); - } - } - - // Chat Maddox - if (message.contains("[OPEN MENU]")) { - List listOfSiblings = event.message.getSiblings(); - for (IChatComponent sibling : listOfSiblings) { - if (sibling.getUnformattedText().contains("[OPEN MENU]")) { - lastMaddoxCommand = sibling.getChatStyle().getChatClickEvent().getValue(); - lastMaddoxTime = System.currentTimeMillis() / 1000; - } - } - if (ToggleCommand.chatMaddoxToggled) Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Open chat then click anywhere on-screen to open Maddox")); - } - - // Spirit Bear alerts - if (ToggleCommand.spiritBearAlerts && message.contains("The Spirit Bear has appeared!")) { - Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "SPIRIT BEAR", 2); - } + // Don't set every answer to wrong with this question + if (message.contains("What SkyBlock year is it?")) triviaAnswers = null; + + for (String question : triviaSolutions.keySet()) { + if (message.contains(question)) { + triviaAnswers = triviaSolutions.get(question); + break; + } + } + + // Set wrong answers to red and remove click events + if (triviaAnswers != null && (message.contains("ⓐ") || message.contains("ⓑ") || message.contains("ⓒ"))) { + boolean isSolution = false; + for (String solution : triviaAnswers) { + if (message.contains(solution)) { + isSolution = true; + break; + } + } + if (!isSolution) { + char letter = message.charAt(5); + String option = message.substring(6); + event.message = new ChatComponentText(" " + EnumChatFormatting.GOLD + letter + TRIVIA_WRONG_ANSWER_COLOUR + option); + return; + } + } + } + + if (ToggleCommand.gpartyToggled) { + if (message.contains(" has invited all members of ")) { + try { + final SystemTray tray = SystemTray.getSystemTray(); + final Image image = Toolkit.getDefaultToolkit().createImage("icon.png"); + final TrayIcon trayIcon = new TrayIcon(image, "Guild Party Notifier"); + trayIcon.setImageAutoSize(true); + trayIcon.setToolTip("Guild Party Notifier"); + tray.add(trayIcon); + trayIcon.displayMessage("Guild Party", message, TrayIcon.MessageType.INFO); + tray.remove(trayIcon); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + } + + if (ToggleCommand.golemAlertToggled) { + if (message.contains("The ground begins to shake as an Endstone Protector rises from below!")) { + Utils.createTitle(EnumChatFormatting.RED + "GOLEM SPAWNING!", 3); + } + } + + if (message.contains("Yum! You gain +") && message.contains(" for 48 hours!")) { + cakeTime = System.currentTimeMillis() / 1000 + 172800; // Add 48 hours + ConfigHandler.writeDoubleConfig("misc", "cakeTime", cakeTime); + } + + boolean wolfRNG = false; + boolean spiderRNG = false; + boolean zombieRNG = false; + // T6 books + if (message.contains("VERY RARE DROP! (Enchanted Book)") || message.contains("CRAZY RARE DROP! (Enchanted Book)")) { + // Loop through scoreboard to see what boss you're doing + List scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("Sven Packmaster")) { + LootCommand.wolfBooks++; + ConfigHandler.writeIntConfig("wolf", "book", LootCommand.wolfBooks); + } else if (sCleaned.contains("Tarantula Broodfather")) { + LootCommand.spiderBooks++; + ConfigHandler.writeIntConfig("spider", "book", LootCommand.spiderBooks); + } else if (sCleaned.contains("Revenant Horror")) { + LootCommand.zombieBooks++; + ConfigHandler.writeIntConfig("zombie", "book", LootCommand.zombieBooks); + } + } + } + + // Wolf + if (message.contains("Talk to Maddox to claim your Wolf Slayer XP!")) { + LootCommand.wolfSvens++; + LootCommand.wolfSvensSession++; + if (LootCommand.wolfBosses != -1) { + LootCommand.wolfBosses++; + } + if (LootCommand.wolfBossesSession != -1) { + LootCommand.wolfBossesSession++; + } + ConfigHandler.writeIntConfig("wolf", "svens", LootCommand.wolfSvens); + ConfigHandler.writeIntConfig("wolf", "bossRNG", LootCommand.wolfBosses); + } else if (message.contains("RARE DROP! (Hamster Wheel)")) { + LootCommand.wolfWheelsDrops++; + LootCommand.wolfWheelsDropsSession++; + ConfigHandler.writeIntConfig("wolf", "wheelDrops", LootCommand.wolfWheelsDrops); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Spirit Rune I)")) { // Removing the unicode here *should* fix rune drops not counting + LootCommand.wolfSpirits++; + LootCommand.wolfSpiritsSession++; + ConfigHandler.writeIntConfig("wolf", "spirit", LootCommand.wolfSpirits); + } else if (message.contains("CRAZY RARE DROP! (Red Claw Egg)")) { + wolfRNG = true; + LootCommand.wolfEggs++; + LootCommand.wolfEggsSession++; + ConfigHandler.writeIntConfig("wolf", "egg", LootCommand.wolfEggs); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_RED + "RED CLAW EGG!", 3); + } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Couture Rune I)")) { + wolfRNG = true; + LootCommand.wolfCoutures++; + LootCommand.wolfCouturesSession++; + ConfigHandler.writeIntConfig("wolf", "couture", LootCommand.wolfCoutures); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "COUTURE RUNE!", 3); + } else if (message.contains("CRAZY RARE DROP! (Grizzly Bait)") || message.contains("CRAZY RARE DROP! (Rename Me)")) { // How did Skyblock devs even manage to make this item Rename Me + wolfRNG = true; + LootCommand.wolfBaits++; + LootCommand.wolfBaitsSession++; + ConfigHandler.writeIntConfig("wolf", "bait", LootCommand.wolfBaits); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "GRIZZLY BAIT!", 3); + } else if (message.contains("CRAZY RARE DROP! (Overflux Capacitor)")) { + wolfRNG = true; + LootCommand.wolfFluxes++; + LootCommand.wolfFluxesSession++; + ConfigHandler.writeIntConfig("wolf", "flux", LootCommand.wolfFluxes); + if (ToggleCommand.rngesusAlerts) + Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "OVERFLUX CAPACITOR!", 5); + } else if (message.contains("Talk to Maddox to claim your Spider Slayer XP!")) { // Spider + LootCommand.spiderTarantulas++; + LootCommand.spiderTarantulasSession++; + if (LootCommand.spiderBosses != -1) { + LootCommand.spiderBosses++; + } + if (LootCommand.spiderBossesSession != -1) { + LootCommand.spiderBossesSession++; + } + ConfigHandler.writeIntConfig("spider", "tarantulas", LootCommand.spiderTarantulas); + ConfigHandler.writeIntConfig("spider", "bossRNG", LootCommand.spiderBosses); + } else if (message.contains("RARE DROP! (Toxic Arrow Poison)")) { + LootCommand.spiderTAPDrops++; + LootCommand.spiderTAPDropsSession++; + ConfigHandler.writeIntConfig("spider", "tapDrops", LootCommand.spiderTAPDrops); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Bite Rune I)")) { + LootCommand.spiderBites++; + LootCommand.spiderBitesSession++; + ConfigHandler.writeIntConfig("spider", "bite", LootCommand.spiderBites); + } else if (message.contains("VERY RARE DROP! (Spider Catalyst)")) { + LootCommand.spiderCatalysts++; + LootCommand.spiderCatalystsSession++; + ConfigHandler.writeIntConfig("spider", "catalyst", LootCommand.spiderCatalysts); + } else if (message.contains("CRAZY RARE DROP! (Fly Swatter)")) { + spiderRNG = true; + LootCommand.spiderSwatters++; + LootCommand.spiderSwattersSession++; + ConfigHandler.writeIntConfig("spider", "swatter", LootCommand.spiderSwatters); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.LIGHT_PURPLE + "FLY SWATTER!", 3); + } else if (message.contains("CRAZY RARE DROP! (Tarantula Talisman")) { + spiderRNG = true; + LootCommand.spiderTalismans++; + LootCommand.spiderTalismansSession++; + ConfigHandler.writeIntConfig("spider", "talisman", LootCommand.spiderTalismans); + if (ToggleCommand.rngesusAlerts) + Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "TARANTULA TALISMAN!", 3); + } else if (message.contains("CRAZY RARE DROP! (Digested Mosquito)")) { + spiderRNG = true; + LootCommand.spiderMosquitos++; + LootCommand.spiderMosquitosSession++; + ConfigHandler.writeIntConfig("spider", "mosquito", LootCommand.spiderMosquitos); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "DIGESTED MOSQUITO!", 5); + } else if (message.contains("Talk to Maddox to claim your Zombie Slayer XP!")) { // Zombie + LootCommand.zombieRevs++; + LootCommand.zombieRevsSession++; + if (LootCommand.zombieBosses != -1) { + LootCommand.zombieBosses++; + } + if (LootCommand.zombieBossesSession != 1) { + LootCommand.zombieBossesSession++; + } + ConfigHandler.writeIntConfig("zombie", "revs", LootCommand.zombieRevs); + ConfigHandler.writeIntConfig("zombie", "bossRNG", LootCommand.zombieBosses); + } else if (message.contains("RARE DROP! (Foul Flesh)")) { + LootCommand.zombieFoulFleshDrops++; + LootCommand.zombieFoulFleshDropsSession++; + ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", LootCommand.zombieFoulFleshDrops); + } else if (message.contains("VERY RARE DROP! (Revenant Catalyst)")) { + LootCommand.zombieRevCatas++; + LootCommand.zombieRevCatasSession++; + ConfigHandler.writeIntConfig("zombie", "revCatalyst", LootCommand.zombieRevCatas); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Pestilence Rune I)")) { + LootCommand.zombiePestilences++; + LootCommand.zombiePestilencesSession++; + ConfigHandler.writeIntConfig("zombie", "pestilence", LootCommand.zombiePestilences); + } else if (message.contains("VERY RARE DROP! (Undead Catalyst)")) { + LootCommand.zombieUndeadCatas++; + LootCommand.zombieUndeadCatasSession++; + ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", LootCommand.zombieUndeadCatas); + } else if (message.contains("CRAZY RARE DROP! (Beheaded Horror)")) { + zombieRNG = true; + LootCommand.zombieBeheadeds++; + LootCommand.zombieBeheadedsSession++; + ConfigHandler.writeIntConfig("zombie", "beheaded", LootCommand.zombieBeheadeds); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3); + } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Snake Rune I)")) { + zombieRNG = true; + LootCommand.zombieSnakes++; + LootCommand.zombieSnakesSession++; + ConfigHandler.writeIntConfig("zombie", "snake", LootCommand.zombieSnakes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3); + } else if (message.contains("CRAZY RARE DROP! (Scythe Blade)")) { + zombieRNG = true; + LootCommand.zombieScythes++; + LootCommand.zombieScythesSession++; + ConfigHandler.writeIntConfig("zombie", "scythe", LootCommand.zombieScythes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5); + } else if (message.contains("GOOD CATCH!")) { // Fishing + LootCommand.goodCatches++; + LootCommand.goodCatchesSession++; + ConfigHandler.writeIntConfig("fishing", "goodCatch", LootCommand.goodCatches); + } else if (message.contains("GREAT CATCH!")) { + LootCommand.greatCatches++; + LootCommand.greatCatchesSession++; + ConfigHandler.writeIntConfig("fishing", "greatCatch", LootCommand.greatCatches); + } else if (message.contains("A Squid appeared")) { + LootCommand.squids++; + LootCommand.squidsSession++; + ConfigHandler.writeIntConfig("fishing", "squid", LootCommand.squids); + increaseSeaCreatures(); + } else if (message.contains("You caught a Sea Walker")) { + LootCommand.seaWalkers++; + LootCommand.seaWalkersSession++; + ConfigHandler.writeIntConfig("fishing", "seaWalker", LootCommand.seaWalkers); + increaseSeaCreatures(); + } else if (message.contains("Pitch darkness reveals a Night Squid")) { + LootCommand.nightSquids++; + LootCommand.nightSquidsSession++; + ConfigHandler.writeIntConfig("fishing", "nightSquid", LootCommand.nightSquids); + increaseSeaCreatures(); + } else if (message.contains("You stumbled upon a Sea Guardian")) { + LootCommand.seaGuardians++; + LootCommand.seaGuardiansSession++; + ConfigHandler.writeIntConfig("fishing", "seaGuardian", LootCommand.seaGuardians); + increaseSeaCreatures(); + } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) { + LootCommand.seaWitches++; + LootCommand.seaWitchesSession++; + ConfigHandler.writeIntConfig("fishing", "seaWitch", LootCommand.seaWitches); + increaseSeaCreatures(); + } else if (message.contains("You reeled in a Sea Archer")) { + LootCommand.seaArchers++; + LootCommand.seaArchersSession++; + ConfigHandler.writeIntConfig("fishing", "seaArcher", LootCommand.seaArchers); + increaseSeaCreatures(); + } else if (message.contains("The Monster of the Deep has emerged")) { + LootCommand.monsterOfTheDeeps++; + LootCommand.monsterOfTheDeepsSession++; + ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", LootCommand.monsterOfTheDeeps); + increaseSeaCreatures(); + } else if (message.contains("Huh? A Catfish")) { + LootCommand.catfishes++; + LootCommand.catfishesSession++; + ConfigHandler.writeIntConfig("fishing", "catfish", LootCommand.catfishes); + increaseSeaCreatures(); + } else if (message.contains("Is this even a fish? It's the Carrot King")) { + LootCommand.carrotKings++; + LootCommand.carrotKingsSession++; + ConfigHandler.writeIntConfig("fishing", "carrotKing", LootCommand.carrotKings); + increaseSeaCreatures(); + } else if (message.contains("Gross! A Sea Leech")) { + LootCommand.seaLeeches++; + LootCommand.seaLeechesSession++; + ConfigHandler.writeIntConfig("fishing", "seaLeech", LootCommand.seaLeeches); + increaseSeaCreatures(); + } else if (message.contains("You've discovered a Guardian Defender of the sea")) { + LootCommand.guardianDefenders++; + LootCommand.guardianDefendersSession++; + ConfigHandler.writeIntConfig("fishing", "guardianDefender", LootCommand.guardianDefenders); + increaseSeaCreatures(); + } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) { + LootCommand.deepSeaProtectors++; + LootCommand.deepSeaProtectorsSession++; + ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", LootCommand.deepSeaProtectors); + increaseSeaCreatures(); + } else if (message.contains("The Water Hydra has come to test your strength")) { + LootCommand.hydras++; + LootCommand.hydrasSession++; + ConfigHandler.writeIntConfig("fishing", "hydra", LootCommand.hydras); + increaseSeaCreatures(); + } else if (message.contains("The Sea Emperor arises from the depths")) { + increaseSeaCreatures(); + + LootCommand.seaEmperors++; + LootCommand.empTime = System.currentTimeMillis() / 1000; + LootCommand.empSCs = 0; + LootCommand.seaEmperorsSession++; + LootCommand.empTimeSession = System.currentTimeMillis() / 1000; + LootCommand.empSCsSession = 0; + ConfigHandler.writeIntConfig("fishing", "seaEmperor", LootCommand.seaEmperors); + ConfigHandler.writeDoubleConfig("fishing", "empTime", LootCommand.empTime); + ConfigHandler.writeIntConfig("fishing", "empSC", LootCommand.empSCs); + } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter + LootCommand.frozenSteves++; + LootCommand.frozenStevesSession++; + ConfigHandler.writeIntConfig("fishing", "frozenSteve", LootCommand.frozenSteves); + increaseSeaCreatures(); + } else if (message.contains("It's a snowman! He looks harmless")) { + LootCommand.frostyTheSnowmans++; + LootCommand.frostyTheSnowmansSession++; + ConfigHandler.writeIntConfig("fishing", "snowman", LootCommand.frostyTheSnowmans); + increaseSeaCreatures(); + } else if (message.contains("stole Jerry's Gifts...get them back")) { + LootCommand.grinches++; + LootCommand.grinchesSession++; + ConfigHandler.writeIntConfig("fishing", "grinch", LootCommand.grinches); + increaseSeaCreatures(); + } else if (message.contains("What is this creature")) { + LootCommand.yetis++; + LootCommand.yetiTime = System.currentTimeMillis() / 1000; + LootCommand.yetiSCs = 0; + LootCommand.yetisSession++; + LootCommand.yetiTimeSession = System.currentTimeMillis() / 1000; + LootCommand.yetiSCsSession = 0; + ConfigHandler.writeIntConfig("fishing", "yeti", LootCommand.yetis); + ConfigHandler.writeDoubleConfig("fishing", "yetiTime", LootCommand.yetiTime); + ConfigHandler.writeIntConfig("fishing", "yetiSC", LootCommand.yetiSCs); + increaseSeaCreatures(); + } else if (message.contains("A tiny fin emerges from the water, you've caught a Nurse Shark")) { // Fishing Festival + LootCommand.nurseSharks++; + LootCommand.nurseSharksSession++; + ConfigHandler.writeIntConfig("fishing", "nurseShark", LootCommand.nurseSharks); + increaseSeaCreatures(); + } else if (message.contains("You spot a fin as blue as the water it came from, it's a Blue Shark")) { + LootCommand.blueSharks++; + LootCommand.blueSharksSession++; + ConfigHandler.writeIntConfig("fishing", "blueShark", LootCommand.blueSharks); + increaseSeaCreatures(); + } else if (message.contains("A striped beast bounds from the depths, the wild Tiger Shark")) { + LootCommand.tigerSharks++; + LootCommand.tigerSharksSession++; + ConfigHandler.writeIntConfig("fishing", "tigerShark", LootCommand.tigerSharks); + increaseSeaCreatures(); + } else if (message.contains("Hide no longer, a Great White Shark has tracked your scent and thirsts for your blood")) { + LootCommand.greatWhiteSharks++; + LootCommand.greatWhiteSharksSession++; + ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", LootCommand.greatWhiteSharks); + increaseSeaCreatures(); + } else if (message.contains("Phew! It's only a Scarecrow")) { + LootCommand.scarecrows++; + LootCommand.scarecrowsSession++; + ConfigHandler.writeIntConfig("fishing", "scarecrow", LootCommand.scarecrows); + increaseSeaCreatures(); + } else if (message.contains("You hear trotting from beneath the waves, you caught a Nightmare")) { + LootCommand.nightmares++; + LootCommand.nightmaresSession++; + ConfigHandler.writeIntConfig("fishing", "nightmare", LootCommand.nightmares); + increaseSeaCreatures(); + } else if (message.contains("It must be a full moon, a Werewolf appears")) { + LootCommand.werewolfs++; + LootCommand.werewolfsSession++; + ConfigHandler.writeIntConfig("fishing", "werewolf", LootCommand.werewolfs); + increaseSeaCreatures(); + } else if (message.contains("The spirit of a long lost Phantom Fisher has come to haunt you")) { + LootCommand.phantomFishers++; + LootCommand.phantomFishersSession++; + ConfigHandler.writeIntConfig("fishing", "phantomFisher", LootCommand.phantomFishers); + increaseSeaCreatures(); + } else if (message.contains("This can't be! The manifestation of death himself")) { + LootCommand.grimReapers++; + LootCommand.grimReapersSession++; + ConfigHandler.writeIntConfig("fishing", "grimReaper", LootCommand.grimReapers); + increaseSeaCreatures(); + } else if (message.contains("Dungeon starts in 1 second.")) { // Dungeons Stuff + dungeonStartTime = System.currentTimeMillis() / 1000 + 1; + bloodOpenTime = dungeonStartTime; + watcherClearTime = dungeonStartTime; + bossClearTime = dungeonStartTime; + witherDoors = 0; + dungeonDeaths = 0; + puzzleFails = 0; + } else if (message.contains("The BLOOD DOOR has been opened!")) { + bloodOpenTime = System.currentTimeMillis() / 1000; + } else if (message.contains(" opened a WITHER door!")) { + witherDoors++; + } else if (message.contains(" and became a ghost.")) { + dungeonDeaths++; + } else if (message.contains(" Defeated ") && message.contains(" in ")) { + bossClearTime = System.currentTimeMillis() / 1000; + } else if (message.contains("EXTRA STATS ")) { + List 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")) { + LootCommand.f1TimeSpent = Math.floor(LootCommand.f1TimeSpent + timeToAdd); + LootCommand.f1TimeSpentSession = Math.floor(LootCommand.f1TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", LootCommand.f1TimeSpent); + } else if (sCleaned.contains("F2")) { + LootCommand.f2TimeSpent = Math.floor(LootCommand.f2TimeSpent + timeToAdd); + LootCommand.f2TimeSpentSession = Math.floor(LootCommand.f2TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", LootCommand.f2TimeSpent); + } else if (sCleaned.contains("F3")) { + LootCommand.f3TimeSpent = Math.floor(LootCommand.f3TimeSpent + timeToAdd); + LootCommand.f3TimeSpentSession = Math.floor(LootCommand.f3TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", LootCommand.f3TimeSpent); + } else if (sCleaned.contains("F4")) { + LootCommand.f4TimeSpent = Math.floor(LootCommand.f4TimeSpent + timeToAdd); + LootCommand.f4TimeSpentSession = Math.floor(LootCommand.f4TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", LootCommand.f4TimeSpent); + } else if (sCleaned.contains("F5")) { + LootCommand.f5TimeSpent = Math.floor(LootCommand.f5TimeSpent + timeToAdd); + LootCommand.f5TimeSpentSession = Math.floor(LootCommand.f5TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", LootCommand.f5TimeSpent); + } else if (sCleaned.contains("F6")) { + LootCommand.f6TimeSpent = Math.floor(LootCommand.f6TimeSpent + timeToAdd); + LootCommand.f6TimeSpentSession = Math.floor(LootCommand.f6TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", LootCommand.f6TimeSpent); + } else if (sCleaned.contains("F7")) { + LootCommand.f7TimeSpent = Math.floor(LootCommand.f7TimeSpent + timeToAdd); + LootCommand.f7TimeSpentSession = Math.floor(LootCommand.f7TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", LootCommand.f7TimeSpent); + } + } else 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; + } + } + } + + if (wolfRNG) { + LootCommand.wolfTime = System.currentTimeMillis() / 1000; + LootCommand.wolfBosses = 0; + LootCommand.wolfTimeSession = System.currentTimeMillis() / 1000; + LootCommand.wolfBossesSession = 0; + ConfigHandler.writeDoubleConfig("wolf", "timeRNG", LootCommand.wolfTime); + ConfigHandler.writeIntConfig("wolf", "bossRNG", 0); + } + if (spiderRNG) { + LootCommand.spiderTime = System.currentTimeMillis() / 1000; + LootCommand.spiderBosses = 0; + LootCommand.spiderTimeSession = System.currentTimeMillis() / 1000; + LootCommand.spiderBossesSession = 0; + ConfigHandler.writeDoubleConfig("spider", "timeRNG", LootCommand.spiderTime); + ConfigHandler.writeIntConfig("spider", "bossRNG", 0); + } + if (zombieRNG) { + LootCommand.zombieTime = System.currentTimeMillis() / 1000; + LootCommand.zombieBosses = 0; + LootCommand.zombieTimeSession = System.currentTimeMillis() / 1000; + LootCommand.zombieBossesSession = 0; + ConfigHandler.writeDoubleConfig("zombie", "timeRNG", LootCommand.zombieTime); + ConfigHandler.writeIntConfig("zombie", "bossRNG", 0); + } + + // Mythological Tracker + if (message.contains("You dug out")) { + if (message.contains(" coins!")) { + double coinsEarned = Double.parseDouble(message.replaceAll("[^\\d]", "")); + LootCommand.mythCoins += coinsEarned; + LootCommand.mythCoinsSession += coinsEarned; + ConfigHandler.writeDoubleConfig("mythological", "coins", LootCommand.mythCoins); + } else if (message.contains("a Griffin Feather!")) { + LootCommand.griffinFeathers++; + LootCommand.griffinFeathersSession++; + ConfigHandler.writeIntConfig("mythological", "griffinFeather", LootCommand.griffinFeathers); + } else if (message.contains("a Crown of Greed!")) { + LootCommand.crownOfGreeds++; + LootCommand.crownOfGreedsSession++; + ConfigHandler.writeIntConfig("mythological", "crownOfGreed", LootCommand.crownOfGreeds); + } else if (message.contains("a Washed-up Souvenir!")) { + LootCommand.washedUpSouvenirs++; + LootCommand.washedUpSouvenirsSession++; + ConfigHandler.writeIntConfig("mythological", "washedUpSouvenir", LootCommand.washedUpSouvenirs); + } else if (message.contains("a Minos Hunter!")) { + LootCommand.minosHunters++; + LootCommand.minosHuntersSession++; + ConfigHandler.writeIntConfig("mythological", "minosHunter", LootCommand.minosHunters); + } else if (message.contains("Siamese Lynxes!")) { + LootCommand.siameseLynxes++; + LootCommand.siameseLynxesSession++; + ConfigHandler.writeIntConfig("mythological", "siameseLynx", LootCommand.siameseLynxes); + } else if (message.contains("a Minotaur!")) { + LootCommand.minotaurs++; + LootCommand.minotaursSession++; + ConfigHandler.writeIntConfig("mythological", "minotaur", LootCommand.minotaurs); + } else if (message.contains("a Gaia Construct!")) { + LootCommand.gaiaConstructs++; + LootCommand.gaiaConstructsSession++; + ConfigHandler.writeIntConfig("mythological", "gaiaConstruct", LootCommand.gaiaConstructs); + } else if (message.contains("a Minos Champion!")) { + LootCommand.minosChampions++; + LootCommand.minosChampionsSession++; + ConfigHandler.writeIntConfig("mythological", "minosChampion", LootCommand.minosChampions); + } else if (message.contains("a Minos Inquisitor!")) { + LootCommand.minosInquisitors++; + LootCommand.minosInquisitorsSession++; + ConfigHandler.writeIntConfig("mythological", "minosInquisitor", LootCommand.minosInquisitors); + } + } + + // Dungeons Trackers + if (message.contains(" ")) { + if (message.contains("Recombobulator 3000")) { + LootCommand.recombobulators++; + LootCommand.recombobulatorsSession++; + ConfigHandler.writeIntConfig("catacombs", "recombobulator", LootCommand.recombobulators); + } else if (message.contains("Fuming Potato Book")) { + LootCommand.fumingPotatoBooks++; + LootCommand.fumingPotatoBooksSession++; + ConfigHandler.writeIntConfig("catacombs", "fumingBooks", LootCommand.fumingPotatoBooks); + } else if (message.contains("Bonzo's Staff")) { // F1 + LootCommand.bonzoStaffs++; + LootCommand.bonzoStaffsSession++; + ConfigHandler.writeIntConfig("catacombs", "bonzoStaff", LootCommand.bonzoStaffs); + } else if (message.contains("Scarf's Studies")) { // F2 + LootCommand.scarfStudies++; + LootCommand.scarfStudiesSession++; + ConfigHandler.writeIntConfig("catacombs", "scarfStudies", LootCommand.scarfStudies); + } else if (message.contains("Adaptive Helmet")) { // F3 + LootCommand.adaptiveHelms++; + LootCommand.adaptiveHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveHelm", LootCommand.adaptiveHelms); + } else if (message.contains("Adaptive Chestplate")) { + LootCommand.adaptiveChests++; + LootCommand.adaptiveChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveChest", LootCommand.adaptiveChests); + } else if (message.contains("Adaptive Leggings")) { + LootCommand.adaptiveLegs++; + LootCommand.adaptiveLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveLegging", LootCommand.adaptiveLegs); + } else if (message.contains("Adaptive Boots")) { + LootCommand.adaptiveBoots++; + LootCommand.adaptiveBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveBoot", LootCommand.adaptiveBoots); + } else if (message.contains("Adaptive Blade")) { + LootCommand.adaptiveSwords++; + LootCommand.adaptiveSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveSword", LootCommand.adaptiveSwords); + } else if (message.contains("Spirit Wing")) { // F4 + LootCommand.spiritWings++; + LootCommand.spiritWingsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritWing", LootCommand.spiritWings); + } else if (message.contains("Spirit Bone")) { + LootCommand.spiritBones++; + LootCommand.spiritBonesSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritBone", LootCommand.spiritBones); + } else if (message.contains("Spirit Boots")) { + LootCommand.spiritBoots++; + LootCommand.spiritBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritBoot", LootCommand.spiritBoots); + } else if (message.contains("[Lvl 1] Spirit")) { + String formattedMessage = event.message.getFormattedText(); + // Unicode colour code messes up here, just gonna remove the symbols + if (formattedMessage.contains("5Spirit")) { + LootCommand.epicSpiritPets++; + LootCommand.epicSpiritPetsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritPetEpic", LootCommand.epicSpiritPets); + } else if (formattedMessage.contains("6Spirit")) { + LootCommand.legSpiritPets++; + LootCommand.legSpiritPetsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", LootCommand.legSpiritPets); + } + } else if (message.contains("Spirit Sword")) { + LootCommand.spiritSwords++; + LootCommand.spiritSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritSword", LootCommand.spiritSwords); + } else if (message.contains("Spirit Bow")) { + LootCommand.spiritBows++; + LootCommand.spiritBowsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritBow", LootCommand.spiritBows); + } else if (message.contains("Warped Stone")) { // F5 + LootCommand.warpedStones++; + LootCommand.warpedStonesSession++; + ConfigHandler.writeIntConfig("catacombs", "warpedStone", LootCommand.warpedStones); + } else if (message.contains("Shadow Assassin Helmet")) { + LootCommand.shadowAssHelms++; + LootCommand.shadowAssHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinHelm", LootCommand.shadowAssHelms); + } else if (message.contains("Shadow Assassin Chestplate")) { + LootCommand.shadowAssChests++; + LootCommand.shadowAssChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinChest", LootCommand.shadowAssChests); + } else if (message.contains("Shadow Assassin Leggings")) { + LootCommand.shadowAssLegs++; + LootCommand.shadowAssLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinLegging", LootCommand.shadowAssLegs); + } else if (message.contains("Shadow Assassin Boots")) { + LootCommand.shadowAssBoots++; + LootCommand.shadowAssBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinBoot", LootCommand.shadowAssBoots); + } else if (message.contains("Livid Dagger")) { + LootCommand.lividDaggers++; + LootCommand.lividDaggersSession++; + ConfigHandler.writeIntConfig("catacombs", "lividDagger", LootCommand.lividDaggers); + } else if (message.contains("Shadow Fury")) { + LootCommand.shadowFurys++; + LootCommand.shadowFurysSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowFury", LootCommand.shadowFurys); + } else if (message.contains("Ancient Rose")) { // F6 + LootCommand.ancientRoses++; + LootCommand.ancientRosesSession++; + ConfigHandler.writeIntConfig("catacombs", "ancientRose", LootCommand.ancientRoses); + } else if (message.contains("Precursor Eye")) { + LootCommand.precursorEyes++; + LootCommand.precursorEyesSession++; + ConfigHandler.writeIntConfig("catacombs", "precursorEye", LootCommand.precursorEyes); + } else if (message.contains("Giant's Sword")) { + LootCommand.giantsSwords++; + LootCommand.giantsSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "giantsSword", LootCommand.giantsSwords); + } else if (message.contains("Necromancer Lord Helmet")) { + LootCommand.necroLordHelms++; + LootCommand.necroLordHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordHelm", LootCommand.necroLordHelms); + } else if (message.contains("Necromancer Lord Chestplate")) { + LootCommand.necroLordChests++; + LootCommand.necroLordChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordChest", LootCommand.necroLordChests); + } else if (message.contains("Necromancer Lord Leggings")) { + LootCommand.necroLordLegs++; + LootCommand.necroLordLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordLegging", LootCommand.necroLordLegs); + } else if (message.contains("Necromancer Lord Boots")) { + LootCommand.necroLordBoots++; + LootCommand.necroLordBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordBoot", LootCommand.necroLordBoots); + } else if (message.contains("Necromancer Sword")) { + LootCommand.necroSwords++; + LootCommand.necroSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroSword", LootCommand.necroSwords); + } else if (message.contains("Wither Blood")) { // F7 + LootCommand.witherBloods++; + LootCommand.witherBloodsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherBlood", LootCommand.witherBloods); + } else if (message.contains("Wither Cloak")) { + LootCommand.witherCloaks++; + LootCommand.witherCloaksSession++; + ConfigHandler.writeIntConfig("catacombs", "witherCloak", LootCommand.witherCloaks); + } else if (message.contains("Implosion")) { + LootCommand.implosions++; + LootCommand.implosionsSession++; + ConfigHandler.writeIntConfig("catacombs", "implosion", LootCommand.implosions); + } else if (message.contains("Wither Shield")) { + LootCommand.witherShields++; + LootCommand.witherShieldsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherShield", LootCommand.witherShields); + } else if (message.contains("Shadow Warp")) { + LootCommand.shadowWarps++; + LootCommand.shadowWarpsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowWarp", LootCommand.shadowWarps); + } else if (message.contains("Necron's Handle")) { + LootCommand.necronsHandles++; + LootCommand.necronsHandlesSession++; + ConfigHandler.writeIntConfig("catacombs", "necronsHandle", LootCommand.necronsHandles); + } else if (message.contains("Auto Recombobulator")) { + LootCommand.autoRecombs++; + LootCommand.autoRecombsSession++; + ConfigHandler.writeIntConfig("catacombs", "autoRecomb", LootCommand.autoRecombs); + } else if (message.contains("Wither Helmet")) { + LootCommand.witherHelms++; + LootCommand.witherHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherHelm", LootCommand.witherHelms); + } else if (message.contains("Wither Chestplate")) { + LootCommand.witherChests++; + LootCommand.witherChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherChest", LootCommand.witherChests); + } else if (message.contains("Wither Leggings")) { + LootCommand.witherLegs++; + LootCommand.witherLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherLegging", LootCommand.witherLegs); + } else if (message.contains("Wither Boots")) { + LootCommand.witherBoots++; + LootCommand.witherBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherBoot", LootCommand.witherBoots); + } + } + + // Chat Maddox + if (message.contains("[OPEN MENU]")) { + List listOfSiblings = event.message.getSiblings(); + for (IChatComponent sibling : listOfSiblings) { + if (sibling.getUnformattedText().contains("[OPEN MENU]")) { + lastMaddoxCommand = sibling.getChatStyle().getChatClickEvent().getValue(); + lastMaddoxTime = System.currentTimeMillis() / 1000; + } + } + if (ToggleCommand.chatMaddoxToggled) + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Open chat then click anywhere on-screen to open Maddox")); + } + + // Spirit Bear alerts + if (ToggleCommand.spiritBearAlerts && message.contains("The Spirit Bear has appeared!")) { + Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "SPIRIT BEAR", 2); + } } - + @SubscribeEvent public void renderPlayerInfo(final RenderGameOverlayEvent.Post event) { - if (usingLabymod && !(Minecraft.getMinecraft().ingameGUI instanceof GuiIngameForge)) return; - if (event.type != RenderGameOverlayEvent.ElementType.EXPERIENCE && event.type != RenderGameOverlayEvent.ElementType.JUMPBAR) return; - renderEverything(); + if (usingLabymod && !(Minecraft.getMinecraft().ingameGUI instanceof GuiIngameForge)) return; + if (event.type != RenderGameOverlayEvent.ElementType.EXPERIENCE && event.type != RenderGameOverlayEvent.ElementType.JUMPBAR) + return; + renderEverything(); } - + // LabyMod Support @SubscribeEvent public void renderPlayerInfoLabyMod(final RenderGameOverlayEvent event) { - if (!usingLabymod) return; - if (event.type != null) return; - renderEverything(); + if (!usingLabymod) return; + if (event.type != null) return; + renderEverything(); } - + public void renderEverything() { - if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return; - - Minecraft mc = Minecraft.getMinecraft(); - - if (ToggleCommand.coordsToggled) { - EntityPlayer player = mc.thePlayer; - - double xDir = (player.rotationYaw % 360 + 360) % 360; - if (xDir > 180) xDir -= 360; - xDir = (double) Math.round(xDir * 10d) / 10d; - double yDir = (double) Math.round(player.rotationPitch * 10d) / 10d; - - String coordText = COORDS_COLOUR + (int) player.posX + " / " + (int) player.posY + " / " + (int) player.posZ + " (" + xDir + " / " + yDir + ")"; - new TextRenderer(mc, coordText, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], ScaleCommand.coordsScale); - } - - if (ToggleCommand.dungeonTimerToggled && Utils.inDungeons) { - String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + - EnumChatFormatting.DARK_RED + "Blood Open:\n" + - EnumChatFormatting.RED + "Watcher Clear:\n" + - EnumChatFormatting.BLUE + "Boss Clear:\n" + - EnumChatFormatting.YELLOW + "Deaths:\n" + - EnumChatFormatting.YELLOW + "Puzzle Fails:"; - String dungeonTimers = EnumChatFormatting.GRAY + "" + witherDoors + "\n" + - EnumChatFormatting.DARK_RED + Utils.getTimeBetween(dungeonStartTime, bloodOpenTime) + "\n" + - EnumChatFormatting.RED + Utils.getTimeBetween(dungeonStartTime, watcherClearTime) + "\n" + - EnumChatFormatting.BLUE + Utils.getTimeBetween(dungeonStartTime, bossClearTime) + "\n" + - EnumChatFormatting.YELLOW + dungeonDeaths + "\n" + - EnumChatFormatting.YELLOW + puzzleFails; - new TextRenderer(mc, dungeonTimerText, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); - new TextRenderer(mc, dungeonTimers, (int) (MoveCommand.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); - } - - if (ToggleCommand.lividSolverToggled && foundLivid && livid != null) { - new TextRenderer(mc, livid.getName().replace("" + EnumChatFormatting.BOLD, ""), MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], ScaleCommand.lividHpScale); - } - - if (ToggleCommand.cakeTimerToggled && Utils.inSkyblock) { - double scale = ScaleCommand.cakeTimerScale; - double scaleReset = Math.pow(scale, -1); - GL11.glScaled(scale, scale, scale); - - double timeNow = System.currentTimeMillis() / 1000; - mc.getTextureManager().bindTexture(CAKE_ICON); - Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16); - - String cakeText; - if (cakeTime - timeNow < 0) { - cakeText = EnumChatFormatting.RED + "NONE"; - } else { - cakeText = CAKE_COLOUR + Utils.getTimeBetween(timeNow, cakeTime); - } - new TextRenderer(mc, cakeText, MoveCommand.cakeTimerXY[0] + 20, MoveCommand.cakeTimerXY[1] + 5, 1); - - GL11.glScaled(scaleReset, scaleReset, scaleReset); - } - - if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons) { - - ItemStack helmetSlot = mc.thePlayer.getCurrentArmor(3); - if ((helmetSlot != null && helmetSlot.getDisplayName().contains("Bonzo's Mask")) || nextBonzoUse > 0) { - - double scale = ScaleCommand.bonzoTimerScale; - double scaleReset = Math.pow(scale, -1); - GL11.glScaled(scale, scale, scale); - - double timeNow = System.currentTimeMillis() / 1000; - mc.getTextureManager().bindTexture(BONZO_ICON); - Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); - - String bonzoText; - if (nextBonzoUse - timeNow < 0) { - bonzoText = EnumChatFormatting.GREEN + "READY"; - } else { - bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); - } - new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); - - GL11.glScaled(scaleReset, scaleReset, scaleReset); - } - } - - if (showSkillTracker && Utils.inSkyblock) { - int xpPerHour; - double xpToShow = 0; - switch (lastSkill) { - case "Farming": - xpToShow = farmingXPGained; - break; - case "Mining": - xpToShow = miningXPGained; - break; - case "Combat": - xpToShow = combatXPGained; - break; - case "Foraging": - xpToShow = foragingXPGained; - break; - case "Fishing": - xpToShow = fishingXPGained; - break; - case "Enchanting": - xpToShow = enchantingXPGained; - break; - case "Alchemy": - xpToShow = alchemyXPGained; - break; - default: - System.err.println("Unknown skill in rendering."); - } - xpPerHour = (int) Math.round(xpToShow / ((skillStopwatch.getTime() + 1) / 3600000d)); - String skillTrackerText = SKILL_TRACKER_COLOUR + lastSkill + " XP Earned: " + NumberFormat.getNumberInstance(Locale.US).format(xpToShow) + "\n" + - SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, skillStopwatch.getTime() / 1000d) + "\n" + - SKILL_TRACKER_COLOUR + "XP Per Hour: " + NumberFormat.getIntegerInstance(Locale.US).format(xpPerHour); - if (xpLeft >= 0) { - String time = xpPerHour == 0 ? "Never" : Utils.getTimeBetween(0, xpLeft / (xpPerHour / 3600D)); - skillTrackerText += "\n" + SKILL_TRACKER_COLOUR + "Time Until Next Level: " + time; - } - if (!skillStopwatch.isStarted() || skillStopwatch.isSuspended()) { - skillTrackerText += "\n" + EnumChatFormatting.RED + "PAUSED"; - } - - new TextRenderer(mc, skillTrackerText, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], ScaleCommand.skillTrackerScale); - } - - if (ToggleCommand.waterToggled && Utils.inDungeons && waterAnswers != null) { - new TextRenderer(mc, waterAnswers, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], ScaleCommand.waterAnswerScale); - } - - if (!DisplayCommand.display.equals("off")) { - String dropsText = ""; - String countText = ""; - String dropsTextTwo; - String countTextTwo; - String timeBetween; - String bossesBetween; - String drop20; - double timeNow = System.currentTimeMillis() / 1000; - NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); - - switch (DisplayCommand.display) { - case "wolf": - if (LootCommand.wolfTime == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.wolfTime, timeNow); - } - if (LootCommand.wolfBosses == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.wolfBosses); - } - if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootCommand.wolfWheels); - } else { - drop20 = nf.format(LootCommand.wolfWheelsDrops) + " times"; - } - - dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + - EnumChatFormatting.GREEN + "Wolf Teeth:\n" + - EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + - EnumChatFormatting.WHITE + "Critical VI Books:\n" + - EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + - EnumChatFormatting.GOLD + "Couture Runes:\n" + - EnumChatFormatting.AQUA + "Grizzly Baits:\n" + - EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvens) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeeth) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + - EnumChatFormatting.WHITE + LootCommand.wolfBooks + "\n" + - EnumChatFormatting.DARK_RED + LootCommand.wolfEggs + "\n" + - EnumChatFormatting.GOLD + LootCommand.wolfCoutures + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfBaits + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxes + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "wolf_session": - if (LootCommand.wolfTimeSession == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.wolfTimeSession, timeNow); - } - if (LootCommand.wolfBossesSession == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.wolfBossesSession); - } - if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootCommand.wolfWheelsSession); - } else { - drop20 = nf.format(LootCommand.wolfWheelsDropsSession) + " times"; - } - - dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + - EnumChatFormatting.GREEN + "Wolf Teeth:\n" + - EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + - EnumChatFormatting.WHITE + "Critical VI Books:\n" + - EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + - EnumChatFormatting.GOLD + "Couture Runes:\n" + - EnumChatFormatting.AQUA + "Grizzly Baits:\n" + - EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvensSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeethSession) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + - EnumChatFormatting.WHITE + LootCommand.wolfBooksSession + "\n" + - EnumChatFormatting.DARK_RED + LootCommand.wolfEggsSession + "\n" + - EnumChatFormatting.GOLD + LootCommand.wolfCouturesSession + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfBaitsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxesSession + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "spider": - if (LootCommand.spiderTime == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.spiderTime, timeNow); - } - if (LootCommand.spiderBosses == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.spiderBosses); - } - if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootCommand.spiderTAP); - } else { - drop20 = nf.format(LootCommand.spiderTAPDrops) + " times"; - } - - dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + - EnumChatFormatting.GREEN + "Tarantula Webs:\n" + - EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + - EnumChatFormatting.WHITE + "Bane VI Books:\n" + - EnumChatFormatting.AQUA + "Spider Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + - EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulas) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebs) + "\n" + - EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + - EnumChatFormatting.WHITE + LootCommand.spiderBooks + "\n" + - EnumChatFormatting.AQUA + LootCommand.spiderCatalysts + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismans + "\n" + - EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwatters + "\n" + - EnumChatFormatting.GOLD + LootCommand.spiderMosquitos + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "spider_session": - if (LootCommand.spiderTimeSession == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.spiderTimeSession, timeNow); - } - if (LootCommand.spiderBossesSession == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.spiderBossesSession); - } - if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootCommand.spiderTAPSession); - } else { - drop20 = nf.format(LootCommand.spiderTAPDropsSession) + " times"; - } - - dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + - EnumChatFormatting.GREEN + "Tarantula Webs:\n" + - EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + - EnumChatFormatting.WHITE + "Bane VI Books:\n" + - EnumChatFormatting.AQUA + "Spider Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + - EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulasSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebsSession) + "\n" + - EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + - EnumChatFormatting.WHITE + LootCommand.spiderBooksSession + "\n" + - EnumChatFormatting.AQUA + LootCommand.spiderCatalystsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismansSession + "\n" + - EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwattersSession + "\n" + - EnumChatFormatting.GOLD + LootCommand.spiderMosquitosSession + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "zombie": - if (LootCommand.zombieTime == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.zombieTime, timeNow); - } - if (LootCommand.zombieBosses == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.zombieBosses); - } - if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootCommand.zombieFoulFlesh); - } else { - drop20 = nf.format(LootCommand.zombieFoulFleshDrops) + " times"; - } - - dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + - EnumChatFormatting.GREEN + "Revenant Flesh:\n" + - EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + - EnumChatFormatting.WHITE + "Smite VI Books:\n" + - EnumChatFormatting.AQUA + "Undead Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + - EnumChatFormatting.RED + "Revenant Catalysts:\n" + - EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + - EnumChatFormatting.GOLD + "Scythe Blades:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevs) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFlesh) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + - EnumChatFormatting.WHITE + LootCommand.zombieBooks + "\n" + - EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatas + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadeds + "\n" + - EnumChatFormatting.RED + LootCommand.zombieRevCatas + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakes + "\n" + - EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "zombie_session": - if (LootCommand.zombieTimeSession == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.zombieTimeSession, timeNow); - } - if (LootCommand.zombieBossesSession == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.zombieBossesSession); - } - if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootCommand.zombieFoulFleshSession); - } else { - drop20 = nf.format(LootCommand.zombieFoulFleshDropsSession) + " times"; - } - - dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + - EnumChatFormatting.GREEN + "Revenant Flesh:\n" + - EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + - EnumChatFormatting.WHITE + "Smite VI Books:\n" + - EnumChatFormatting.AQUA + "Undead Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + - EnumChatFormatting.RED + "Revenant Catalysts:\n" + - EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + - EnumChatFormatting.GOLD + "Scythe Blades:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevsSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFleshSession) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + - EnumChatFormatting.WHITE + LootCommand.zombieBooksSession + "\n" + - EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatasSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadedsSession + "\n" + - EnumChatFormatting.RED + LootCommand.zombieRevCatasSession + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakesSession + "\n" + - EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "fishing": - if (LootCommand.empTime == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.empTime, timeNow); - } - if (LootCommand.empSCs == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.empSCs); - } - - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.GRAY + "Squids:\n" + - EnumChatFormatting.GREEN + "Sea Walkers:\n" + - EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + - EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + - EnumChatFormatting.BLUE + "Sea Witches:\n" + - EnumChatFormatting.GREEN + "Sea Archers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.squids) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkers) + "\n" + - EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquids) + "\n" + - EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardians) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitches) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchers); - // Seperated to save vertical space - dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + - EnumChatFormatting.YELLOW + "Catfishes:\n" + - EnumChatFormatting.GOLD + "Carrot Kings:\n" + - EnumChatFormatting.GRAY + "Sea Leeches:\n" + - EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + - EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + - EnumChatFormatting.GOLD + "Hydras:\n" + - EnumChatFormatting.GOLD + "Sea Emperors:\n" + - EnumChatFormatting.AQUA + "Time Since Emp:\n" + - EnumChatFormatting.AQUA + "Creatures Since Emp:"; - countTextTwo = EnumChatFormatting.GREEN + nf.format(LootCommand.monsterOfTheDeeps) + "\n" + - EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishes) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKings) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeeches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefenders) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectors) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.hydras) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperors) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - - if (ToggleCommand.splitFishing) { - new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); - new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); - } else { - dropsText += "\n" + dropsTextTwo; - countText += "\n" + countTextTwo; - } - break; - case "fishing_session": - if (LootCommand.empTimeSession == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.empTimeSession, timeNow); - } - if (LootCommand.empSCsSession == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.empSCsSession); - } - - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.GRAY + "Squids:\n" + - EnumChatFormatting.GREEN + "Sea Walkers:\n" + - EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + - EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + - EnumChatFormatting.BLUE + "Sea Witches:\n" + - EnumChatFormatting.GREEN + "Sea Archers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.squidsSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkersSession) + "\n" + - EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquidsSession) + "\n" + - EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardiansSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitchesSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchersSession); - // Seperated to save vertical space - dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + - EnumChatFormatting.YELLOW + "Catfishes:\n" + - EnumChatFormatting.GOLD + "Carrot Kings:\n" + - EnumChatFormatting.GRAY + "Sea Leeches:\n" + - EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + - EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + - EnumChatFormatting.GOLD + "Hydras:\n" + - EnumChatFormatting.GOLD + "Sea Emperors:\n" + - EnumChatFormatting.AQUA + "Time Since Emp:\n" + - EnumChatFormatting.AQUA + "Creatures Since Emp:"; - countTextTwo = EnumChatFormatting.GREEN + nf.format(LootCommand.monsterOfTheDeepsSession) + "\n" + - EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKingsSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeechesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefendersSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectorsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.hydrasSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperorsSession) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - - if (ToggleCommand.splitFishing) { - new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); - new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); - } else { - dropsText += "\n" + dropsTextTwo; - countText += "\n" + countTextTwo; - } - break; - case "fishing_winter": - if (LootCommand.yetiTime == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.yetiTime, timeNow); - } - if (LootCommand.yetiSCs == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.yetiSCs); - } - - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.AQUA + "Frozen Steves:\n" + - EnumChatFormatting.WHITE + "Snowmans:\n" + - EnumChatFormatting.DARK_GREEN + "Grinches:\n" + - EnumChatFormatting.GOLD + "Yetis:\n" + - EnumChatFormatting.AQUA + "Time Since Yeti:\n" + - EnumChatFormatting.AQUA + "Creatures Since Yeti:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.frozenSteves) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmans) + "\n" + - EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinches) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.yetis) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "fishing_winter_session": - if (LootCommand.yetiTimeSession == -1) { - timeBetween = "Never"; - } else { - timeBetween = Utils.getTimeBetween(LootCommand.yetiTimeSession, timeNow); - } - if (LootCommand.yetiSCsSession == -1) { - bossesBetween = "Never"; - } else { - bossesBetween = nf.format(LootCommand.yetiSCsSession); - } - - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.AQUA + "Frozen Steves:\n" + - EnumChatFormatting.WHITE + "Snowmans:\n" + - EnumChatFormatting.DARK_GREEN + "Grinches:\n" + - EnumChatFormatting.GOLD + "Yetis:\n" + - EnumChatFormatting.AQUA + "Time Since Yeti:\n" + - EnumChatFormatting.AQUA + "Creatures Since Yeti:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.frozenStevesSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmansSession) + "\n" + - EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinchesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.yetisSession) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; - break; - case "fishing_festival": - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + - EnumChatFormatting.BLUE + "Blue Sharks:\n" + - EnumChatFormatting.GOLD + "Tiger Sharks:\n" + - EnumChatFormatting.WHITE + "Great White Sharks:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharks) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharks) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharks); - break; - case "fishing_festival_session": - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + - EnumChatFormatting.BLUE + "Blue Sharks:\n" + - EnumChatFormatting.GOLD + "Tiger Sharks:\n" + - EnumChatFormatting.WHITE + "Great White Sharks:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharksSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharksSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharksSession); - break; - case "fishing_spooky": - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.BLUE + "Scarecrows:\n" + - EnumChatFormatting.GRAY + "Nightmares:\n" + - EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + - EnumChatFormatting.GOLD + "Phantom Fishers:\n" + - EnumChatFormatting.GOLD + "Grim Reapers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrows) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.nightmares) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapers); - break; - case "fishing_spooky_session": - dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.BLUE + "Scarecrows:\n" + - EnumChatFormatting.GRAY + "Nightmares:\n" + - EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + - EnumChatFormatting.GOLD + "Phantom Fishers:\n" + - EnumChatFormatting.GOLD + "Grim Reapers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrowsSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.nightmaresSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapersSession); - break; - case "mythological": - dropsText = EnumChatFormatting.GOLD + "Coins:\n" + - EnumChatFormatting.WHITE + "Griffin Feathers:\n" + - EnumChatFormatting.GOLD + "Crown of Greeds:\n" + - EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + - EnumChatFormatting.RED + "Minos Hunters:\n" + - EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + - EnumChatFormatting.RED + "Minotaurs:\n" + - EnumChatFormatting.WHITE + "Gaia Constructs:\n" + - EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + - EnumChatFormatting.GOLD + "Minos Inquisitors:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.mythCoins) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreeds) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirs) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minosHunters) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxes) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minotaurs) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampions) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitors); - break; - case "mythological_session": - dropsText = EnumChatFormatting.GOLD + "Coins:\n" + - EnumChatFormatting.WHITE + "Griffin Feathers:\n" + - EnumChatFormatting.GOLD + "Crown of Greeds:\n" + - EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + - EnumChatFormatting.RED + "Minos Hunters:\n" + - EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + - EnumChatFormatting.RED + "Minotaurs:\n" + - EnumChatFormatting.WHITE + "Gaia Constructs:\n" + - EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + - EnumChatFormatting.GOLD + "Minos Inquisitors:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.mythCoinsSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreedsSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirsSession) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minosHuntersSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxesSession) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minotaursSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampionsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitorsSession); - break; - case "catacombs_floor_one": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffs) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpent); - break; - case "catacombs_floor_one_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpentSession); - break; - case "catacombs_floor_two": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Scarf's Studies:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudies) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwords) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpent); - break; - case "catacombs_floor_two_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Scarf's Studies:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudiesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwordsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpentSession); - break; - case "catacombs_floor_three": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBoots) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpent); - break; - case "catacombs_floor_three_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBootsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpentSession); - break; - case "catacombs_floor_four": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + - EnumChatFormatting.GOLD + "Spirit Bows:\n" + - EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + - EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWings) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBones) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBoots) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwords) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBows) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPets) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPets) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpent); - break; - case "catacombs_floor_four_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + - EnumChatFormatting.GOLD + "Spirit Bows:\n" + - EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + - EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWingsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBootsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwordsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBowsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPetsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPetsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpentSession); - break; - case "catacombs_floor_five": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Warped Stones:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + - EnumChatFormatting.GOLD + "Last Breaths:\n" + - EnumChatFormatting.GOLD + "Livid Daggers:\n" + - EnumChatFormatting.GOLD + "Shadow Furys:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStones) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBoots) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreaths) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurys) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpent); - break; - case "catacombs_floor_five_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Warped Stones:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + - EnumChatFormatting.GOLD + "Last Breaths:\n" + - EnumChatFormatting.GOLD + "Livid Daggers:\n" + - EnumChatFormatting.GOLD + "Shadow Furys:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBootsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreathsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurysSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpentSession); - break; - case "catacombs_floor_six": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Ancient Roses:\n" + - EnumChatFormatting.GOLD + "Precursor Eyes:\n" + - EnumChatFormatting.GOLD + "Giant's Swords:\n" + - EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + - EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + - EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + - EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + - EnumChatFormatting.GOLD + "Necro Swords:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRoses) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyes) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwords) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelms) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChests) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBoots) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwords) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpent); - break; - case "catacombs_floor_six_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Ancient Roses:\n" + - EnumChatFormatting.GOLD + "Precursor Eyes:\n" + - EnumChatFormatting.GOLD + "Giant's Swords:\n" + - EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + - EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + - EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + - EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + - EnumChatFormatting.GOLD + "Necro Swords:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRosesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwordsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelmsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChestsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBootsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwordsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpentSession); - break; - case "catacombs_floor_seven": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + - EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + - EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + - EnumChatFormatting.GOLD + "Auto Recombobs:\n" + - EnumChatFormatting.GOLD + "Wither Helmets:\n" + - EnumChatFormatting.GOLD + "Wither Chests:\n" + - EnumChatFormatting.GOLD + "Wither Leggings:\n" + - EnumChatFormatting.GOLD + "Wither Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloods) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosions) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShields) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarps) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandles) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelms) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherChests) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherBoots) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpent); - break; - case "catacombs_floor_seven_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + - EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + - EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + - EnumChatFormatting.GOLD + "Auto Recombobulators:\n" + - EnumChatFormatting.GOLD + "Wither Helmets:\n" + - EnumChatFormatting.GOLD + "Wither Chests:\n" + - EnumChatFormatting.GOLD + "Wither Leggings:\n" + - EnumChatFormatting.GOLD + "Wither Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloodsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosionsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShieldsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarpsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandlesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelmsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherChestsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherBootsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpentSession); - break; - default: - System.out.println("Display was an unknown value, turning off."); - DisplayCommand.display = "off"; - ConfigHandler.writeStringConfig("misc", "display", "off"); - } - new TextRenderer(mc, dropsText, MoveCommand.displayXY[0], MoveCommand.displayXY[1], ScaleCommand.displayScale); - new TextRenderer(mc, countText, (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); - } - - if (showTitle) { - Utils.drawTitle(titleText); - } - if (showSkill) { - new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale); - } + if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return; + + Minecraft mc = Minecraft.getMinecraft(); + + if (ToggleCommand.coordsToggled) { + EntityPlayer player = mc.thePlayer; + + double xDir = (player.rotationYaw % 360 + 360) % 360; + if (xDir > 180) xDir -= 360; + xDir = (double) Math.round(xDir * 10d) / 10d; + double yDir = (double) Math.round(player.rotationPitch * 10d) / 10d; + + String coordText = COORDS_COLOUR + (int) player.posX + " / " + (int) player.posY + " / " + (int) player.posZ + " (" + xDir + " / " + yDir + ")"; + new TextRenderer(mc, coordText, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], ScaleCommand.coordsScale); + } + + if (ToggleCommand.dungeonTimerToggled && Utils.inDungeons) { + String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + + EnumChatFormatting.DARK_RED + "Blood Open:\n" + + EnumChatFormatting.RED + "Watcher Clear:\n" + + EnumChatFormatting.BLUE + "Boss Clear:\n" + + EnumChatFormatting.YELLOW + "Deaths:\n" + + EnumChatFormatting.YELLOW + "Puzzle Fails:"; + String dungeonTimers = EnumChatFormatting.GRAY + "" + witherDoors + "\n" + + EnumChatFormatting.DARK_RED + Utils.getTimeBetween(dungeonStartTime, bloodOpenTime) + "\n" + + EnumChatFormatting.RED + Utils.getTimeBetween(dungeonStartTime, watcherClearTime) + "\n" + + EnumChatFormatting.BLUE + Utils.getTimeBetween(dungeonStartTime, bossClearTime) + "\n" + + EnumChatFormatting.YELLOW + dungeonDeaths + "\n" + + EnumChatFormatting.YELLOW + puzzleFails; + new TextRenderer(mc, dungeonTimerText, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); + new TextRenderer(mc, dungeonTimers, (int) (MoveCommand.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); + } + + if (ToggleCommand.lividSolverToggled && foundLivid && livid != null) { + new TextRenderer(mc, livid.getName().replace("" + EnumChatFormatting.BOLD, ""), MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], ScaleCommand.lividHpScale); + } + + if (ToggleCommand.cakeTimerToggled && Utils.inSkyblock) { + double scale = ScaleCommand.cakeTimerScale; + double scaleReset = Math.pow(scale, -1); + GL11.glScaled(scale, scale, scale); + + double timeNow = System.currentTimeMillis() / 1000; + mc.getTextureManager().bindTexture(CAKE_ICON); + Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16); + + String cakeText; + if (cakeTime - timeNow < 0) { + cakeText = EnumChatFormatting.RED + "NONE"; + } else { + cakeText = CAKE_COLOUR + Utils.getTimeBetween(timeNow, cakeTime); + } + new TextRenderer(mc, cakeText, MoveCommand.cakeTimerXY[0] + 20, MoveCommand.cakeTimerXY[1] + 5, 1); + + GL11.glScaled(scaleReset, scaleReset, scaleReset); + } + + if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons) { + + ItemStack helmetSlot = mc.thePlayer.getCurrentArmor(3); + if ((helmetSlot != null && helmetSlot.getDisplayName().contains("Bonzo's Mask")) || nextBonzoUse > 0) { + + double scale = ScaleCommand.bonzoTimerScale; + double scaleReset = Math.pow(scale, -1); + GL11.glScaled(scale, scale, scale); + + double timeNow = System.currentTimeMillis() / 1000; + mc.getTextureManager().bindTexture(BONZO_ICON); + Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); + + String bonzoText; + if (nextBonzoUse - timeNow < 0) { + bonzoText = EnumChatFormatting.GREEN + "READY"; + } else { + bonzoText = BONZO_COLOR + Utils.getTimeBetween(timeNow, nextBonzoUse); + } + new TextRenderer(mc, bonzoText, MoveCommand.bonzoTimerXY[0] + 20, MoveCommand.bonzoTimerXY[1] + 5, 1); + + GL11.glScaled(scaleReset, scaleReset, scaleReset); + } + } + + if (showSkillTracker && Utils.inSkyblock) { + int xpPerHour; + double xpToShow = 0; + switch (lastSkill) { + case "Farming": + xpToShow = farmingXPGained; + break; + case "Mining": + xpToShow = miningXPGained; + break; + case "Combat": + xpToShow = combatXPGained; + break; + case "Foraging": + xpToShow = foragingXPGained; + break; + case "Fishing": + xpToShow = fishingXPGained; + break; + case "Enchanting": + xpToShow = enchantingXPGained; + break; + case "Alchemy": + xpToShow = alchemyXPGained; + break; + default: + System.err.println("Unknown skill in rendering."); + } + xpPerHour = (int) Math.round(xpToShow / ((skillStopwatch.getTime() + 1) / 3600000d)); + String skillTrackerText = SKILL_TRACKER_COLOUR + lastSkill + " XP Earned: " + NumberFormat.getNumberInstance(Locale.US).format(xpToShow) + "\n" + + SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, skillStopwatch.getTime() / 1000d) + "\n" + + SKILL_TRACKER_COLOUR + "XP Per Hour: " + NumberFormat.getIntegerInstance(Locale.US).format(xpPerHour); + if (xpLeft >= 0) { + String time = xpPerHour == 0 ? "Never" : Utils.getTimeBetween(0, xpLeft / (xpPerHour / 3600D)); + skillTrackerText += "\n" + SKILL_TRACKER_COLOUR + "Time Until Next Level: " + time; + } + if (!skillStopwatch.isStarted() || skillStopwatch.isSuspended()) { + skillTrackerText += "\n" + EnumChatFormatting.RED + "PAUSED"; + } + + new TextRenderer(mc, skillTrackerText, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], ScaleCommand.skillTrackerScale); + } + + if (ToggleCommand.waterToggled && Utils.inDungeons && waterAnswers != null) { + new TextRenderer(mc, waterAnswers, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], ScaleCommand.waterAnswerScale); + } + + if (!DisplayCommand.display.equals("off")) { + String dropsText = ""; + String countText = ""; + String dropsTextTwo; + String countTextTwo; + String timeBetween; + String bossesBetween; + String drop20; + double timeNow = System.currentTimeMillis() / 1000; + NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); + + switch (DisplayCommand.display) { + case "wolf": + if (LootCommand.wolfTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.wolfTime, timeNow); + } + if (LootCommand.wolfBosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.wolfBosses); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootCommand.wolfWheels); + } else { + drop20 = nf.format(LootCommand.wolfWheelsDrops) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.WHITE + "Critical VI Books:\n" + + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + + EnumChatFormatting.GOLD + "Couture Runes:\n" + + EnumChatFormatting.AQUA + "Grizzly Baits:\n" + + EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvens) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeeth) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + + EnumChatFormatting.WHITE + LootCommand.wolfBooks + "\n" + + EnumChatFormatting.DARK_RED + LootCommand.wolfEggs + "\n" + + EnumChatFormatting.GOLD + LootCommand.wolfCoutures + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfBaits + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxes + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "wolf_session": + if (LootCommand.wolfTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.wolfTimeSession, timeNow); + } + if (LootCommand.wolfBossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.wolfBossesSession); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootCommand.wolfWheelsSession); + } else { + drop20 = nf.format(LootCommand.wolfWheelsDropsSession) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.WHITE + "Critical VI Books:\n" + + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + + EnumChatFormatting.GOLD + "Couture Runes:\n" + + EnumChatFormatting.AQUA + "Grizzly Baits:\n" + + EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvensSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeethSession) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + + EnumChatFormatting.WHITE + LootCommand.wolfBooksSession + "\n" + + EnumChatFormatting.DARK_RED + LootCommand.wolfEggsSession + "\n" + + EnumChatFormatting.GOLD + LootCommand.wolfCouturesSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfBaitsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxesSession + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "spider": + if (LootCommand.spiderTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.spiderTime, timeNow); + } + if (LootCommand.spiderBosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.spiderBosses); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootCommand.spiderTAP); + } else { + drop20 = nf.format(LootCommand.spiderTAPDrops) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.WHITE + "Bane VI Books:\n" + + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + + EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulas) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebs) + "\n" + + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + + EnumChatFormatting.WHITE + LootCommand.spiderBooks + "\n" + + EnumChatFormatting.AQUA + LootCommand.spiderCatalysts + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismans + "\n" + + EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwatters + "\n" + + EnumChatFormatting.GOLD + LootCommand.spiderMosquitos + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "spider_session": + if (LootCommand.spiderTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.spiderTimeSession, timeNow); + } + if (LootCommand.spiderBossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.spiderBossesSession); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootCommand.spiderTAPSession); + } else { + drop20 = nf.format(LootCommand.spiderTAPDropsSession) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.WHITE + "Bane VI Books:\n" + + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + + EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulasSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebsSession) + "\n" + + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + + EnumChatFormatting.WHITE + LootCommand.spiderBooksSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.spiderCatalystsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismansSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwattersSession + "\n" + + EnumChatFormatting.GOLD + LootCommand.spiderMosquitosSession + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "zombie": + if (LootCommand.zombieTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.zombieTime, timeNow); + } + if (LootCommand.zombieBosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.zombieBosses); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootCommand.zombieFoulFlesh); + } else { + drop20 = nf.format(LootCommand.zombieFoulFleshDrops) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + + EnumChatFormatting.BLUE + "Foul Flesh:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.WHITE + "Smite VI Books:\n" + + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + + EnumChatFormatting.RED + "Revenant Catalysts:\n" + + EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + + EnumChatFormatting.GOLD + "Scythe Blades:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevs) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFlesh) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + + EnumChatFormatting.WHITE + LootCommand.zombieBooks + "\n" + + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatas + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadeds + "\n" + + EnumChatFormatting.RED + LootCommand.zombieRevCatas + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakes + "\n" + + EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "zombie_session": + if (LootCommand.zombieTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.zombieTimeSession, timeNow); + } + if (LootCommand.zombieBossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.zombieBossesSession); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootCommand.zombieFoulFleshSession); + } else { + drop20 = nf.format(LootCommand.zombieFoulFleshDropsSession) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + + EnumChatFormatting.BLUE + "Foul Flesh:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.WHITE + "Smite VI Books:\n" + + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + + EnumChatFormatting.RED + "Revenant Catalysts:\n" + + EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + + EnumChatFormatting.GOLD + "Scythe Blades:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevsSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFleshSession) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + + EnumChatFormatting.WHITE + LootCommand.zombieBooksSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatasSession + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadedsSession + "\n" + + EnumChatFormatting.RED + LootCommand.zombieRevCatasSession + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakesSession + "\n" + + EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "fishing": + if (LootCommand.empTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.empTime, timeNow); + } + if (LootCommand.empSCs == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.empSCs); + } + + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.GRAY + "Squids:\n" + + EnumChatFormatting.GREEN + "Sea Walkers:\n" + + EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + + EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + + EnumChatFormatting.BLUE + "Sea Witches:\n" + + EnumChatFormatting.GREEN + "Sea Archers:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.squids) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkers) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquids) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardians) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitches) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchers); + // Seperated to save vertical space + dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + + EnumChatFormatting.YELLOW + "Catfishes:\n" + + EnumChatFormatting.GOLD + "Carrot Kings:\n" + + EnumChatFormatting.GRAY + "Sea Leeches:\n" + + EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + + EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + + EnumChatFormatting.GOLD + "Hydras:\n" + + EnumChatFormatting.GOLD + "Sea Emperors:\n" + + EnumChatFormatting.AQUA + "Time Since Emp:\n" + + EnumChatFormatting.AQUA + "Creatures Since Emp:"; + countTextTwo = EnumChatFormatting.GREEN + nf.format(LootCommand.monsterOfTheDeeps) + "\n" + + EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishes) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKings) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeeches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefenders) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectors) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.hydras) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperors) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + + if (ToggleCommand.splitFishing) { + new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); + new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); + } else { + dropsText += "\n" + dropsTextTwo; + countText += "\n" + countTextTwo; + } + break; + case "fishing_session": + if (LootCommand.empTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.empTimeSession, timeNow); + } + if (LootCommand.empSCsSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.empSCsSession); + } + + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.GRAY + "Squids:\n" + + EnumChatFormatting.GREEN + "Sea Walkers:\n" + + EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + + EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + + EnumChatFormatting.BLUE + "Sea Witches:\n" + + EnumChatFormatting.GREEN + "Sea Archers:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.squidsSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkersSession) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquidsSession) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardiansSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitchesSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchersSession); + // Seperated to save vertical space + dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + + EnumChatFormatting.YELLOW + "Catfishes:\n" + + EnumChatFormatting.GOLD + "Carrot Kings:\n" + + EnumChatFormatting.GRAY + "Sea Leeches:\n" + + EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + + EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + + EnumChatFormatting.GOLD + "Hydras:\n" + + EnumChatFormatting.GOLD + "Sea Emperors:\n" + + EnumChatFormatting.AQUA + "Time Since Emp:\n" + + EnumChatFormatting.AQUA + "Creatures Since Emp:"; + countTextTwo = EnumChatFormatting.GREEN + nf.format(LootCommand.monsterOfTheDeepsSession) + "\n" + + EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKingsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeechesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefendersSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectorsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.hydrasSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperorsSession) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + + if (ToggleCommand.splitFishing) { + new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); + new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); + } else { + dropsText += "\n" + dropsTextTwo; + countText += "\n" + countTextTwo; + } + break; + case "fishing_winter": + if (LootCommand.yetiTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.yetiTime, timeNow); + } + if (LootCommand.yetiSCs == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.yetiSCs); + } + + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.AQUA + "Frozen Steves:\n" + + EnumChatFormatting.WHITE + "Snowmans:\n" + + EnumChatFormatting.DARK_GREEN + "Grinches:\n" + + EnumChatFormatting.GOLD + "Yetis:\n" + + EnumChatFormatting.AQUA + "Time Since Yeti:\n" + + EnumChatFormatting.AQUA + "Creatures Since Yeti:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.frozenSteves) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmans) + "\n" + + EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinches) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.yetis) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "fishing_winter_session": + if (LootCommand.yetiTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootCommand.yetiTimeSession, timeNow); + } + if (LootCommand.yetiSCsSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootCommand.yetiSCsSession); + } + + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.AQUA + "Frozen Steves:\n" + + EnumChatFormatting.WHITE + "Snowmans:\n" + + EnumChatFormatting.DARK_GREEN + "Grinches:\n" + + EnumChatFormatting.GOLD + "Yetis:\n" + + EnumChatFormatting.AQUA + "Time Since Yeti:\n" + + EnumChatFormatting.AQUA + "Creatures Since Yeti:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.frozenStevesSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmansSession) + "\n" + + EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinchesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.yetisSession) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "fishing_festival": + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + + EnumChatFormatting.BLUE + "Blue Sharks:\n" + + EnumChatFormatting.GOLD + "Tiger Sharks:\n" + + EnumChatFormatting.WHITE + "Great White Sharks:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharks) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharks) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharks); + break; + case "fishing_festival_session": + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + + EnumChatFormatting.BLUE + "Blue Sharks:\n" + + EnumChatFormatting.GOLD + "Tiger Sharks:\n" + + EnumChatFormatting.WHITE + "Great White Sharks:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharksSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharksSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharksSession); + break; + case "fishing_spooky": + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Scarecrows:\n" + + EnumChatFormatting.GRAY + "Nightmares:\n" + + EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + + EnumChatFormatting.GOLD + "Grim Reapers:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrows) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.nightmares) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishers) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapers); + break; + case "fishing_spooky_session": + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Scarecrows:\n" + + EnumChatFormatting.GRAY + "Nightmares:\n" + + EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + + EnumChatFormatting.GOLD + "Grim Reapers:"; + countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrowsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.nightmaresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapersSession); + break; + case "mythological": + dropsText = EnumChatFormatting.GOLD + "Coins:\n" + + EnumChatFormatting.WHITE + "Griffin Feathers:\n" + + EnumChatFormatting.GOLD + "Crown of Greeds:\n" + + EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + + EnumChatFormatting.RED + "Minos Hunters:\n" + + EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + + EnumChatFormatting.RED + "Minotaurs:\n" + + EnumChatFormatting.WHITE + "Gaia Constructs:\n" + + EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + + EnumChatFormatting.GOLD + "Minos Inquisitors:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.mythCoins) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathers) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreeds) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirs) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minosHunters) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxes) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minotaurs) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampions) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitors); + break; + case "mythological_session": + dropsText = EnumChatFormatting.GOLD + "Coins:\n" + + EnumChatFormatting.WHITE + "Griffin Feathers:\n" + + EnumChatFormatting.GOLD + "Crown of Greeds:\n" + + EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + + EnumChatFormatting.RED + "Minos Hunters:\n" + + EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + + EnumChatFormatting.RED + "Minotaurs:\n" + + EnumChatFormatting.WHITE + "Gaia Constructs:\n" + + EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + + EnumChatFormatting.GOLD + "Minos Inquisitors:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.mythCoinsSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreedsSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirsSession) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minosHuntersSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxesSession) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minotaursSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampionsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitorsSession); + break; + case "catacombs_floor_one": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffs) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpent); + break; + case "catacombs_floor_one_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpentSession); + break; + case "catacombs_floor_two": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Scarf's Studies:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudies) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwords) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpent); + break; + case "catacombs_floor_two_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Scarf's Studies:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudiesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwordsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpentSession); + break; + case "catacombs_floor_three": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBoots) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpent); + break; + case "catacombs_floor_three_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBootsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpentSession); + break; + case "catacombs_floor_four": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + + EnumChatFormatting.GOLD + "Spirit Bows:\n" + + EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + + EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWings) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBones) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBoots) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwords) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBows) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPets) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPets) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpent); + break; + case "catacombs_floor_four_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + + EnumChatFormatting.GOLD + "Spirit Bows:\n" + + EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + + EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWingsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwordsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBowsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPetsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPetsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpentSession); + break; + case "catacombs_floor_five": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Warped Stones:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + + EnumChatFormatting.GOLD + "Last Breaths:\n" + + EnumChatFormatting.GOLD + "Livid Daggers:\n" + + EnumChatFormatting.GOLD + "Shadow Furys:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStones) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBoots) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreaths) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggers) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurys) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpent); + break; + case "catacombs_floor_five_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Warped Stones:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + + EnumChatFormatting.GOLD + "Last Breaths:\n" + + EnumChatFormatting.GOLD + "Livid Daggers:\n" + + EnumChatFormatting.GOLD + "Shadow Furys:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBootsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreathsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurysSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpentSession); + break; + case "catacombs_floor_six": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Ancient Roses:\n" + + EnumChatFormatting.GOLD + "Precursor Eyes:\n" + + EnumChatFormatting.GOLD + "Giant's Swords:\n" + + EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + + EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + + EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + + EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + + EnumChatFormatting.GOLD + "Necro Swords:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRoses) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyes) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwords) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelms) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChests) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBoots) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwords) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpent); + break; + case "catacombs_floor_six_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Ancient Roses:\n" + + EnumChatFormatting.GOLD + "Precursor Eyes:\n" + + EnumChatFormatting.GOLD + "Giant's Swords:\n" + + EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + + EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + + EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + + EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + + EnumChatFormatting.GOLD + "Necro Swords:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRosesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwordsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelmsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChestsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBootsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwordsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpentSession); + break; + case "catacombs_floor_seven": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + + EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + + EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + + EnumChatFormatting.GOLD + "Auto Recombobs:\n" + + EnumChatFormatting.GOLD + "Wither Helmets:\n" + + EnumChatFormatting.GOLD + "Wither Chests:\n" + + EnumChatFormatting.GOLD + "Wither Leggings:\n" + + EnumChatFormatting.GOLD + "Wither Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloods) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosions) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShields) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarps) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandles) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelms) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherChests) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherBoots) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpent); + break; + case "catacombs_floor_seven_session": + dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + + EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + + EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + + EnumChatFormatting.GOLD + "Auto Recombobulators:\n" + + EnumChatFormatting.GOLD + "Wither Helmets:\n" + + EnumChatFormatting.GOLD + "Wither Chests:\n" + + EnumChatFormatting.GOLD + "Wither Leggings:\n" + + EnumChatFormatting.GOLD + "Wither Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloodsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosionsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShieldsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarpsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandlesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelmsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherChestsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherBootsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpentSession); + break; + default: + System.out.println("Display was an unknown value, turning off."); + DisplayCommand.display = "off"; + ConfigHandler.writeStringConfig("misc", "display", "off"); + } + new TextRenderer(mc, dropsText, MoveCommand.displayXY[0], MoveCommand.displayXY[1], ScaleCommand.displayScale); + new TextRenderer(mc, countText, (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); + } + + if (showTitle) { + Utils.drawTitle(titleText); + } + if (showSkill) { + new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale); + } } - + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSound(final PlaySoundEvent event) { - if (!Utils.inSkyblock) return; - if (event.name.equals("note.pling")) { - // Don't check twice within 3 seconds - checkItemsNow = System.currentTimeMillis() / 1000; - if (checkItemsNow - itemsChecked < 3) return; - - List scoreboard = ScoreboardHandler.getSidebarLines(); - - for (String line : scoreboard) { - String cleanedLine = ScoreboardHandler.cleanSB(line); - // If Hypixel lags and scoreboard doesn't update - if (cleanedLine.contains("Boss slain!") || cleanedLine.contains("Slay the boss!")) { - int itemTeeth = Utils.getItems("Wolf Tooth"); - int itemWheels = Utils.getItems("Hamster Wheel"); - int itemWebs = Utils.getItems("Tarantula Web"); - int itemTAP = Utils.getItems("Toxic Arrow Poison"); - int itemRev = Utils.getItems("Revenant Flesh"); - int itemFoul = Utils.getItems("Foul Flesh"); - - // If no items, are detected, allow check again. Should fix items not being found - if (itemTeeth + itemWheels + itemWebs + itemTAP + itemRev + itemFoul > 0) { - itemsChecked = System.currentTimeMillis() / 1000; - LootCommand.wolfTeeth += itemTeeth; - LootCommand.wolfWheels += itemWheels; - LootCommand.spiderWebs += itemWebs; - LootCommand.spiderTAP += itemTAP; - LootCommand.zombieRevFlesh += itemRev; - LootCommand.zombieFoulFlesh += itemFoul; - LootCommand.wolfTeethSession += itemTeeth; - LootCommand.wolfWheelsSession += itemWheels; - LootCommand.spiderWebsSession += itemWebs; - LootCommand.spiderTAPSession += itemTAP; - LootCommand.zombieRevFleshSession += itemRev; - LootCommand.zombieFoulFleshSession += itemFoul; - - ConfigHandler.writeIntConfig("wolf", "teeth", LootCommand.wolfTeeth); - ConfigHandler.writeIntConfig("wolf", "wheel", LootCommand.wolfWheels); - ConfigHandler.writeIntConfig("spider", "web", LootCommand.spiderWebs); - ConfigHandler.writeIntConfig("spider", "tap", LootCommand.spiderTAP); - ConfigHandler.writeIntConfig("zombie", "revFlesh", LootCommand.zombieRevFlesh); - ConfigHandler.writeIntConfig("zombie", "foulFlesh", LootCommand.zombieFoulFlesh); - } - } - } - } + if (!Utils.inSkyblock) return; + if (event.name.equals("note.pling")) { + // Don't check twice within 3 seconds + checkItemsNow = System.currentTimeMillis() / 1000; + if (checkItemsNow - itemsChecked < 3) return; + + List scoreboard = ScoreboardHandler.getSidebarLines(); + + for (String line : scoreboard) { + String cleanedLine = ScoreboardHandler.cleanSB(line); + // If Hypixel lags and scoreboard doesn't update + if (cleanedLine.contains("Boss slain!") || cleanedLine.contains("Slay the boss!")) { + int itemTeeth = Utils.getItems("Wolf Tooth"); + int itemWheels = Utils.getItems("Hamster Wheel"); + int itemWebs = Utils.getItems("Tarantula Web"); + int itemTAP = Utils.getItems("Toxic Arrow Poison"); + int itemRev = Utils.getItems("Revenant Flesh"); + int itemFoul = Utils.getItems("Foul Flesh"); + + // If no items, are detected, allow check again. Should fix items not being found + if (itemTeeth + itemWheels + itemWebs + itemTAP + itemRev + itemFoul > 0) { + itemsChecked = System.currentTimeMillis() / 1000; + LootCommand.wolfTeeth += itemTeeth; + LootCommand.wolfWheels += itemWheels; + LootCommand.spiderWebs += itemWebs; + LootCommand.spiderTAP += itemTAP; + LootCommand.zombieRevFlesh += itemRev; + LootCommand.zombieFoulFlesh += itemFoul; + LootCommand.wolfTeethSession += itemTeeth; + LootCommand.wolfWheelsSession += itemWheels; + LootCommand.spiderWebsSession += itemWebs; + LootCommand.spiderTAPSession += itemTAP; + LootCommand.zombieRevFleshSession += itemRev; + LootCommand.zombieFoulFleshSession += itemFoul; + + ConfigHandler.writeIntConfig("wolf", "teeth", LootCommand.wolfTeeth); + ConfigHandler.writeIntConfig("wolf", "wheel", LootCommand.wolfWheels); + ConfigHandler.writeIntConfig("spider", "web", LootCommand.spiderWebs); + ConfigHandler.writeIntConfig("spider", "tap", LootCommand.spiderTAP); + ConfigHandler.writeIntConfig("zombie", "revFlesh", LootCommand.zombieRevFlesh); + ConfigHandler.writeIntConfig("zombie", "foulFlesh", LootCommand.zombieFoulFlesh); + } + } + } + } } - + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onTooltip(ItemTooltipEvent event) { - if (!Utils.inSkyblock) return; - if (event.toolTip == null) return; - - ItemStack item = event.itemStack; - Minecraft mc = Minecraft.getMinecraft(); - EntityPlayerSP player = mc.thePlayer; - - if (ToggleCommand.goldenToggled) { - for (int i = 0; i < event.toolTip.size(); i++) { - event.toolTip.set(i, Utils.returnGoldenEnchants(event.toolTip.get(i))); - } - } - - if (ToggleCommand.expertiseLoreToggled) { - if (item.hasTagCompound()) { - NBTTagCompound tags = item.getSubCompound("ExtraAttributes", false); - if (tags != null) { - if (tags.hasKey("expertise_kills")) { - int index = 4; - if (!Minecraft.getMinecraft().gameSettings.advancedItemTooltips) index -= 2; - - event.toolTip.add(event.toolTip.size() - index, ""); - event.toolTip.add(event.toolTip.size() - index, "Expertise Kills: " + EnumChatFormatting.RED + tags.getInteger("expertise_kills")); - if (Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) != -1) { - event.toolTip.add(event.toolTip.size() - index, Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) + " kills to tier up!"); - } - } - } - } - } - - if (mc.currentScreen instanceof GuiChest) { - ContainerChest chest = (ContainerChest) player.openContainer; - IInventory inv = chest.getLowerChestInventory(); - String chestName = inv.getDisplayName().getUnformattedText(); - - if (ToggleCommand.superpairsToggled && chestName.contains("Superpairs (")) { - if (Item.getIdFromItem(item.getItem()) != 95) return; - if (item.getDisplayName().contains("Click any button") || item.getDisplayName().contains("Click a second button") || item.getDisplayName().contains("Next button is instantly rewarded") || item.getDisplayName().contains("Stained Glass")) { - Slot slot = ((GuiChest) mc.currentScreen).getSlotUnderMouse(); - ItemStack itemStack = experimentTableSlots[slot.getSlotIndex()]; - if (itemStack == null) return; - String itemName = itemStack.getDisplayName(); - - if (event.toolTip.stream().anyMatch(x->StringUtils.stripControlCodes(x).equals(StringUtils.stripControlCodes(itemName)))) return; - event.toolTip.removeIf(x -> { - x = StringUtils.stripControlCodes(x); - if (x.equals("minecraft:stained_glass")) return true; - return x.startsWith("NBT: "); - }); - event.toolTip.add(itemName); - event.toolTip.add(itemStack.getItem().getRegistryName()); - } - - } - } + if (!Utils.inSkyblock) return; + if (event.toolTip == null) return; + + ItemStack item = event.itemStack; + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + + if (ToggleCommand.goldenToggled) { + for (int i = 0; i < event.toolTip.size(); i++) { + event.toolTip.set(i, Utils.returnGoldenEnchants(event.toolTip.get(i))); + } + } + + if (ToggleCommand.expertiseLoreToggled) { + if (item.hasTagCompound()) { + NBTTagCompound tags = item.getSubCompound("ExtraAttributes", false); + if (tags != null) { + if (tags.hasKey("expertise_kills")) { + int index = 4; + if (!Minecraft.getMinecraft().gameSettings.advancedItemTooltips) index -= 2; + + event.toolTip.add(event.toolTip.size() - index, ""); + event.toolTip.add(event.toolTip.size() - index, "Expertise Kills: " + EnumChatFormatting.RED + tags.getInteger("expertise_kills")); + if (Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) != -1) { + event.toolTip.add(event.toolTip.size() - index, Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) + " kills to tier up!"); + } + } + } + } + } + + if (mc.currentScreen instanceof GuiChest) { + ContainerChest chest = (ContainerChest) player.openContainer; + IInventory inv = chest.getLowerChestInventory(); + String chestName = inv.getDisplayName().getUnformattedText(); + + if (ToggleCommand.superpairsToggled && chestName.contains("Superpairs (")) { + if (Item.getIdFromItem(item.getItem()) != 95) return; + if (item.getDisplayName().contains("Click any button") || item.getDisplayName().contains("Click a second button") || item.getDisplayName().contains("Next button is instantly rewarded") || item.getDisplayName().contains("Stained Glass")) { + Slot slot = ((GuiChest) mc.currentScreen).getSlotUnderMouse(); + ItemStack itemStack = experimentTableSlots[slot.getSlotIndex()]; + if (itemStack == null) return; + String itemName = itemStack.getDisplayName(); + + if (event.toolTip.stream().anyMatch(x -> StringUtils.stripControlCodes(x).equals(StringUtils.stripControlCodes(itemName)))) + return; + event.toolTip.removeIf(x -> { + x = StringUtils.stripControlCodes(x); + if (x.equals("minecraft:stained_glass")) return true; + return x.startsWith("NBT: "); + }); + event.toolTip.add(itemName); + event.toolTip.add(itemStack.getItem().getRegistryName()); + } + + } + } } @SubscribeEvent(priority = EventPriority.LOW) - public void onTooltipLow(ItemTooltipEvent event) { - if (!Utils.inSkyblock) return; - if (event.toolTip == null) return; + public void onTooltipLow(ItemTooltipEvent event) { + if (!Utils.inSkyblock) return; + if (event.toolTip == null) return; - Minecraft mc = Minecraft.getMinecraft(); - EntityPlayerSP player = mc.thePlayer; + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; - if (mc.currentScreen instanceof GuiChest) { - ContainerChest chest = (ContainerChest) player.openContainer; - IInventory inv = chest.getLowerChestInventory(); - String chestName = inv.getDisplayName().getUnformattedText(); + if (mc.currentScreen instanceof GuiChest) { + ContainerChest chest = (ContainerChest) player.openContainer; + IInventory inv = chest.getLowerChestInventory(); + String chestName = inv.getDisplayName().getUnformattedText(); - if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { - event.toolTip.clear(); - } + if (ToggleCommand.hideTooltipsInExperimentAddonsToggled && (chestName.startsWith("Ultrasequencer (") || chestName.startsWith("Chronomatron ("))) { + event.toolTip.clear(); + } - if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { - event.toolTip.clear(); - } + if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { + event.toolTip.clear(); + } - } - } + } + } @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - if (event.phase != Phase.START) return; - - Minecraft mc = Minecraft.getMinecraft(); - World world = mc.theWorld; - EntityPlayerSP player = mc.thePlayer; - - // Checks every second - tickAmount++; - if (tickAmount % 20 == 0) { - if (player != null) { - Utils.checkForSkyblock(); - Utils.checkForDungeons(); - } - - if (DisplayCommand.auto && world != null && player != null) { - List scoreboard = ScoreboardHandler.getSidebarLines(); - boolean found = false; - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("Sven Packmaster")) { - DisplayCommand.display = "wolf"; - found = true; - } else if (sCleaned.contains("Tarantula Broodfather")) { - DisplayCommand.display = "spider"; - found = true; - } else if (sCleaned.contains("Revenant Horror")) { - DisplayCommand.display = "zombie"; - found = true; - } else if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - DisplayCommand.display = "catacombs_floor_one"; - } else if (sCleaned.contains("F2")) { - DisplayCommand.display = "catacombs_floor_two"; - } else if (sCleaned.contains("F3")) { - DisplayCommand.display = "catacombs_floor_three"; - } else if (sCleaned.contains("F4")) { - DisplayCommand.display = "catacombs_floor_four"; - } else if (sCleaned.contains("F5")) { - DisplayCommand.display = "catacombs_floor_five"; - } else if (sCleaned.contains("F6")) { - DisplayCommand.display = "catacombs_floor_six"; - } else if (sCleaned.contains("F7")) { - DisplayCommand.display = "catacombs_floor_seven"; - } - found = true; - } - } - for (int i = 0; i < 8; i++) { - ItemStack hotbarItem = player.inventory.getStackInSlot(i); - if (hotbarItem == null) continue; - if (hotbarItem.getDisplayName().contains("Ancestral Spade")) { - DisplayCommand.display = "mythological"; - found = true; - } - } - if (!found) DisplayCommand.display = "off"; - ConfigHandler.writeStringConfig("misc", "display", DisplayCommand.display); - } - - if (ToggleCommand.creeperToggled && Utils.inDungeons && world != null && player != null) { - double x = player.posX; - double y = player.posY; - double z = player.posZ; - // Find creepers nearby - AxisAlignedBB creeperScan = new AxisAlignedBB(x - 14, y - 8, z - 13, x + 14, y + 8, z + 13); // 28x16x26 cube - List creepers = world.getEntitiesWithinAABB(EntityCreeper.class, creeperScan); - // Check if creeper is nearby - if (creepers.size() > 0 && !creepers.get(0).isInvisible()) { // Don't show Wither Cloak creepers - EntityCreeper creeper = creepers.get(0); - // Start creeper line drawings - creeperLines.clear(); - if (!drawCreeperLines) creeperLocation = new Vec3(creeper.posX, creeper.posY + 1, creeper.posZ); - drawCreeperLines = true; - // Search for nearby sea lanterns and prismarine blocks - BlockPos point1 = new BlockPos(creeper.posX - 14, creeper.posY - 7, creeper.posZ - 13); - BlockPos point2 = new BlockPos(creeper.posX + 14, creeper.posY + 10, creeper.posZ + 13); - Iterable blocks = BlockPos.getAllInBox(point1, point2); - for (BlockPos blockPos : blocks) { - Block block = world.getBlockState(blockPos).getBlock(); - if (block == Blocks.sea_lantern || block == Blocks.prismarine) { - // Connect block to nearest block on opposite side - Vec3 startBlock = new Vec3(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5); - BlockPos oppositeBlock = Utils.getFirstBlockPosAfterVectors(mc, startBlock, creeperLocation, 10, 20); - BlockPos endBlock = Utils.getNearbyBlock(mc, oppositeBlock, Blocks.sea_lantern, Blocks.prismarine); - if (endBlock != null && startBlock.yCoord > 68 && endBlock.getY() > 68) { // Don't create line underground - // Add to list for drawing - Vec3[] insertArray = {startBlock, new Vec3(endBlock.getX() + 0.5, endBlock.getY() + 0.5, endBlock.getZ() + 0.5)}; - creeperLines.add(insertArray); - } - } - } - } else { - drawCreeperLines = false; - } - } - - if (ToggleCommand.waterToggled && Utils.inDungeons && world != null && player != null) { - // multi thread block checking - new Thread(() -> { - prevInWaterRoom = inWaterRoom; - inWaterRoom = false; - boolean foundPiston = false; - boolean done = false; - for (int x = (int) (player.posX - 13); x <= player.posX + 13; x++) { - for (int z = (int) (player.posZ - 13); z <= player.posZ + 13; z++) { - BlockPos blockPos = new BlockPos(x, 54, z); - if (world.getBlockState(blockPos).getBlock() == Blocks.sticky_piston) { - foundPiston = true; - break; - } - } - if (foundPiston) break; - } - - if (foundPiston) { - for (int x = (int) (player.posX - 25); x <= player.posX + 25; x++) { - for (int z = (int) (player.posZ - 25); z <= player.posZ + 25; z++) { - BlockPos blockPos = new BlockPos(x, 82, z); - if (world.getBlockState(blockPos).getBlock() == Blocks.piston_head) { - inWaterRoom = true; - if (!prevInWaterRoom) { - boolean foundGold = false; - boolean foundClay = false; - boolean foundEmerald = false; - boolean foundQuartz = false; - boolean foundDiamond = false; - - // Detect first blocks near water stream - BlockPos scan1 = new BlockPos(x + 1, 78, z + 1); - BlockPos scan2 = new BlockPos(x - 1, 77, z - 1); - Iterable blocks = BlockPos.getAllInBox(scan1, scan2); - for (BlockPos puzzleBlockPos : blocks) { - Block block = world.getBlockState(puzzleBlockPos).getBlock(); - if (block == Blocks.gold_block) { - foundGold = true; - } else if (block == Blocks.hardened_clay) { - foundClay = true; - } else if (block == Blocks.emerald_block) { - foundEmerald = true; - } else if (block == Blocks.quartz_block) { - foundQuartz = true; - } else if (block == Blocks.diamond_block) { - foundDiamond = true; - } - } - - int variant = 0; - if (foundGold && foundClay) { - variant = 1; - } else if (foundEmerald && foundQuartz) { - variant = 2; - } else if (foundQuartz && foundDiamond) { - variant = 3; - } else if (foundGold && foundQuartz) { - variant = 4; - } - - // Return solution - String purple; - String orange; - String blue; - String green; - String red; - switch (variant) { - case 1: - purple = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.RED + "Clay"; - orange = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald"; - blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; - green = EnumChatFormatting.GREEN + "Emerald"; - red = EnumChatFormatting.GRAY + "None"; - break; - case 2: - purple = EnumChatFormatting.DARK_GRAY + "Coal"; - orange = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; - blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.GREEN + "Emerald"; - green = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.GREEN + "Emerald"; - red = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald"; - break; - case 3: - purple = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond"; - orange = EnumChatFormatting.GREEN + "Emerald"; - blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.AQUA + "Diamond"; - green = EnumChatFormatting.GRAY + "None"; - red = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald"; - break; - case 4: - purple = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; - orange = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal"; - blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; - green = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald"; - red = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; - break; - default: - purple = orange = blue = green = red = ERROR_COLOUR + "Error detecting water puzzle variant."; - break; - } - waterAnswers = MAIN_COLOUR + "The following levers must be down:\n" + - EnumChatFormatting.DARK_PURPLE + "Purple: " + purple + "\n" + - EnumChatFormatting.GOLD + "Orange: " + orange + "\n" + - EnumChatFormatting.BLUE + "Blue: " + blue + "\n" + - EnumChatFormatting.GREEN + "Green: " + green + "\n" + - EnumChatFormatting.RED + "Red: " + red; - done = true; - break; - } - } - } - if (done) break; - } - } else { - waterAnswers = null; - } - }).start(); - } - - if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && world != null) { - boolean inF5 = false; - - List scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (F5)")) { - inF5 = true; - break; - } - } - - if (inF5) { - List loadedLivids = new ArrayList<>(); - List entities = world.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; - } - } - } - - if (ToggleCommand.ticTacToeToggled && Utils.inDungeons && world != null && player != null) { - correctTicTacToeButton = null; - AxisAlignedBB aabb = new AxisAlignedBB(player.posX - 6, player.posY - 6, player.posZ - 6, player.posX + 6, player.posY + 6, player.posZ + 6); - List itemFrames = world.getEntitiesWithinAABB(EntityItemFrame.class, aabb); - List itemFramesWithMaps = new ArrayList<>(); - // Find how many item frames have maps already placed - for (EntityItemFrame itemFrame : itemFrames) { - ItemStack item = itemFrame.getDisplayedItem(); - if (item == null || !(item.getItem() instanceof ItemMap)) continue; - MapData mapData = ((ItemMap) item.getItem()).getMapData(item, world); - if (mapData == null) continue; - - itemFramesWithMaps.add(itemFrame); - } - - // Only run when it's your turn - if (itemFramesWithMaps.size() != 9 && itemFramesWithMaps.size() % 2 == 1) { - char[][] board = new char[3][3]; - BlockPos leftmostRow = null; - int sign = 1; - char facing = 'X'; - for (EntityItemFrame itemFrame : itemFramesWithMaps) { - ItemStack map = itemFrame.getDisplayedItem(); - MapData mapData = ((ItemMap) map.getItem()).getMapData(map, world); - - // Find position on board - int row = 0; - int column; - sign = 1; - - if (itemFrame.facingDirection == EnumFacing.SOUTH || itemFrame.facingDirection == EnumFacing.WEST) { - sign = -1; - } - - BlockPos itemFramePos = new BlockPos(itemFrame.posX, Math.floor(itemFrame.posY), itemFrame.posZ); - for (int i = 2; i >= 0; i--) { - int realI = i * sign; - BlockPos blockPos = itemFramePos; - if (itemFrame.posX % 0.5 == 0) { - blockPos = itemFramePos.add(realI, 0, 0); - } else if (itemFrame.posZ % 0.5 == 0) { - blockPos = itemFramePos.add(0, 0, realI); - facing = 'Z'; - } - Block block = world.getBlockState(blockPos).getBlock(); - if (block == Blocks.air || block == Blocks.stone_button) { - leftmostRow = blockPos; - row = i; - break; - } - } - - if (itemFrame.posY == 72.5) { - column = 0; - } else if (itemFrame.posY == 71.5) { - column = 1; - } else if (itemFrame.posY == 70.5) { - column = 2; - } else { - continue; - } - - // Get colour - // Middle pixel = 64*128 + 64 = 8256 - int colourInt = mapData.colors[8256] & 255; - if (colourInt == 114) { - board[column][row] = 'X'; - } else if (colourInt == 33) { - board[column][row] = 'O'; - } - } - System.out.println("Board: " + Arrays.deepToString(board)); - - // Draw best move - int bestMove = TicTacToeUtils.getBestMove(board) - 1; - System.out.println("Best move slot: " + bestMove); - if (leftmostRow != null) { - double drawX = facing == 'X' ? leftmostRow.getX() - sign * (bestMove % 3) : leftmostRow.getX(); - double drawY = 72 - Math.floor(bestMove / 3); - double drawZ = facing == 'Z' ? leftmostRow.getZ() - sign * (bestMove % 3) : leftmostRow.getZ(); - - correctTicTacToeButton = new AxisAlignedBB(drawX, drawY, drawZ, drawX + 1, drawY + 1, drawZ + 1); - } - } - } - - tickAmount = 0; - } - - // Checks 5 times per second - if (tickAmount % 4 == 0) { - if (ToggleCommand.blazeToggled && Utils.inDungeons && world != null) { - List entities = world.getLoadedEntityList(); - int highestHealth = 0; - highestBlaze = null; - int lowestHealth = 99999999; - lowestBlaze = null; - - for (Entity entity : entities) { - if (entity.getName().contains("Blaze") && entity.getName().contains("/")) { - String blazeName = StringUtils.stripControlCodes(entity.getName()); - try { - int health = Integer.parseInt(blazeName.substring(blazeName.indexOf("/") + 1, blazeName.length() - 1)); - if (health > highestHealth) { - highestHealth = health; - highestBlaze = entity; - } - if (health < lowestHealth) { - lowestHealth = health; - lowestBlaze = entity; - } - } catch (NumberFormatException ex) { - ex.printStackTrace(); - } - } - } - } - } - - // Checks 10 times per second - if (tickAmount % 2 == 0) { - if (ToggleCommand.lowHealthNotifyToggled && Utils.inDungeons && world != null) { - List scoreboard = ScoreboardHandler.getSidebarLines(); - for (String score : scoreboard) { - if (score.endsWith("❤") && score.matches(".*§c\\d.*")) { - String name = score.substring(score.indexOf(" ") + 1); - Utils.createTitle(EnumChatFormatting.RED + "LOW HEALTH!\n" + name, 1); - break; - } - } - } - } - - // Runs 20 times per second - if (mc.currentScreen instanceof GuiChest) { - if (player == null) return; - ContainerChest chest = (ContainerChest) player.openContainer; - List invSlots = ((GuiChest) mc.currentScreen).inventorySlots.inventorySlots; - String chestName = chest.getLowerChestInventory().getDisplayName().getUnformattedText().trim(); - - if (ToggleCommand.ultrasequencerToggled && chestName.startsWith("Ultrasequencer (")) { - if (invSlots.get(49).getStack() != null && invSlots.get(49).getStack().getDisplayName().equals("§aRemember the pattern!")) { - for (int i = 9; i <= 44; i++) { - if (invSlots.get(i) == null || invSlots.get(i).getStack() == null) continue; - String itemName = StringUtils.stripControlCodes(invSlots.get(i).getStack().getDisplayName()); - if (itemName.matches("\\d+")) { - int number = Integer.parseInt(itemName); - clickInOrderSlots[number - 1] = invSlots.get(i); - } - } - } - } - - if (ToggleCommand.superpairsToggled && chestName.startsWith("Superpairs (")) { - for (int i = 0; i < 53; i++) { - ItemStack itemStack = invSlots.get(i).getStack(); - if (itemStack == null) continue; - String itemName = itemStack.getDisplayName(); - if (Item.getIdFromItem(itemStack.getItem()) == 95 || Item.getIdFromItem(itemStack.getItem()) == 160) continue; - if (itemName.contains("Instant Find") || itemName.contains("Gained +")) continue; - if (itemName.contains("Enchanted Book")) { - itemName = itemStack.getTooltip(mc.thePlayer, false).get(3); - } - if (itemStack.stackSize > 1) { - itemName = itemStack.stackSize + " " + itemName; - } - if (experimentTableSlots[i] != null) continue; - experimentTableSlots[i] = itemStack.copy().setStackDisplayName(itemName); - } - } - - if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { - if(terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 15; - if(terminalNumberNeeded[2] == 0) terminalNumberNeeded[2] = 15; - for(int i = 10; i <= 25; i++) { - if (i == 17 || i == 18) continue; - ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); - if (prevStack == null) terminalNumberNeeded[0] = 15; - else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) terminalNumberNeeded[0] = 15; - else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 15; - - ItemStack itemStack = invSlots.get(i).getStack(); - if (itemStack == null) continue; - if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; - if (itemStack.getItemDamage() != 14) continue; - if (itemStack.stackSize < terminalNumberNeeded[0]) { - terminalNumberNeeded[0] = itemStack.stackSize; - terminalNumberNeeded[1] = i; - } else if (itemStack.stackSize == terminalNumberNeeded[0] + 1) { - terminalNumberNeeded[2] = itemStack.stackSize; - terminalNumberNeeded[3] = i; - } - } - } - - } - - if (titleTimer >= 0) { - if (titleTimer == 0) { - showTitle = false; - } - titleTimer--; - } - if (skillTimer >= 0) { - if (skillTimer == 0) { - showSkill = false; - } - skillTimer--; - } + if (event.phase != Phase.START) return; + + Minecraft mc = Minecraft.getMinecraft(); + World world = mc.theWorld; + EntityPlayerSP player = mc.thePlayer; + + // Checks every second + tickAmount++; + if (tickAmount % 20 == 0) { + if (player != null) { + Utils.checkForSkyblock(); + Utils.checkForDungeons(); + } + + if (DisplayCommand.auto && world != null && player != null) { + List scoreboard = ScoreboardHandler.getSidebarLines(); + boolean found = false; + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("Sven Packmaster")) { + DisplayCommand.display = "wolf"; + found = true; + } else if (sCleaned.contains("Tarantula Broodfather")) { + DisplayCommand.display = "spider"; + found = true; + } else if (sCleaned.contains("Revenant Horror")) { + DisplayCommand.display = "zombie"; + found = true; + } else if (sCleaned.contains("The Catacombs (")) { + if (sCleaned.contains("F1")) { + DisplayCommand.display = "catacombs_floor_one"; + } else if (sCleaned.contains("F2")) { + DisplayCommand.display = "catacombs_floor_two"; + } else if (sCleaned.contains("F3")) { + DisplayCommand.display = "catacombs_floor_three"; + } else if (sCleaned.contains("F4")) { + DisplayCommand.display = "catacombs_floor_four"; + } else if (sCleaned.contains("F5")) { + DisplayCommand.display = "catacombs_floor_five"; + } else if (sCleaned.contains("F6")) { + DisplayCommand.display = "catacombs_floor_six"; + } else if (sCleaned.contains("F7")) { + DisplayCommand.display = "catacombs_floor_seven"; + } + found = true; + } + } + for (int i = 0; i < 8; i++) { + ItemStack hotbarItem = player.inventory.getStackInSlot(i); + if (hotbarItem == null) continue; + if (hotbarItem.getDisplayName().contains("Ancestral Spade")) { + DisplayCommand.display = "mythological"; + found = true; + } + } + if (!found) DisplayCommand.display = "off"; + ConfigHandler.writeStringConfig("misc", "display", DisplayCommand.display); + } + + if (ToggleCommand.creeperToggled && Utils.inDungeons && world != null && player != null) { + double x = player.posX; + double y = player.posY; + double z = player.posZ; + // Find creepers nearby + AxisAlignedBB creeperScan = new AxisAlignedBB(x - 14, y - 8, z - 13, x + 14, y + 8, z + 13); // 28x16x26 cube + List creepers = world.getEntitiesWithinAABB(EntityCreeper.class, creeperScan); + // Check if creeper is nearby + if (creepers.size() > 0 && !creepers.get(0).isInvisible()) { // Don't show Wither Cloak creepers + EntityCreeper creeper = creepers.get(0); + // Start creeper line drawings + creeperLines.clear(); + if (!drawCreeperLines) creeperLocation = new Vec3(creeper.posX, creeper.posY + 1, creeper.posZ); + drawCreeperLines = true; + // Search for nearby sea lanterns and prismarine blocks + BlockPos point1 = new BlockPos(creeper.posX - 14, creeper.posY - 7, creeper.posZ - 13); + BlockPos point2 = new BlockPos(creeper.posX + 14, creeper.posY + 10, creeper.posZ + 13); + Iterable blocks = BlockPos.getAllInBox(point1, point2); + for (BlockPos blockPos : blocks) { + Block block = world.getBlockState(blockPos).getBlock(); + if (block == Blocks.sea_lantern || block == Blocks.prismarine) { + // Connect block to nearest block on opposite side + Vec3 startBlock = new Vec3(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5); + BlockPos oppositeBlock = Utils.getFirstBlockPosAfterVectors(mc, startBlock, creeperLocation, 10, 20); + BlockPos endBlock = Utils.getNearbyBlock(mc, oppositeBlock, Blocks.sea_lantern, Blocks.prismarine); + if (endBlock != null && startBlock.yCoord > 68 && endBlock.getY() > 68) { // Don't create line underground + // Add to list for drawing + Vec3[] insertArray = {startBlock, new Vec3(endBlock.getX() + 0.5, endBlock.getY() + 0.5, endBlock.getZ() + 0.5)}; + creeperLines.add(insertArray); + } + } + } + } else { + drawCreeperLines = false; + } + } + + if (ToggleCommand.waterToggled && Utils.inDungeons && world != null && player != null) { + // multi thread block checking + new Thread(() -> { + prevInWaterRoom = inWaterRoom; + inWaterRoom = false; + boolean foundPiston = false; + boolean done = false; + for (int x = (int) (player.posX - 13); x <= player.posX + 13; x++) { + for (int z = (int) (player.posZ - 13); z <= player.posZ + 13; z++) { + BlockPos blockPos = new BlockPos(x, 54, z); + if (world.getBlockState(blockPos).getBlock() == Blocks.sticky_piston) { + foundPiston = true; + break; + } + } + if (foundPiston) break; + } + + if (foundPiston) { + for (int x = (int) (player.posX - 25); x <= player.posX + 25; x++) { + for (int z = (int) (player.posZ - 25); z <= player.posZ + 25; z++) { + BlockPos blockPos = new BlockPos(x, 82, z); + if (world.getBlockState(blockPos).getBlock() == Blocks.piston_head) { + inWaterRoom = true; + if (!prevInWaterRoom) { + boolean foundGold = false; + boolean foundClay = false; + boolean foundEmerald = false; + boolean foundQuartz = false; + boolean foundDiamond = false; + + // Detect first blocks near water stream + BlockPos scan1 = new BlockPos(x + 1, 78, z + 1); + BlockPos scan2 = new BlockPos(x - 1, 77, z - 1); + Iterable blocks = BlockPos.getAllInBox(scan1, scan2); + for (BlockPos puzzleBlockPos : blocks) { + Block block = world.getBlockState(puzzleBlockPos).getBlock(); + if (block == Blocks.gold_block) { + foundGold = true; + } else if (block == Blocks.hardened_clay) { + foundClay = true; + } else if (block == Blocks.emerald_block) { + foundEmerald = true; + } else if (block == Blocks.quartz_block) { + foundQuartz = true; + } else if (block == Blocks.diamond_block) { + foundDiamond = true; + } + } + + int variant = 0; + if (foundGold && foundClay) { + variant = 1; + } else if (foundEmerald && foundQuartz) { + variant = 2; + } else if (foundQuartz && foundDiamond) { + variant = 3; + } else if (foundGold && foundQuartz) { + variant = 4; + } + + // Return solution + String purple; + String orange; + String blue; + String green; + String red; + switch (variant) { + case 1: + purple = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.RED + "Clay"; + orange = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald"; + blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; + green = EnumChatFormatting.GREEN + "Emerald"; + red = EnumChatFormatting.GRAY + "None"; + break; + case 2: + purple = EnumChatFormatting.DARK_GRAY + "Coal"; + orange = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; + blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.GREEN + "Emerald"; + green = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.GREEN + "Emerald"; + red = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald"; + break; + case 3: + purple = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond"; + orange = EnumChatFormatting.GREEN + "Emerald"; + blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.AQUA + "Diamond"; + green = EnumChatFormatting.GRAY + "None"; + red = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald"; + break; + case 4: + purple = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; + orange = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal"; + blue = EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; + green = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald"; + red = EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay"; + break; + default: + purple = orange = blue = green = red = ERROR_COLOUR + "Error detecting water puzzle variant."; + break; + } + waterAnswers = MAIN_COLOUR + "The following levers must be down:\n" + + EnumChatFormatting.DARK_PURPLE + "Purple: " + purple + "\n" + + EnumChatFormatting.GOLD + "Orange: " + orange + "\n" + + EnumChatFormatting.BLUE + "Blue: " + blue + "\n" + + EnumChatFormatting.GREEN + "Green: " + green + "\n" + + EnumChatFormatting.RED + "Red: " + red; + done = true; + break; + } + } + } + if (done) break; + } + } else { + waterAnswers = null; + } + }).start(); + } + + if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && world != null) { + boolean inF5 = false; + + List scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("The Catacombs (F5)")) { + inF5 = true; + break; + } + } + + if (inF5) { + List loadedLivids = new ArrayList<>(); + List entities = world.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; + } + } + } + + if (ToggleCommand.ticTacToeToggled && Utils.inDungeons && world != null && player != null) { + correctTicTacToeButton = null; + AxisAlignedBB aabb = new AxisAlignedBB(player.posX - 6, player.posY - 6, player.posZ - 6, player.posX + 6, player.posY + 6, player.posZ + 6); + List itemFrames = world.getEntitiesWithinAABB(EntityItemFrame.class, aabb); + List itemFramesWithMaps = new ArrayList<>(); + // Find how many item frames have maps already placed + for (EntityItemFrame itemFrame : itemFrames) { + ItemStack item = itemFrame.getDisplayedItem(); + if (item == null || !(item.getItem() instanceof ItemMap)) continue; + MapData mapData = ((ItemMap) item.getItem()).getMapData(item, world); + if (mapData == null) continue; + + itemFramesWithMaps.add(itemFrame); + } + + // Only run when it's your turn + if (itemFramesWithMaps.size() != 9 && itemFramesWithMaps.size() % 2 == 1) { + char[][] board = new char[3][3]; + BlockPos leftmostRow = null; + int sign = 1; + char facing = 'X'; + for (EntityItemFrame itemFrame : itemFramesWithMaps) { + ItemStack map = itemFrame.getDisplayedItem(); + MapData mapData = ((ItemMap) map.getItem()).getMapData(map, world); + + // Find position on board + int row = 0; + int column; + sign = 1; + + if (itemFrame.facingDirection == EnumFacing.SOUTH || itemFrame.facingDirection == EnumFacing.WEST) { + sign = -1; + } + + BlockPos itemFramePos = new BlockPos(itemFrame.posX, Math.floor(itemFrame.posY), itemFrame.posZ); + for (int i = 2; i >= 0; i--) { + int realI = i * sign; + BlockPos blockPos = itemFramePos; + if (itemFrame.posX % 0.5 == 0) { + blockPos = itemFramePos.add(realI, 0, 0); + } else if (itemFrame.posZ % 0.5 == 0) { + blockPos = itemFramePos.add(0, 0, realI); + facing = 'Z'; + } + Block block = world.getBlockState(blockPos).getBlock(); + if (block == Blocks.air || block == Blocks.stone_button) { + leftmostRow = blockPos; + row = i; + break; + } + } + + if (itemFrame.posY == 72.5) { + column = 0; + } else if (itemFrame.posY == 71.5) { + column = 1; + } else if (itemFrame.posY == 70.5) { + column = 2; + } else { + continue; + } + + // Get colour + // Middle pixel = 64*128 + 64 = 8256 + int colourInt = mapData.colors[8256] & 255; + if (colourInt == 114) { + board[column][row] = 'X'; + } else if (colourInt == 33) { + board[column][row] = 'O'; + } + } + System.out.println("Board: " + Arrays.deepToString(board)); + + // Draw best move + int bestMove = TicTacToeUtils.getBestMove(board) - 1; + System.out.println("Best move slot: " + bestMove); + if (leftmostRow != null) { + double drawX = facing == 'X' ? leftmostRow.getX() - sign * (bestMove % 3) : leftmostRow.getX(); + double drawY = 72 - Math.floor(bestMove / 3); + double drawZ = facing == 'Z' ? leftmostRow.getZ() - sign * (bestMove % 3) : leftmostRow.getZ(); + + correctTicTacToeButton = new AxisAlignedBB(drawX, drawY, drawZ, drawX + 1, drawY + 1, drawZ + 1); + } + } + } + + tickAmount = 0; + } + + // Checks 5 times per second + if (tickAmount % 4 == 0) { + if (ToggleCommand.blazeToggled && Utils.inDungeons && world != null) { + List entities = world.getLoadedEntityList(); + int highestHealth = 0; + highestBlaze = null; + int lowestHealth = 99999999; + lowestBlaze = null; + + for (Entity entity : entities) { + if (entity.getName().contains("Blaze") && entity.getName().contains("/")) { + String blazeName = StringUtils.stripControlCodes(entity.getName()); + try { + int health = Integer.parseInt(blazeName.substring(blazeName.indexOf("/") + 1, blazeName.length() - 1)); + if (health > highestHealth) { + highestHealth = health; + highestBlaze = entity; + } + if (health < lowestHealth) { + lowestHealth = health; + lowestBlaze = entity; + } + } catch (NumberFormatException ex) { + ex.printStackTrace(); + } + } + } + } + } + + // Checks 10 times per second + if (tickAmount % 2 == 0) { + if (ToggleCommand.lowHealthNotifyToggled && Utils.inDungeons && world != null) { + List scoreboard = ScoreboardHandler.getSidebarLines(); + for (String score : scoreboard) { + if (score.endsWith("❤") && score.matches(".*§c\\d.*")) { + String name = score.substring(score.indexOf(" ") + 1); + Utils.createTitle(EnumChatFormatting.RED + "LOW HEALTH!\n" + name, 1); + break; + } + } + } + } + + // Runs 20 times per second + if (mc.currentScreen instanceof GuiChest) { + if (player == null) return; + ContainerChest chest = (ContainerChest) player.openContainer; + List invSlots = ((GuiChest) mc.currentScreen).inventorySlots.inventorySlots; + String chestName = chest.getLowerChestInventory().getDisplayName().getUnformattedText().trim(); + + if (ToggleCommand.ultrasequencerToggled && chestName.startsWith("Ultrasequencer (")) { + if (invSlots.get(49).getStack() != null && invSlots.get(49).getStack().getDisplayName().equals("§aRemember the pattern!")) { + for (int i = 9; i <= 44; i++) { + if (invSlots.get(i) == null || invSlots.get(i).getStack() == null) continue; + String itemName = StringUtils.stripControlCodes(invSlots.get(i).getStack().getDisplayName()); + if (itemName.matches("\\d+")) { + int number = Integer.parseInt(itemName); + clickInOrderSlots[number - 1] = invSlots.get(i); + } + } + } + } + + if (ToggleCommand.superpairsToggled && chestName.startsWith("Superpairs (")) { + for (int i = 0; i < 53; i++) { + ItemStack itemStack = invSlots.get(i).getStack(); + if (itemStack == null) continue; + String itemName = itemStack.getDisplayName(); + if (Item.getIdFromItem(itemStack.getItem()) == 95 || Item.getIdFromItem(itemStack.getItem()) == 160) + continue; + if (itemName.contains("Instant Find") || itemName.contains("Gained +")) continue; + if (itemName.contains("Enchanted Book")) { + itemName = itemStack.getTooltip(mc.thePlayer, false).get(3); + } + if (itemStack.stackSize > 1) { + itemName = itemStack.stackSize + " " + itemName; + } + if (experimentTableSlots[i] != null) continue; + experimentTableSlots[i] = itemStack.copy().setStackDisplayName(itemName); + } + } + + if (ToggleCommand.clickInOrderToggled && chestName.equals("Click in order!")) { + if (terminalNumberNeeded[0] == 0) terminalNumberNeeded[0] = 15; + if (terminalNumberNeeded[2] == 0) terminalNumberNeeded[2] = 15; + for (int i = 10; i <= 25; i++) { + if (i == 17 || i == 18) continue; + ItemStack prevStack = invSlots.get(terminalNumberNeeded[1]).getStack(); + if (prevStack == null) terminalNumberNeeded[0] = 15; + else if (prevStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) + terminalNumberNeeded[0] = 15; + else if (prevStack.getItemDamage() == 5) terminalNumberNeeded[0] = 15; + + ItemStack itemStack = invSlots.get(i).getStack(); + if (itemStack == null) continue; + if (itemStack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (itemStack.getItemDamage() != 14) continue; + if (itemStack.stackSize < terminalNumberNeeded[0]) { + terminalNumberNeeded[0] = itemStack.stackSize; + terminalNumberNeeded[1] = i; + } else if (itemStack.stackSize == terminalNumberNeeded[0] + 1) { + terminalNumberNeeded[2] = itemStack.stackSize; + terminalNumberNeeded[3] = i; + } + } + } + + } + + if (titleTimer >= 0) { + if (titleTimer == 0) { + showTitle = false; + } + titleTimer--; + } + if (skillTimer >= 0) { + if (skillTimer == 0) { + showSkill = false; + } + skillTimer--; + } } // Delay GUI by 1 tick @SubscribeEvent public void onRenderTick(TickEvent.RenderTickEvent event) { - if (guiToOpen != null) { - Minecraft mc = Minecraft.getMinecraft(); - if (guiToOpen.startsWith("dankergui")) { - int page = Character.getNumericValue(guiToOpen.charAt(guiToOpen.length() - 1)); - mc.displayGuiScreen(new DankerGui(page)); - } else { - switch (guiToOpen) { - case "displaygui": - mc.displayGuiScreen(new DisplayGui()); - break; - case "onlyslayergui": - mc.displayGuiScreen(new OnlySlayerGui()); - break; - case "editlocations": - mc.displayGuiScreen(new EditLocationsGui()); - break; - case "puzzlesolvers": - mc.displayGuiScreen(new PuzzleSolversGui(1)); - break; - case "experimentsolvers": - mc.displayGuiScreen(new ExperimentsGui()); - break; - case "skilltracker": - mc.displayGuiScreen(new SkillTrackerGui()); - break; - } - } - guiToOpen = null; - } + if (guiToOpen != null) { + Minecraft mc = Minecraft.getMinecraft(); + if (guiToOpen.startsWith("dankergui")) { + int page = Character.getNumericValue(guiToOpen.charAt(guiToOpen.length() - 1)); + mc.displayGuiScreen(new DankerGui(page)); + } else { + switch (guiToOpen) { + case "displaygui": + mc.displayGuiScreen(new DisplayGui()); + break; + case "onlyslayergui": + mc.displayGuiScreen(new OnlySlayerGui()); + break; + case "editlocations": + mc.displayGuiScreen(new EditLocationsGui()); + break; + case "puzzlesolvers": + mc.displayGuiScreen(new PuzzleSolversGui(1)); + break; + case "experimentsolvers": + mc.displayGuiScreen(new ExperimentsGui()); + break; + case "skilltracker": + mc.displayGuiScreen(new SkillTrackerGui()); + break; + } + } + guiToOpen = null; + } } @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { - if (ToggleCommand.blazeToggled) { - if (lowestBlaze != null) { - BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); - Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Smallest", LOWEST_BLAZE_COLOUR, event.partialTicks); - AxisAlignedBB aabb = new AxisAlignedBB(lowestBlaze.posX - 0.5, lowestBlaze.posY - 2, lowestBlaze.posZ - 0.5, lowestBlaze.posX + 0.5, lowestBlaze.posY, lowestBlaze.posZ + 0.5); - Utils.draw3DBox(aabb, LOWEST_BLAZE_COLOUR, event.partialTicks); - } - if (highestBlaze != null) { - BlockPos stringPos = new BlockPos(highestBlaze.posX, highestBlaze.posY + 1, highestBlaze.posZ); - Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Biggest", HIGHEST_BLAZE_COLOUR, event.partialTicks); - AxisAlignedBB aabb = new AxisAlignedBB(highestBlaze.posX - 0.5, highestBlaze.posY - 2, highestBlaze.posZ - 0.5, highestBlaze.posX + 0.5, highestBlaze.posY, highestBlaze.posZ + 0.5); - Utils.draw3DBox(aabb, HIGHEST_BLAZE_COLOUR, event.partialTicks); - } - } - if (ToggleCommand.creeperToggled && drawCreeperLines && !creeperLines.isEmpty()) { - for (int i = 0; i < creeperLines.size(); i++) { - Utils.draw3DLine(creeperLines.get(i)[0], creeperLines.get(i)[1], CREEPER_COLOURS[i % 10], event.partialTicks); - } - } - if (ToggleCommand.ticTacToeToggled && correctTicTacToeButton != null) { - Utils.draw3DBox(correctTicTacToeButton, 0x40FF40, event.partialTicks); - } + if (ToggleCommand.blazeToggled) { + if (lowestBlaze != null) { + BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); + Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Smallest", LOWEST_BLAZE_COLOUR, event.partialTicks); + AxisAlignedBB aabb = new AxisAlignedBB(lowestBlaze.posX - 0.5, lowestBlaze.posY - 2, lowestBlaze.posZ - 0.5, lowestBlaze.posX + 0.5, lowestBlaze.posY, lowestBlaze.posZ + 0.5); + Utils.draw3DBox(aabb, LOWEST_BLAZE_COLOUR, event.partialTicks); + } + if (highestBlaze != null) { + BlockPos stringPos = new BlockPos(highestBlaze.posX, highestBlaze.posY + 1, highestBlaze.posZ); + Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Biggest", HIGHEST_BLAZE_COLOUR, event.partialTicks); + AxisAlignedBB aabb = new AxisAlignedBB(highestBlaze.posX - 0.5, highestBlaze.posY - 2, highestBlaze.posZ - 0.5, highestBlaze.posX + 0.5, highestBlaze.posY, highestBlaze.posZ + 0.5); + Utils.draw3DBox(aabb, HIGHEST_BLAZE_COLOUR, event.partialTicks); + } + } + if (ToggleCommand.creeperToggled && drawCreeperLines && !creeperLines.isEmpty()) { + for (int i = 0; i < creeperLines.size(); i++) { + Utils.draw3DLine(creeperLines.get(i)[0], creeperLines.get(i)[1], CREEPER_COLOURS[i % 10], event.partialTicks); + } + } + if (ToggleCommand.ticTacToeToggled && correctTicTacToeButton != null) { + Utils.draw3DBox(correctTicTacToeButton, 0x40FF40, event.partialTicks); + } } @SubscribeEvent public void onInteract(PlayerInteractEvent event) { - if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; - ItemStack item = event.entityPlayer.getHeldItem(); - if (item == null) return; - - if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { - - Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); - - if (ToggleCommand.blockBreakingFarmsToggled) { - ArrayList tools = new ArrayList<>(Arrays.asList( - Items.wooden_hoe, - Items.stone_hoe, - Items.iron_hoe, - Items.golden_hoe, - Items.diamond_hoe, - Items.wooden_axe, - Items.stone_axe, - Items.iron_axe, - Items.golden_axe, - Items.diamond_axe - )); - - ArrayList farmBlocks = new ArrayList<>(Arrays.asList( - Blocks.dirt, - Blocks.farmland, - Blocks.carpet, - Blocks.glowstone, - Blocks.sea_lantern - )); - - if (tools.contains(item.getItem()) && farmBlocks.contains(block)) { - event.setCanceled(true); - } - - } - } - - if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) { - if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { - event.setCanceled(true); - } - if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) { - event.setCanceled(true); - } - if (ToggleCommand.notifySlayerSlainToggled) { - if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->ScoreboardHandler.cleanSB(x).contains("Boss slain!"))) { - if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->{ - String line = ScoreboardHandler.cleanSB(x); - return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); - })) { - if (Utils.hasRightClickAbility(item)) { - List lore = Utils.getItemLore(item); - - int abilityLine = -1; - for (int i = 0; i < lore.size(); i++) { - String line = StringUtils.stripControlCodes(lore.get(i)); - if (line.startsWith("Item Ability:")) abilityLine = i; - if (abilityLine != -1 && i > abilityLine) { - if (line.toLowerCase().contains("damage")) { - Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); - break; - } - } - } - } - } - } - } - } - - if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { - Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); - - ArrayList interactables = new ArrayList<>(Arrays.asList( - Blocks.acacia_door, - Blocks.anvil, - Blocks.beacon, - Blocks.bed, - Blocks.birch_door, - Blocks.brewing_stand, - Blocks.command_block, - Blocks.crafting_table, - Blocks.chest, - Blocks.dark_oak_door, - Blocks.daylight_detector, - Blocks.daylight_detector_inverted, - Blocks.dispenser, - Blocks.dropper, - Blocks.enchanting_table, - Blocks.ender_chest, - Blocks.furnace, - Blocks.hopper, - Blocks.jungle_door, - Blocks.lever, - Blocks.noteblock, - Blocks.powered_comparator, - Blocks.unpowered_comparator, - Blocks.powered_repeater, - Blocks.unpowered_repeater, - Blocks.standing_sign, - Blocks.wall_sign, - Blocks.trapdoor, - Blocks.trapped_chest, - Blocks.wooden_button, - Blocks.stone_button, - Blocks.oak_door, - Blocks.skull - )); - ArrayList flowerPlaceable = new ArrayList<>(Arrays.asList( - Blocks.grass, - Blocks.dirt, - Blocks.flower_pot, - Blocks.tallgrass, - Blocks.double_plant - )); - if (Utils.inDungeons) { - interactables.add(Blocks.coal_block); - interactables.add(Blocks.stained_hardened_clay); - } - if(flowerPlaceable.contains(block)){ - if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Flower of Truth")) { - event.setCanceled(true); - } - if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Spirit Sceptre")) { - event.setCanceled(true); - } - } - if (!interactables.contains(block)) { - if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { - event.setCanceled(true); - } - if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) { - event.setCanceled(true); - } - } - } + if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; + ItemStack item = event.entityPlayer.getHeldItem(); + if (item == null) return; + + if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { + + Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + + if (ToggleCommand.blockBreakingFarmsToggled) { + ArrayList tools = new ArrayList<>(Arrays.asList( + Items.wooden_hoe, + Items.stone_hoe, + Items.iron_hoe, + Items.golden_hoe, + Items.diamond_hoe, + Items.wooden_axe, + Items.stone_axe, + Items.iron_axe, + Items.golden_axe, + Items.diamond_axe + )); + + ArrayList farmBlocks = new ArrayList<>(Arrays.asList( + Blocks.dirt, + Blocks.farmland, + Blocks.carpet, + Blocks.glowstone, + Blocks.sea_lantern + )); + + if (tools.contains(item.getItem()) && farmBlocks.contains(block)) { + event.setCanceled(true); + } + + } + } + + if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) { + if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { + event.setCanceled(true); + } + if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) { + event.setCanceled(true); + } + if (ToggleCommand.notifySlayerSlainToggled) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x -> ScoreboardHandler.cleanSB(x).contains("Boss slain!"))) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x -> { + String line = ScoreboardHandler.cleanSB(x); + return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); + })) { + if (Utils.hasRightClickAbility(item)) { + List lore = Utils.getItemLore(item); + + int abilityLine = -1; + for (int i = 0; i < lore.size(); i++) { + String line = StringUtils.stripControlCodes(lore.get(i)); + if (line.startsWith("Item Ability:")) abilityLine = i; + if (abilityLine != -1 && i > abilityLine) { + if (line.toLowerCase().contains("damage")) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + break; + } + } + } + } + } + } + } + } + + if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { + Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + + ArrayList interactables = new ArrayList<>(Arrays.asList( + Blocks.acacia_door, + Blocks.anvil, + Blocks.beacon, + Blocks.bed, + Blocks.birch_door, + Blocks.brewing_stand, + Blocks.command_block, + Blocks.crafting_table, + Blocks.chest, + Blocks.dark_oak_door, + Blocks.daylight_detector, + Blocks.daylight_detector_inverted, + Blocks.dispenser, + Blocks.dropper, + Blocks.enchanting_table, + Blocks.ender_chest, + Blocks.furnace, + Blocks.hopper, + Blocks.jungle_door, + Blocks.lever, + Blocks.noteblock, + Blocks.powered_comparator, + Blocks.unpowered_comparator, + Blocks.powered_repeater, + Blocks.unpowered_repeater, + Blocks.standing_sign, + Blocks.wall_sign, + Blocks.trapdoor, + Blocks.trapped_chest, + Blocks.wooden_button, + Blocks.stone_button, + Blocks.oak_door, + Blocks.skull + )); + ArrayList flowerPlaceable = new ArrayList<>(Arrays.asList( + Blocks.grass, + Blocks.dirt, + Blocks.flower_pot, + Blocks.tallgrass, + Blocks.double_plant + )); + if (Utils.inDungeons) { + interactables.add(Blocks.coal_block); + interactables.add(Blocks.stained_hardened_clay); + } + if (flowerPlaceable.contains(block)) { + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Flower of Truth")) { + event.setCanceled(true); + } + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Spirit Sceptre")) { + event.setCanceled(true); + } + } + if (!interactables.contains(block)) { + if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { + event.setCanceled(true); + } + if (ToggleCommand.lividDaggerToggled && item.getDisplayName().contains("Livid Dagger")) { + event.setCanceled(true); + } + } + } } @SubscribeEvent - public void onArrowNock(ArrowNockEvent event) { - if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; - - if (ToggleCommand.notifySlayerSlainToggled) { - if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->ScoreboardHandler.cleanSB(x).contains("Boss slain!"))) { - if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x->{ - String line = ScoreboardHandler.cleanSB(x); - return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); - })) { - Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); - } - } - } - } + public void onArrowNock(ArrowNockEvent event) { + if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; + + if (ToggleCommand.notifySlayerSlainToggled) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x -> ScoreboardHandler.cleanSB(x).contains("Boss slain!"))) { + if (ScoreboardHandler.getSidebarLines().stream().anyMatch(x -> { + String line = ScoreboardHandler.cleanSB(x); + return Arrays.stream(new String[]{"Howling Cave", "Ruins", "Graveyard", "Coal Mine", "Spider's Den"}).anyMatch(line::contains); + })) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + } + } + } + } @SubscribeEvent - public void onAttackingEntity(AttackEntityEvent event) { - if (ToggleCommand.notifySlayerSlainToggled && (event.target instanceof EntityZombie || event.target instanceof EntitySpider || event.target instanceof EntityWolf)) { - List scoreboard = ScoreboardHandler.getSidebarLines(); - - for (String line : scoreboard) { - String cleanedLine = ScoreboardHandler.cleanSB(line); - if (cleanedLine.contains("Boss slain!")) { - Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); - break; - } - } - } - } + public void onAttackingEntity(AttackEntityEvent event) { + if (ToggleCommand.notifySlayerSlainToggled && (event.target instanceof EntityZombie || event.target instanceof EntitySpider || event.target instanceof EntityWolf)) { + List scoreboard = ScoreboardHandler.getSidebarLines(); + + for (String line : scoreboard) { + String cleanedLine = ScoreboardHandler.cleanSB(line); + if (cleanedLine.contains("Boss slain!")) { + Utils.createTitle(EnumChatFormatting.RED + "Boss slain!", 2); + break; + } + } + } + } @SubscribeEvent public void onEntityInteract(EntityInteractEvent event) { - Minecraft mc = Minecraft.getMinecraft(); - if (mc.thePlayer != event.entityPlayer) return; - - if (ToggleCommand.itemFrameOnSeaLanternsToggled && Utils.inDungeons && event.target instanceof EntityItemFrame) { - EntityItemFrame itemFrame = (EntityItemFrame) event.target; - ItemStack item = itemFrame.getDisplayedItem(); - if (item == null || item.getItem() != Items.arrow) return; - BlockPos blockPos = Utils.getBlockUnderItemFrame(itemFrame); - if (mc.theWorld.getBlockState(blockPos).getBlock() == Blocks.sea_lantern) { - event.setCanceled(true); - } - } + Minecraft mc = Minecraft.getMinecraft(); + if (mc.thePlayer != event.entityPlayer) return; + + if (ToggleCommand.itemFrameOnSeaLanternsToggled && Utils.inDungeons && event.target instanceof EntityItemFrame) { + EntityItemFrame itemFrame = (EntityItemFrame) event.target; + ItemStack item = itemFrame.getDisplayedItem(); + if (item == null || item.getItem() != Items.arrow) return; + BlockPos blockPos = Utils.getBlockUnderItemFrame(itemFrame); + if (mc.theWorld.getBlockState(blockPos).getBlock() == Blocks.sea_lantern) { + event.setCanceled(true); + } + } } @SubscribeEvent public void onKey(KeyInputEvent event) { - if (!Utils.inSkyblock) return; - - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - if (keyBindings[0].isPressed()) { - player.sendChatMessage(lastMaddoxCommand); - } - if (keyBindings[1].isPressed()) { - if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { - skillStopwatch.resume(); - player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker started.")); - } else if (!skillStopwatch.isStarted()) { - skillStopwatch.start(); - player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker started.")); - } else if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) { - skillStopwatch.suspend(); - player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker paused.")); - } - } + if (!Utils.inSkyblock) return; + + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + if (keyBindings[0].isPressed()) { + player.sendChatMessage(lastMaddoxCommand); + } + if (keyBindings[1].isPressed()) { + if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { + skillStopwatch.resume(); + player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker started.")); + } else if (!skillStopwatch.isStarted()) { + skillStopwatch.start(); + player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker started.")); + } else if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) { + skillStopwatch.suspend(); + player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker paused.")); + } + } } @SubscribeEvent public void onGuiMouseInputPre(GuiScreenEvent.MouseInputEvent.Pre event) { - if (!Utils.inSkyblock) return; - if (Mouse.getEventButton() != 0 && Mouse.getEventButton() != 1 && Mouse.getEventButton() != 2) return; // Left click, middle click or right click - if (!Mouse.getEventButtonState()) return; - - if (event.gui instanceof GuiChest) { - Container containerChest = ((GuiChest) event.gui).inventorySlots; - if (containerChest instanceof ContainerChest) { - // a lot of declarations here, if you get scarred, my bad - GuiChest chest = (GuiChest) event.gui; - IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); - Slot mouseSlot = chest.getSlotUnderMouse(); - if (mouseSlot == null) return; - ItemStack item = mouseSlot.getStack(); - String inventoryName = inventory.getDisplayName().getUnformattedText(); - - if (ToggleCommand.stopSalvageStarredToggled && inventoryName.startsWith("Salvage")) { - if (item == null) return; - boolean inSalvageGui = false; - if (item.getDisplayName().contains("Salvage") || item.getDisplayName().contains("Essence")) { - ItemStack salvageItem = inventory.getStackInSlot(13); - if (salvageItem == null) return; - item = salvageItem; - inSalvageGui = true; - } - if (item.getDisplayName().contains("✪") && (mouseSlot.slotNumber > 53 || inSalvageGui)) { - Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, 0.5f); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from salvaging that item!")); - event.setCanceled(true); - return; - } - } - - if (inventoryName.endsWith(" Chest") && item != null && item.getDisplayName().contains("Open Reward Chest")) { - List tooltip = item.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); - for (String lineUnclean : tooltip) { - String line = StringUtils.stripControlCodes(lineUnclean); - if (line.contains("FREE")) { - break; - } else if (line.contains(" Coins")) { - int coinsSpent = Integer.parseInt(line.substring(0, line.indexOf(" ")).replaceAll(",", "")); - - List scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - LootCommand.f1CoinsSpent += coinsSpent; - LootCommand.f1CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", LootCommand.f1CoinsSpent); - } else if (sCleaned.contains("F2")) { - LootCommand.f2CoinsSpent += coinsSpent; - LootCommand.f2CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", LootCommand.f2CoinsSpent); - } else if (sCleaned.contains("F3")) { - LootCommand.f3CoinsSpent += coinsSpent; - LootCommand.f3CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", LootCommand.f3CoinsSpent); - } else if (sCleaned.contains("F4")) { - LootCommand.f4CoinsSpent += coinsSpent; - LootCommand.f4CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", LootCommand.f4CoinsSpent); - } else if (sCleaned.contains("F5")) { - LootCommand.f5CoinsSpent += coinsSpent; - LootCommand.f5CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", LootCommand.f5CoinsSpent); - } else if (sCleaned.contains("F6")) { - LootCommand.f6CoinsSpent += coinsSpent; - LootCommand.f6CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", LootCommand.f6CoinsSpent); - } else if (sCleaned.contains("F7")) { - LootCommand.f7CoinsSpent += coinsSpent; - LootCommand.f7CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", LootCommand.f7CoinsSpent); - } - break; - } - } - break; - } - } - } - - if (ToggleCommand.chronomatronToggled && inventoryName.startsWith("Chronomatron (")) { - if (item == null) { - if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) event.setCanceled(true); - return; - } - if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) { - if (chronomatronPattern.size() > chronomatronMouseClicks && !item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) event.setCanceled(true); - return; - } - chronomatronMouseClicks++; - } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§aRemember the pattern!")) { - if (event.isCancelable()) event.setCanceled(true); - return; - } - } - - if (ToggleCommand.ultrasequencerToggled && inventoryName.startsWith("Ultrasequencer (")) { - if (item == null) { - if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) - event.setCanceled(true); - return; - } - if (inventory.getStackInSlot(49).getDisplayName().equals("§aRemember the pattern!")) { - if (event.isCancelable()) event.setCanceled(true); - return; - } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a")) { - if (clickInOrderSlots[lastUltraSequencerClicked] != null && mouseSlot.getSlotIndex() != clickInOrderSlots[lastUltraSequencerClicked].getSlotIndex()) { - if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) - event.setCanceled(true); - return; - } - } - } - - if (ToggleCommand.blockWrongTerminalClicksToggled && Utils.inDungeons) { - boolean shouldCancel = false; - - if (item == null) return; - - //most of these are extra but who cares - - switch (inventoryName) { - case "Correct all the panes!": - shouldCancel = !StringUtils.stripControlCodes(item.getDisplayName()).startsWith("Off"); - break; - case "Navigate the maze!": - if (item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) { - shouldCancel = true; - break; - } - - if (item.getItemDamage() != 0) { - shouldCancel = true; - break; - } - - boolean isValid = false; - - int slotIndex = mouseSlot.getSlotIndex(); - - if (slotIndex % 9 != 8 && slotIndex != 53) { - ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1); - if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; - } - - if (!isValid && slotIndex % 9 != 0 && slotIndex != 0) { - ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1); - if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; - } - - if(!isValid && slotIndex <= 44) { - ItemStack itemStack = inventory.getStackInSlot(slotIndex + 9); - if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; - } - - if(!isValid && slotIndex >= 9) { - ItemStack itemStack = inventory.getStackInSlot(slotIndex - 9); - if(itemStack != null && itemStack.getItemDamage() == 5) isValid = true; - } - - shouldCancel = !isValid; - - break; - case "Click in order!": - - if (mouseSlot.getSlotIndex() > 35) { - break; - } - - if((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { - shouldCancel = true; - break; - } - if(item.getItemDamage() != 14) { - shouldCancel = true; - break; - } - int needed = terminalNumberNeeded[0]; - if(needed == 0) break; - shouldCancel = needed != -1 && item.stackSize != needed ; - break; - } - - if (!shouldCancel) { - if (inventoryName.startsWith("What starts with:")) { - char letter = inventoryName.charAt(inventoryName.indexOf("'") + 1); - shouldCancel = !(StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter); - } else if (inventoryName.startsWith("Select all the")) { - if(terminalColorNeeded == null) return; - String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); - shouldCancel = !(itemName.contains(terminalColorNeeded) || (terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (terminalColorNeeded.equals("WHITE") && itemName.equals("WOOL"))); - } - } - - event.setCanceled(shouldCancel && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)); - } - - if (!BlockSlayerCommand.onlySlayerName.equals("") && item != null) { - if (inventoryName.equals("Slayer")) { - if (!item.getDisplayName().contains("Revenant Horror") && !item.getDisplayName().contains("Tarantula Broodfather") && !item.getDisplayName().contains("Sven Packmaster")) return; - if (!item.getDisplayName().contains(BlockSlayerCommand.onlySlayerName)) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from starting this quest (Set to " + BlockSlayerCommand.onlySlayerName + " " + BlockSlayerCommand.onlySlayerNumber + ")")); - Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, (float) 0.5); - event.setCanceled(true); - } - } else if (inventoryName.equals("Revenant Horror") || inventoryName.equals("Tarantula Broodfather") || inventoryName.equals("Sven Packmaster")) { - if (item.getDisplayName().contains("Revenant Horror") || item.getDisplayName().contains("Tarantula Broodfather") || item.getDisplayName().contains("Sven Packmaster")) { - // Only check number as they passed the above check - String slayerNumber = item.getDisplayName().substring(item.getDisplayName().lastIndexOf(" ") + 1); - if (!slayerNumber.equals(BlockSlayerCommand.onlySlayerNumber)) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from starting this quest (Set to " + BlockSlayerCommand.onlySlayerName + " " + BlockSlayerCommand.onlySlayerNumber + ")")); - Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, (float) 0.5); - event.setCanceled(true); - } - } - } - } - } - } + if (!Utils.inSkyblock) return; + if (Mouse.getEventButton() != 0 && Mouse.getEventButton() != 1 && Mouse.getEventButton() != 2) + return; // Left click, middle click or right click + if (!Mouse.getEventButtonState()) return; + + if (event.gui instanceof GuiChest) { + Container containerChest = ((GuiChest) event.gui).inventorySlots; + if (containerChest instanceof ContainerChest) { + // a lot of declarations here, if you get scarred, my bad + GuiChest chest = (GuiChest) event.gui; + IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); + Slot mouseSlot = chest.getSlotUnderMouse(); + if (mouseSlot == null) return; + ItemStack item = mouseSlot.getStack(); + String inventoryName = inventory.getDisplayName().getUnformattedText(); + + if (ToggleCommand.stopSalvageStarredToggled && inventoryName.startsWith("Salvage")) { + if (item == null) return; + boolean inSalvageGui = false; + if (item.getDisplayName().contains("Salvage") || item.getDisplayName().contains("Essence")) { + ItemStack salvageItem = inventory.getStackInSlot(13); + if (salvageItem == null) return; + item = salvageItem; + inSalvageGui = true; + } + if (item.getDisplayName().contains("✪") && (mouseSlot.slotNumber > 53 || inSalvageGui)) { + Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, 0.5f); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from salvaging that item!")); + event.setCanceled(true); + return; + } + } + + if (inventoryName.endsWith(" Chest") && item != null && item.getDisplayName().contains("Open Reward Chest")) { + List tooltip = item.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); + for (String lineUnclean : tooltip) { + String line = StringUtils.stripControlCodes(lineUnclean); + if (line.contains("FREE")) { + break; + } else if (line.contains(" Coins")) { + int coinsSpent = Integer.parseInt(line.substring(0, line.indexOf(" ")).replaceAll(",", "")); + + List scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("The Catacombs (")) { + if (sCleaned.contains("F1")) { + LootCommand.f1CoinsSpent += coinsSpent; + LootCommand.f1CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", LootCommand.f1CoinsSpent); + } else if (sCleaned.contains("F2")) { + LootCommand.f2CoinsSpent += coinsSpent; + LootCommand.f2CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", LootCommand.f2CoinsSpent); + } else if (sCleaned.contains("F3")) { + LootCommand.f3CoinsSpent += coinsSpent; + LootCommand.f3CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", LootCommand.f3CoinsSpent); + } else if (sCleaned.contains("F4")) { + LootCommand.f4CoinsSpent += coinsSpent; + LootCommand.f4CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", LootCommand.f4CoinsSpent); + } else if (sCleaned.contains("F5")) { + LootCommand.f5CoinsSpent += coinsSpent; + LootCommand.f5CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", LootCommand.f5CoinsSpent); + } else if (sCleaned.contains("F6")) { + LootCommand.f6CoinsSpent += coinsSpent; + LootCommand.f6CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", LootCommand.f6CoinsSpent); + } else if (sCleaned.contains("F7")) { + LootCommand.f7CoinsSpent += coinsSpent; + LootCommand.f7CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", LootCommand.f7CoinsSpent); + } + break; + } + } + break; + } + } + } + + if (ToggleCommand.chronomatronToggled && inventoryName.startsWith("Chronomatron (")) { + if (item == null) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) + event.setCanceled(true); + return; + } + if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) { + if (chronomatronPattern.size() > chronomatronMouseClicks && !item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) + event.setCanceled(true); + return; + } + chronomatronMouseClicks++; + } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§aRemember the pattern!")) { + if (event.isCancelable()) event.setCanceled(true); + return; + } + } + + if (ToggleCommand.ultrasequencerToggled && inventoryName.startsWith("Ultrasequencer (")) { + if (item == null) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) + event.setCanceled(true); + return; + } + if (inventory.getStackInSlot(49).getDisplayName().equals("§aRemember the pattern!")) { + if (event.isCancelable()) event.setCanceled(true); + return; + } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a")) { + if (clickInOrderSlots[lastUltraSequencerClicked] != null && mouseSlot.getSlotIndex() != clickInOrderSlots[lastUltraSequencerClicked].getSlotIndex()) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) + event.setCanceled(true); + return; + } + } + } + + if (ToggleCommand.blockWrongTerminalClicksToggled && Utils.inDungeons) { + boolean shouldCancel = false; + + if (item == null) return; + + //most of these are extra but who cares + + switch (inventoryName) { + case "Correct all the panes!": + shouldCancel = !StringUtils.stripControlCodes(item.getDisplayName()).startsWith("Off"); + break; + case "Navigate the maze!": + if (item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) { + shouldCancel = true; + break; + } + + if (item.getItemDamage() != 0) { + shouldCancel = true; + break; + } + + boolean isValid = false; + + int slotIndex = mouseSlot.getSlotIndex(); + + if (slotIndex % 9 != 8 && slotIndex != 53) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex + 1); + if (itemStack != null && itemStack.getItemDamage() == 5) isValid = true; + } + + if (!isValid && slotIndex % 9 != 0 && slotIndex != 0) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex - 1); + if (itemStack != null && itemStack.getItemDamage() == 5) isValid = true; + } + + if (!isValid && slotIndex <= 44) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex + 9); + if (itemStack != null && itemStack.getItemDamage() == 5) isValid = true; + } + + if (!isValid && slotIndex >= 9) { + ItemStack itemStack = inventory.getStackInSlot(slotIndex - 9); + if (itemStack != null && itemStack.getItemDamage() == 5) isValid = true; + } + + shouldCancel = !isValid; + + break; + case "Click in order!": + + if (mouseSlot.getSlotIndex() > 35) { + break; + } + + if ((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { + shouldCancel = true; + break; + } + if (item.getItemDamage() != 14) { + shouldCancel = true; + break; + } + int needed = terminalNumberNeeded[0]; + if (needed == 0) break; + shouldCancel = needed != -1 && item.stackSize != needed; + break; + } + + if (!shouldCancel) { + if (inventoryName.startsWith("What starts with:")) { + char letter = inventoryName.charAt(inventoryName.indexOf("'") + 1); + shouldCancel = !(StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter); + } else if (inventoryName.startsWith("Select all the")) { + if (terminalColorNeeded == null) return; + String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); + shouldCancel = !(itemName.contains(terminalColorNeeded) || (terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (terminalColorNeeded.equals("WHITE") && itemName.equals("WOOL"))); + } + } + + event.setCanceled(shouldCancel && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)); + } + + if (!BlockSlayerCommand.onlySlayerName.equals("") && item != null) { + if (inventoryName.equals("Slayer")) { + if (!item.getDisplayName().contains("Revenant Horror") && !item.getDisplayName().contains("Tarantula Broodfather") && !item.getDisplayName().contains("Sven Packmaster")) + return; + if (!item.getDisplayName().contains(BlockSlayerCommand.onlySlayerName)) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from starting this quest (Set to " + BlockSlayerCommand.onlySlayerName + " " + BlockSlayerCommand.onlySlayerNumber + ")")); + Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, (float) 0.5); + event.setCanceled(true); + } + } else if (inventoryName.equals("Revenant Horror") || inventoryName.equals("Tarantula Broodfather") || inventoryName.equals("Sven Packmaster")) { + if (item.getDisplayName().contains("Revenant Horror") || item.getDisplayName().contains("Tarantula Broodfather") || item.getDisplayName().contains("Sven Packmaster")) { + // Only check number as they passed the above check + String slayerNumber = item.getDisplayName().substring(item.getDisplayName().lastIndexOf(" ") + 1); + if (!slayerNumber.equals(BlockSlayerCommand.onlySlayerNumber)) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from starting this quest (Set to " + BlockSlayerCommand.onlySlayerName + " " + BlockSlayerCommand.onlySlayerNumber + ")")); + Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, (float) 0.5); + event.setCanceled(true); + } + } + } + } + } + } } @SubscribeEvent public void onMouseInputPost(GuiScreenEvent.MouseInputEvent.Post event) { - if (!Utils.inSkyblock) return; - if (Mouse.getEventButton() == 0 && event.gui instanceof GuiChat) { - if (ToggleCommand.chatMaddoxToggled && System.currentTimeMillis() / 1000 - lastMaddoxTime < 10) { - Minecraft.getMinecraft().thePlayer.sendChatMessage(lastMaddoxCommand); - } - } + if (!Utils.inSkyblock) return; + if (Mouse.getEventButton() == 0 && event.gui instanceof GuiChat) { + if (ToggleCommand.chatMaddoxToggled && System.currentTimeMillis() / 1000 - lastMaddoxTime < 10) { + Minecraft.getMinecraft().thePlayer.sendChatMessage(lastMaddoxCommand); + } + } } @SubscribeEvent - public void onGuiOpen(GuiOpenEvent event) { - Minecraft mc = Minecraft.getMinecraft(); - GameSettings gameSettings = mc.gameSettings; - if (event.gui instanceof GuiChest) { - Container containerChest = ((GuiChest) event.gui).inventorySlots; - if (containerChest instanceof ContainerChest) { - GuiChest chest = (GuiChest) event.gui; - IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); - String inventoryName = inventory.getDisplayName().getUnformattedText(); - if (ToggleCommand.swapToPickBlockToggled) { - if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) { - if (!pickBlockBindSwapped) { - pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode(); - gameSettings.keyBindPickBlock.setKeyCode(-100); - pickBlockBindSwapped = true; - } - } else { - if (pickBlockBindSwapped) { - gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); - pickBlockBindSwapped = false; - } - } - } - } - } else { - if (pickBlockBindSwapped) { - gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); - pickBlockBindSwapped = false; - } - } - clickInOrderSlots = new Slot[36]; - lastChronomatronRound = 0; - chronomatronPattern.clear(); - chronomatronMouseClicks = 0; - experimentTableSlots = new ItemStack[54]; - terminalColorNeeded = null; - terminalNumberNeeded = new int[4]; - } + public void onGuiOpen(GuiOpenEvent event) { + Minecraft mc = Minecraft.getMinecraft(); + GameSettings gameSettings = mc.gameSettings; + if (event.gui instanceof GuiChest) { + Container containerChest = ((GuiChest) event.gui).inventorySlots; + if (containerChest instanceof ContainerChest) { + GuiChest chest = (GuiChest) event.gui; + IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); + String inventoryName = inventory.getDisplayName().getUnformattedText(); + if (ToggleCommand.swapToPickBlockToggled) { + if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) { + if (!pickBlockBindSwapped) { + pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode(); + gameSettings.keyBindPickBlock.setKeyCode(-100); + pickBlockBindSwapped = true; + } + } else { + if (pickBlockBindSwapped) { + gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); + pickBlockBindSwapped = false; + } + } + } + } + } else { + if (pickBlockBindSwapped) { + gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); + pickBlockBindSwapped = false; + } + } + clickInOrderSlots = new Slot[36]; + lastChronomatronRound = 0; + chronomatronPattern.clear(); + chronomatronMouseClicks = 0; + experimentTableSlots = new ItemStack[54]; + terminalColorNeeded = null; + terminalNumberNeeded = new int[4]; + } @SubscribeEvent public void onGuiRender(GuiScreenEvent.BackgroundDrawnEvent event) { - if (!Utils.inSkyblock) return; - if (event.gui instanceof GuiChest) { - GuiChest inventory = (GuiChest) event.gui; - Container containerChest = inventory.inventorySlots; - if (containerChest instanceof ContainerChest) { - Minecraft mc = Minecraft.getMinecraft(); - ScaledResolution sr = new ScaledResolution(mc); - int guiLeft = (sr.getScaledWidth() - 176) / 2; - int guiTop = (sr.getScaledHeight() - 222) / 2; - - List invSlots = inventory.inventorySlots.inventorySlots; - String displayName = ((ContainerChest) containerChest).getLowerChestInventory().getDisplayName().getUnformattedText().trim(); - int chestSize = inventory.inventorySlots.inventorySlots.size(); - - if (ToggleCommand.petColoursToggled) { - for (Slot slot : invSlots) { - ItemStack item = slot.getStack(); - if (item == null) continue; - String name = item.getDisplayName(); - if (petPattern.matcher(StringUtils.stripControlCodes(name)).find()) { - if (name.endsWith("aHealer") || name.endsWith("aMage") || name.endsWith("aBerserk") || name.endsWith("aArcher") || name.endsWith("aTank")) continue; - int colour; - int petLevel = Integer.parseInt(item.getDisplayName().substring(item.getDisplayName().indexOf(" ") + 1, item.getDisplayName().indexOf("]"))); - if (petLevel == 100) { - colour = PET_100; - } else if (petLevel >= 90) { - colour = PET_90_TO_99; - } else if (petLevel >= 80) { - colour = PET_80_TO_89; - } else if (petLevel >= 70) { - colour = PET_70_TO_79; - } else if (petLevel >= 60) { - colour = PET_60_TO_69; - } else if (petLevel >= 50) { - colour = PET_50_TO_59; - } else if (petLevel >= 40) { - colour = PET_40_TO_49; - } else if (petLevel >= 30) { - colour = PET_30_TO_39; - } else if (petLevel >= 20) { - colour = PET_20_TO_29; - } else if (petLevel >= 10) { - colour = PET_10_TO_19; - } else { - colour = PET_1_TO_9; - } - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, colour + 0xBF000000); - } - } - } - - if (ToggleCommand.startsWithToggled && Utils.inDungeons && displayName.startsWith("What starts with:")) { - char letter = displayName.charAt(displayName.indexOf("'") + 1); - for (Slot slot : invSlots) { - if (slot.getSlotIndex() > 53) continue; - ItemStack item = slot.getStack(); - if (item == null) continue; - if (item.isItemEnchanted()) continue; - if (StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter) { - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); - } - } - } - - if (ToggleCommand.selectAllToggled && Utils.inDungeons && displayName.startsWith("Select all the")) { - String colour; - List colourParts = new ArrayList<>(); - Matcher colourMatcher = startsWithTerminalPattern.matcher(displayName); - while (colourMatcher.find()) { - colourParts.add(colourMatcher.group()); - } - colour = String.join(" ", colourParts); - terminalColorNeeded = colour; - - for (Slot slot : invSlots) { - if (slot.getSlotIndex() > 53) continue; - ItemStack item = slot.getStack(); - if (item == null) continue; + if (!Utils.inSkyblock) return; + if (event.gui instanceof GuiChest) { + GuiChest inventory = (GuiChest) event.gui; + Container containerChest = inventory.inventorySlots; + if (containerChest instanceof ContainerChest) { + Minecraft mc = Minecraft.getMinecraft(); + ScaledResolution sr = new ScaledResolution(mc); + int guiLeft = (sr.getScaledWidth() - 176) / 2; + int guiTop = (sr.getScaledHeight() - 222) / 2; + + List invSlots = inventory.inventorySlots.inventorySlots; + String displayName = ((ContainerChest) containerChest).getLowerChestInventory().getDisplayName().getUnformattedText().trim(); + int chestSize = inventory.inventorySlots.inventorySlots.size(); + + if (ToggleCommand.petColoursToggled) { + for (Slot slot : invSlots) { + ItemStack item = slot.getStack(); + if (item == null) continue; + String name = item.getDisplayName(); + if (petPattern.matcher(StringUtils.stripControlCodes(name)).find()) { + if (name.endsWith("aHealer") || name.endsWith("aMage") || name.endsWith("aBerserk") || name.endsWith("aArcher") || name.endsWith("aTank")) + continue; + int colour; + int petLevel = Integer.parseInt(item.getDisplayName().substring(item.getDisplayName().indexOf(" ") + 1, item.getDisplayName().indexOf("]"))); + if (petLevel == 100) { + colour = PET_100; + } else if (petLevel >= 90) { + colour = PET_90_TO_99; + } else if (petLevel >= 80) { + colour = PET_80_TO_89; + } else if (petLevel >= 70) { + colour = PET_70_TO_79; + } else if (petLevel >= 60) { + colour = PET_60_TO_69; + } else if (petLevel >= 50) { + colour = PET_50_TO_59; + } else if (petLevel >= 40) { + colour = PET_40_TO_49; + } else if (petLevel >= 30) { + colour = PET_30_TO_39; + } else if (petLevel >= 20) { + colour = PET_20_TO_29; + } else if (petLevel >= 10) { + colour = PET_10_TO_19; + } else { + colour = PET_1_TO_9; + } + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, colour + 0xBF000000); + } + } + } + + if (ToggleCommand.startsWithToggled && Utils.inDungeons && displayName.startsWith("What starts with:")) { + char letter = displayName.charAt(displayName.indexOf("'") + 1); + for (Slot slot : invSlots) { + if (slot.getSlotIndex() > 53) continue; + ItemStack item = slot.getStack(); + if (item == null) continue; + if (item.isItemEnchanted()) continue; + if (StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter) { + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + } + } + } + + if (ToggleCommand.selectAllToggled && Utils.inDungeons && displayName.startsWith("Select all the")) { + String colour; + List colourParts = new ArrayList<>(); + Matcher colourMatcher = startsWithTerminalPattern.matcher(displayName); + while (colourMatcher.find()) { + colourParts.add(colourMatcher.group()); + } + colour = String.join(" ", colourParts); + terminalColorNeeded = colour; + + for (Slot slot : invSlots) { + if (slot.getSlotIndex() > 53) continue; + ItemStack item = slot.getStack(); + if (item == null) continue; if (item.isItemEnchanted()) continue; String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); - if (itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))) { - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); - } - } - } - - if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { - Slot slot = invSlots.get(terminalNumberNeeded[1]); - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); - Slot nextSlot = invSlots.get(terminalNumberNeeded[3]); - if (nextSlot != slot && nextSlot.getSlotIndex() != 0) { - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(11, 239, 231, 255).getRGB()); - } - } - - if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { - if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { - if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a")) { - lastUltraSequencerClicked = 0; - for (Slot slot : clickInOrderSlots) { - if (slot != null && slot.getStack() != null && StringUtils.stripControlCodes(slot.getStack().getDisplayName()).matches("\\d+")) { - int number = Integer.parseInt(StringUtils.stripControlCodes(slot.getStack().getDisplayName())); - if (number > lastUltraSequencerClicked) { - lastUltraSequencerClicked = number; - } - } - } - if (clickInOrderSlots[lastUltraSequencerClicked] != null) { - Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40); - } - if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { - if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { - Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6); - } - } - } - } - } - - if (ToggleCommand.chronomatronToggled && displayName.startsWith("Chronomatron (")) { - if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { - if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a") && invSlots.get(4).getStack() != null) { - int round = invSlots.get(4).getStack().stackSize; - int timerSeconds = Integer.parseInt(StringUtils.stripControlCodes(invSlots.get(49).getStack().getDisplayName()).replaceAll("[^\\d]", "")); - if (round != lastChronomatronRound && timerSeconds == round + 2) { - lastChronomatronRound = round; - for (int i = 10; i <= 43; i++) { - ItemStack stack = invSlots.get(i).getStack(); - if (stack == null) continue; - if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay)) { - chronomatronPattern.add(stack.getDisplayName()); - break; - } - } - } - if (chronomatronMouseClicks < chronomatronPattern.size()) { - for (int i = 10; i <= 43; i++) { - ItemStack glass = invSlots.get(i).getStack(); - if (glass == null) continue; - - Slot glassSlot = invSlots.get(i); - - if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) { - if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); - } - } - else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); - } - else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xBE40DAE6); - } - } - else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); - } - } - } - } else if (invSlots.get(49).getStack().getDisplayName().equals("§aRemember the pattern!")) { - chronomatronMouseClicks = 0; - } - } - new TextRenderer(mc, String.join("\n", chronomatronPattern), (int) (guiLeft * 0.8), 10, 1); - } - - if (ToggleCommand.superpairsToggled && displayName.contains("Superpairs (")) { - HashMap> matches = new HashMap<>(); - for(int i = 0; i<53; i++) { - ItemStack itemStack = experimentTableSlots[i]; - if (itemStack == null) continue; - Slot slot = invSlots.get(i); - int x = guiLeft + slot.xDisplayPosition; - int y = guiTop + slot.yDisplayPosition; - if (chestSize != 90) y += (6 - (chestSize - 36) / 9) * 9; - - //Utils.renderItem(itemStack, x, y, -100); - - String itemName = itemStack.getDisplayName(); - String keyName = itemName + itemStack.getUnlocalizedName(); - matches.computeIfAbsent(keyName, k -> new HashSet<>()); - matches.get(keyName).add(i); - } - - Color[] colors = { - new Color(255, 0, 0, 100), - new Color(0, 0, 255, 100), - new Color(100, 179, 113, 100), - new Color(255, 114, 255, 100), - new Color(255, 199, 87, 100), - new Color(119, 105, 198, 100), - new Color(135, 199, 112, 100), - new Color(240, 37, 240, 100), - new Color(178, 132, 190, 100), - new Color(63, 135, 163, 100), - new Color(146, 74, 10, 100), - new Color(255, 255, 255, 100), - new Color(217, 252, 140, 100), - new Color(255, 82, 82, 100) - }; - - Iterator colorIterator = Arrays.stream(colors).iterator(); - - matches.forEach((itemName, slotSet)->{ - if (slotSet.size() < 2) return; - ArrayList slots = new ArrayList<>(); - slotSet.forEach(slotNum->slots.add(invSlots.get(slotNum))); - Color color = colorIterator.next(); - slots.forEach(slot->{ - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, color.getRGB()); - }); - }); - } - - } - } + if (itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))) { + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + } + } + } + + if (ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { + Slot slot = invSlots.get(terminalNumberNeeded[1]); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); + Slot nextSlot = invSlots.get(terminalNumberNeeded[3]); + if (nextSlot != slot && nextSlot.getSlotIndex() != 0) { + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(11, 239, 231, 255).getRGB()); + } + } + + if (ToggleCommand.ultrasequencerToggled && displayName.startsWith("Ultrasequencer (")) { + if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { + if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a")) { + lastUltraSequencerClicked = 0; + for (Slot slot : clickInOrderSlots) { + if (slot != null && slot.getStack() != null && StringUtils.stripControlCodes(slot.getStack().getDisplayName()).matches("\\d+")) { + int number = Integer.parseInt(StringUtils.stripControlCodes(slot.getStack().getDisplayName())); + if (number > lastUltraSequencerClicked) { + lastUltraSequencerClicked = number; + } + } + } + if (clickInOrderSlots[lastUltraSequencerClicked] != null) { + Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40); + } + if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { + if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { + Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6); + } + } + } + } + } + + if (ToggleCommand.chronomatronToggled && displayName.startsWith("Chronomatron (")) { + if (invSlots.size() > 48 && invSlots.get(49).getStack() != null) { + if (invSlots.get(49).getStack().getDisplayName().startsWith("§7Timer: §a") && invSlots.get(4).getStack() != null) { + int round = invSlots.get(4).getStack().stackSize; + int timerSeconds = Integer.parseInt(StringUtils.stripControlCodes(invSlots.get(49).getStack().getDisplayName()).replaceAll("[^\\d]", "")); + if (round != lastChronomatronRound && timerSeconds == round + 2) { + lastChronomatronRound = round; + for (int i = 10; i <= 43; i++) { + ItemStack stack = invSlots.get(i).getStack(); + if (stack == null) continue; + if (stack.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay)) { + chronomatronPattern.add(stack.getDisplayName()); + break; + } + } + } + if (chronomatronMouseClicks < chronomatronPattern.size()) { + for (int i = 10; i <= 43; i++) { + ItemStack glass = invSlots.get(i).getStack(); + if (glass == null) continue; + + Slot glassSlot = invSlots.get(i); + + if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) { + if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { + if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + } + } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xBE40DAE6); + } + } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + } + } + } + } else if (invSlots.get(49).getStack().getDisplayName().equals("§aRemember the pattern!")) { + chronomatronMouseClicks = 0; + } + } + new TextRenderer(mc, String.join("\n", chronomatronPattern), (int) (guiLeft * 0.8), 10, 1); + } + + if (ToggleCommand.superpairsToggled && displayName.contains("Superpairs (")) { + HashMap> matches = new HashMap<>(); + for (int i = 0; i < 53; i++) { + ItemStack itemStack = experimentTableSlots[i]; + if (itemStack == null) continue; + Slot slot = invSlots.get(i); + int x = guiLeft + slot.xDisplayPosition; + int y = guiTop + slot.yDisplayPosition; + if (chestSize != 90) y += (6 - (chestSize - 36) / 9) * 9; + + //Utils.renderItem(itemStack, x, y, -100); + + String itemName = itemStack.getDisplayName(); + String keyName = itemName + itemStack.getUnlocalizedName(); + matches.computeIfAbsent(keyName, k -> new HashSet<>()); + matches.get(keyName).add(i); + } + + Color[] colors = { + new Color(255, 0, 0, 100), + new Color(0, 0, 255, 100), + new Color(100, 179, 113, 100), + new Color(255, 114, 255, 100), + new Color(255, 199, 87, 100), + new Color(119, 105, 198, 100), + new Color(135, 199, 112, 100), + new Color(240, 37, 240, 100), + new Color(178, 132, 190, 100), + new Color(63, 135, 163, 100), + new Color(146, 74, 10, 100), + new Color(255, 255, 255, 100), + new Color(217, 252, 140, 100), + new Color(255, 82, 82, 100) + }; + + Iterator colorIterator = Arrays.stream(colors).iterator(); + + matches.forEach((itemName, slotSet) -> { + if (slotSet.size() < 2) return; + ArrayList slots = new ArrayList<>(); + slotSet.forEach(slotNum -> slots.add(invSlots.get(slotNum))); + Color color = colorIterator.next(); + slots.forEach(slot -> { + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, color.getRGB()); + }); + }); + } + + } + } } - + @SubscribeEvent public void onServerConnect(ClientConnectedToServerEvent event) { event.manager.channel().pipeline().addBefore("packet_handler", "danker_packet_handler", new PacketHandler()); System.out.println("Added packet handler to channel pipeline."); } - + public void increaseSeaCreatures() { - if (LootCommand.empSCs != -1) { - LootCommand.empSCs++; - } - if (LootCommand.empSCsSession != -1) { - LootCommand.empSCsSession++; - } - // Only increment Yetis when in Jerry's Workshop - List scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("Jerry's Workshop") || sCleaned.contains("Jerry Pond")) { - if (LootCommand.yetiSCs != -1) { - LootCommand.yetiSCs++; - } - if (LootCommand.yetiSCsSession != -1) { - LootCommand.yetiSCsSession++; - } - } - } - - LootCommand.seaCreatures++; - LootCommand.fishingMilestone++; - LootCommand.seaCreaturesSession++; - LootCommand.fishingMilestoneSession++; - ConfigHandler.writeIntConfig("fishing", "seaCreature", LootCommand.seaCreatures); - ConfigHandler.writeIntConfig("fishing", "milestone", LootCommand.fishingMilestone); - ConfigHandler.writeIntConfig("fishing", "empSC", LootCommand.empSCs); - ConfigHandler.writeIntConfig("fishing", "yetiSC", LootCommand.yetiSCs); - + if (LootCommand.empSCs != -1) { + LootCommand.empSCs++; + } + if (LootCommand.empSCsSession != -1) { + LootCommand.empSCsSession++; + } + // Only increment Yetis when in Jerry's Workshop + List scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("Jerry's Workshop") || sCleaned.contains("Jerry Pond")) { + if (LootCommand.yetiSCs != -1) { + LootCommand.yetiSCs++; + } + if (LootCommand.yetiSCsSession != -1) { + LootCommand.yetiSCsSession++; + } + } + } + + LootCommand.seaCreatures++; + LootCommand.fishingMilestone++; + LootCommand.seaCreaturesSession++; + LootCommand.fishingMilestoneSession++; + ConfigHandler.writeIntConfig("fishing", "seaCreature", LootCommand.seaCreatures); + ConfigHandler.writeIntConfig("fishing", "milestone", LootCommand.fishingMilestone); + ConfigHandler.writeIntConfig("fishing", "empSC", LootCommand.empSCs); + ConfigHandler.writeIntConfig("fishing", "yetiSC", LootCommand.yetiSCs); + } - + } -- cgit From 1b24fe5548a52a9416efc91284ffb4256c6c5610 Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Sun, 20 Dec 2020 22:42:27 -0500 Subject: Reparty Command --- src/main/java/me/Danker/DankersSkyblockMod.java | 46 +++++++++++-- .../java/me/Danker/commands/RepartyCommand.java | 78 ++++++++++++++++++++++ .../java/me/Danker/handlers/ConfigHandler.java | 3 +- 3 files changed, 122 insertions(+), 5 deletions(-) create mode 100644 src/main/java/me/Danker/commands/RepartyCommand.java (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index bfd776d..8688bee 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -185,7 +185,9 @@ public class DankersSkyblockMod public static int PET_70_TO_79; public static int PET_80_TO_89; public static int PET_90_TO_99; - public static int PET_100; + public static int PET_100; + + public static List partyList = new ArrayList<>(); @EventHandler public void init(FMLInitializationEvent event) { @@ -300,7 +302,8 @@ public class DankersSkyblockMod ClientCommandHandler.instance.registerCommand(new DungeonsCommand()); ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); - ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); + ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); + ClientCommandHandler.instance.registerCommand(new RepartyCommand()); } @EventHandler @@ -353,7 +356,42 @@ public class DankersSkyblockMod @SubscribeEvent(priority = EventPriority.HIGHEST) public void onChat(ClientChatReceivedEvent event) { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - + + // Reparty command + if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 1.5) { + if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members"))) { + return; + } + + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + + Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); + Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); + Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); + + Matcher party_start = party_start_pattern.matcher(message); + Matcher leader = leader_pattern.matcher(message); + Matcher members = members_pattern.matcher(message); + + + if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself.")); + } + else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); + } + else { + while (members.find()) { + String partyMember = members.group(1); + if (!partyMember.equals(player.getName())) { + partyList.add(partyMember); + } + } + } + + event.setCanceled(true); + } + if (!Utils.inSkyblock) return; // Action Bar @@ -540,7 +578,7 @@ public class DankersSkyblockMod } } } - + if (ToggleCommand.golemAlertToggled) { if (message.contains("The ground begins to shake as an Endstone Protector rises from below!")) { Utils.createTitle(EnumChatFormatting.RED + "GOLEM SPAWNING!", 3); diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java new file mode 100644 index 0000000..3ade5e9 --- /dev/null +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -0,0 +1,78 @@ +package me.Danker.commands; + +import me.Danker.DankersSkyblockMod; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.*; +import net.minecraft.util.ChatComponentText; +import net.minecraftforge.client.event.*; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.util.*; +import java.text.NumberFormat; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + + +public class RepartyCommand extends CommandBase implements ICommand { + public static double callTime = 0; + + @Override + public String getCommandName() { return "reparty"; } + + @Override + public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName(); } + + @Override + public int getRequiredPermissionLevel() { return 0; } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + // MULTI THREAD DRIFTING + new Thread(() -> { + final EntityPlayer player_unused = (EntityPlayer) sender; + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + callTime = System.currentTimeMillis() / 1000; + + try { + player.sendChatMessage("/p list"); + Thread.sleep(700); + + List party = DankersSkyblockMod.partyList; + if (party.size() == 0) { + DankersSkyblockMod.partyList.clear(); + return; + } + + player.sendChatMessage("/p disband"); + Thread.sleep(250); + + String members = String.join(DankersSkyblockMod.SECONDARY_COLOUR + "\n- " + EnumChatFormatting.GOLD, party); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + DankersSkyblockMod.SECONDARY_COLOUR + "\n- " + + EnumChatFormatting.GOLD + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); + Thread.sleep(250); + + for (int i = 0; i < party.size(); i++) { + player.sendChatMessage("/p " + party.get(i)); + Thread.sleep(250); + } + + DankersSkyblockMod.partyList.clear(); + } + catch (InterruptedException e) { + e.printStackTrace(); + } + }).start(); + } +} \ No newline at end of file diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 7bf6ce2..f7ca598 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -411,7 +411,8 @@ public class ConfigHandler { if (!hasKey("colors", "main")) writeStringConfig("colors", "main", EnumChatFormatting.GREEN.toString()); if (!hasKey("colors", "secondary")) writeStringConfig("colors", "secondary", EnumChatFormatting.DARK_GREEN.toString()); - if (!hasKey("colors", "delimiter")) writeStringConfig("colors", "delimiter", EnumChatFormatting.AQUA.toString()); + if (!hasKey("colors", "delimiter")) writeStringConfig("colors", "delimiter", EnumChatFormatting.AQUA.toString() + EnumChatFormatting.STRIKETHROUGH.toString()); + if (!getString("colors", "delimiter").contains(EnumChatFormatting.STRIKETHROUGH.toString())) writeStringConfig("colors", "delimiter", getString("colors", "delimiter") + EnumChatFormatting.STRIKETHROUGH.toString()); if (!hasKey("colors", "error")) writeStringConfig("colors", "error", EnumChatFormatting.RED.toString()); if (!hasKey("colors", "type")) writeStringConfig("colors", "type", EnumChatFormatting.GREEN.toString()); if (!hasKey("colors", "value")) writeStringConfig("colors", "value", EnumChatFormatting.DARK_GREEN.toString()); -- cgit From 98acb1f3394ae0529acb3325ea8535bad238b4bc Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Mon, 21 Dec 2020 08:15:26 -0500 Subject: Fix trashy formatting --- src/main/java/me/Danker/commands/RepartyCommand.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 3ade5e9..7835d1f 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -27,19 +27,24 @@ public class RepartyCommand extends CommandBase implements ICommand { public static double callTime = 0; @Override - public String getCommandName() { return "reparty"; } + public String getCommandName() { + return "reparty"; + } @Override - public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName(); } + public String getCommandUsage(ICommandSender sender) { + return "/" + getCommandName(); + } @Override - public int getRequiredPermissionLevel() { return 0; } + public int getRequiredPermissionLevel() { + return 0; + } @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { // MULTI THREAD DRIFTING new Thread(() -> { - final EntityPlayer player_unused = (EntityPlayer) sender; EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; callTime = System.currentTimeMillis() / 1000; @@ -69,8 +74,7 @@ public class RepartyCommand extends CommandBase implements ICommand { } DankersSkyblockMod.partyList.clear(); - } - catch (InterruptedException e) { + } catch (InterruptedException e) { e.printStackTrace(); } }).start(); -- cgit From 87217e662d02187730e1b5209e21f5e1ac970826 Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Mon, 21 Dec 2020 08:16:05 -0500 Subject: Update ConfigHandler.java --- src/main/java/me/Danker/handlers/ConfigHandler.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index f7ca598..93425e5 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -412,7 +412,6 @@ public class ConfigHandler { if (!hasKey("colors", "main")) writeStringConfig("colors", "main", EnumChatFormatting.GREEN.toString()); if (!hasKey("colors", "secondary")) writeStringConfig("colors", "secondary", EnumChatFormatting.DARK_GREEN.toString()); if (!hasKey("colors", "delimiter")) writeStringConfig("colors", "delimiter", EnumChatFormatting.AQUA.toString() + EnumChatFormatting.STRIKETHROUGH.toString()); - if (!getString("colors", "delimiter").contains(EnumChatFormatting.STRIKETHROUGH.toString())) writeStringConfig("colors", "delimiter", getString("colors", "delimiter") + EnumChatFormatting.STRIKETHROUGH.toString()); if (!hasKey("colors", "error")) writeStringConfig("colors", "error", EnumChatFormatting.RED.toString()); if (!hasKey("colors", "type")) writeStringConfig("colors", "type", EnumChatFormatting.GREEN.toString()); if (!hasKey("colors", "value")) writeStringConfig("colors", "value", EnumChatFormatting.DARK_GREEN.toString()); -- cgit From c0748e602681150987c7ec2d81cdb9f1b2b4282a Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Mon, 21 Dec 2020 08:28:22 -0500 Subject: Change Message Color --- src/main/java/me/Danker/commands/RepartyCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 7835d1f..fbcea7f 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -61,9 +61,9 @@ public class RepartyCommand extends CommandBase implements ICommand { player.sendChatMessage("/p disband"); Thread.sleep(250); - String members = String.join(DankersSkyblockMod.SECONDARY_COLOUR + "\n- " + EnumChatFormatting.GOLD, party); + String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, party); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + DankersSkyblockMod.SECONDARY_COLOUR + "\n- " + + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD + members + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); Thread.sleep(250); -- cgit From e0511bf26ceb14b429f44ec01b9448a13f203791 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 21 Dec 2020 18:20:12 -0500 Subject: Add 2 second delay before notices are sent --- src/main/java/me/Danker/DankersSkyblockMod.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index d4d9b47..07aa188 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -345,6 +345,11 @@ public class DankersSkyblockMod { } continue; } + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent); break; } @@ -364,6 +369,11 @@ public class DankersSkyblockMod { e.printStackTrace(); } } else { + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "You are using spiderfrog's OldAnimationsMod.\n" + "Danker's Skyblock Mod is incompatible with OldAnimationsMod.\n" + -- cgit From de0681b5ddd1fb5aeddf1c1dc2ea207ff8087d82 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Mon, 21 Dec 2020 19:24:36 -0500 Subject: Auto-Import API key --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 ++++++ src/main/java/me/Danker/utils/Utils.java | 14 ++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 07aa188..bf1d466 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -424,6 +424,12 @@ public class DankersSkyblockMod { public void onChat(ClientChatReceivedEvent event) { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + if (message.startsWith("Your new API key is ") && Utils.isOnHypixel()) { + String apiKey = event.message.getSiblings().get(0).getChatStyle().getChatClickEvent().getValue(); + ConfigHandler.writeStringConfig("api", "APIKey", apiKey); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set API key to " + DankersSkyblockMod.SECONDARY_COLOUR + apiKey)); + } + if (!Utils.inSkyblock) return; // Action Bar diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 3f54b7d..abda6a3 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -27,9 +27,7 @@ import net.minecraft.util.*; import org.lwjgl.opengl.GL11; import java.awt.*; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; +import java.util.*; import java.util.List; import java.util.regex.Matcher; @@ -122,7 +120,15 @@ public class Utils { drawHeight += mc.fontRendererObj.FONT_HEIGHT; } } - + + public static boolean isOnHypixel () { + Minecraft mc = Minecraft.getMinecraft(); + if (mc != null && mc.theWorld != null && !mc.isSingleplayer()) { + return mc.getCurrentServerData().serverIP.toLowerCase().contains("hypixel"); + } + return false; + } + public static void checkForSkyblock() { Minecraft mc = Minecraft.getMinecraft(); if (mc != null && mc.theWorld != null && !mc.isSingleplayer()) { -- cgit From 6c51a4c8aa217ff1ba50c1ac251fd38aef58a0cb Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Tue, 22 Dec 2020 17:50:28 -0500 Subject: Beta 6 --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 441a4db..3056755 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta5" +version = "1.8.5-beta6" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index bf1d466..ad11f92 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -78,7 +78,7 @@ import java.util.regex.Pattern; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta5"; + public static final String VERSION = "1.8.5-beta6"; static double checkItemsNow = 0; static double itemsChecked = 0; -- cgit From 06f3f132645a50481e51756f996fc118aa59d306 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Tue, 22 Dec 2020 17:51:35 -0500 Subject: Remove OAM detection --- src/main/java/me/Danker/DankersSkyblockMod.java | 33 ------------------------- 1 file changed, 33 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index ad11f92..798c0fe 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -98,7 +98,6 @@ public class DankersSkyblockMod { static double lastMaddoxTime = 0; static KeyBinding[] keyBindings = new KeyBinding[2]; static boolean usingLabymod = false; - static boolean usingSpiderFrogOldAnimationsMod = false; public static String guiToOpen = null; static boolean foundLivid = false; static Entity livid = null; @@ -312,13 +311,6 @@ public class DankersSkyblockMod { public void postInit(final FMLPostInitializationEvent event) { usingLabymod = Loader.isModLoaded("labymod"); System.out.println("LabyMod detection: " + usingLabymod); - try { - Class clazz = Class.forName("com.spiderfrog.oldanimations.OldAnimationsMod"); - usingSpiderFrogOldAnimationsMod = true; - } catch (Exception var1) { - usingSpiderFrogOldAnimationsMod = false; - } - System.out.println("OldAnimationsMod detection: " + usingSpiderFrogOldAnimationsMod); } // Update checker @@ -359,31 +351,6 @@ public class DankersSkyblockMod { if (!updateChecked) { updateChecked = true; - if (usingSpiderFrogOldAnimationsMod) { - new Thread(() -> { - while (true) { - if (Minecraft.getMinecraft().thePlayer == null) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } else { - try { - Thread.sleep(2000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + - "You are using spiderfrog's OldAnimationsMod.\n" + - "Danker's Skyblock Mod is incompatible with OldAnimationsMod.\n" + - "Please remove OldAnimationsMod or you may experience crashes or other issues.")); - break; - } - } - }).start(); - } - // MULTI THREAD DRIFTING new Thread(() -> { EntityPlayer player = Minecraft.getMinecraft().thePlayer; -- cgit From 25dd122d60da623fb79073c7d3f9cabf178b7cc3 Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Wed, 23 Dec 2020 10:34:43 -0500 Subject: Auto Start/Stop Skill Tracker --- src/main/java/me/Danker/DankersSkyblockMod.java | 47 ++++++--- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 + .../me/Danker/commands/SkillTrackerCommand.java | 107 +++++++++++---------- .../java/me/Danker/commands/ToggleCommand.java | 11 ++- src/main/java/me/Danker/gui/DankerGui.java | 11 ++- .../java/me/Danker/handlers/ConfigHandler.java | 2 + 7 files changed, 116 insertions(+), 65 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 8688bee..d239e3e 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -103,6 +103,9 @@ public class DankersSkyblockMod static Entity livid = null; public static double cakeTime; + public static List partyList = new ArrayList<>(); + public static List repartyFailList = new ArrayList<>(); + public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", @@ -159,6 +162,7 @@ public class DankersSkyblockMod static double alchemyXP = 0; public static double alchemyXPGained = 0; static double xpLeft = 0; + static double timeSinceGained = 0; public static String MAIN_COLOUR; public static String SECONDARY_COLOUR; @@ -186,8 +190,6 @@ public class DankersSkyblockMod public static int PET_80_TO_89; public static int PET_90_TO_99; public static int PET_100; - - public static List partyList = new ArrayList<>(); @EventHandler public void init(FMLInitializationEvent event) { @@ -358,7 +360,7 @@ public class DankersSkyblockMod String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); // Reparty command - if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 1.5) { + if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 3) { if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members"))) { return; } @@ -367,7 +369,7 @@ public class DankersSkyblockMod Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); - Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); + Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); Matcher party_start = party_start_pattern.matcher(message); Matcher leader = leader_pattern.matcher(message); @@ -396,16 +398,30 @@ public class DankersSkyblockMod // Action Bar if (event.type == 2) { - String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); - for (String section : actionBarSections) { + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); + + for (String section : actionBarSections) { if (section.contains("+") && section.contains("/") && section.contains("(")) { if (!section.contains("Runecrafting") && !section.contains("Carpentry")) { - int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50; - double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); + if (ToggleCommand.autoSkillTrackerToggled && System.currentTimeMillis() / 1000 - timeSinceGained <= 2) { + if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { + skillStopwatch.resume(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); + } else if (!skillStopwatch.isStarted()) { + skillStopwatch.start(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); + } + } + timeSinceGained = System.currentTimeMillis() / 1000; + + int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50; + double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")); xpLeft = xpToLevelUp - currentXP; int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit); - double totalXP = currentXP + previousXP; + double totalXP = currentXP + previousXP; + String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" ")); switch (skill) { case "Farming": @@ -2377,7 +2393,7 @@ public class DankersSkyblockMod Utils.checkForSkyblock(); Utils.checkForDungeons(); } - + if (DisplayCommand.auto && world != null && player != null) { List scoreboard = ScoreboardHandler.getSidebarLines(); boolean found = false; @@ -2691,7 +2707,7 @@ public class DankersSkyblockMod correctTicTacToeButton = new AxisAlignedBB(drawX, drawY, drawZ, drawX + 1, drawY + 1, drawZ + 1); } } - } + } tickAmount = 0; } @@ -3250,6 +3266,7 @@ public class DankersSkyblockMod GuiChest chest = (GuiChest) event.gui; IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); String inventoryName = inventory.getDisplayName().getUnformattedText(); + if (ToggleCommand.swapToPickBlockToggled) { if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) { if (!pickBlockBindSwapped) { @@ -3271,6 +3288,14 @@ public class DankersSkyblockMod pickBlockBindSwapped = false; } } + + if (ToggleCommand.autoSkillTrackerToggled) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) { + skillStopwatch.suspend(); + mc.thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused.")); + } + } + clickInOrderSlots = new Slot[36]; lastChronomatronRound = 0; chronomatronPattern.clear(); diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index f16f598..d6ce908 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 380086a..d596d65 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -61,6 +61,7 @@ public class DankerGuiCommand extends CommandBase { debug.append("[lividsolver][").append(ToggleCommand.lividSolverToggled).append("]\n"); debug.append("[stopsalvagestarred][").append(ToggleCommand.stopSalvageStarredToggled).append("]\n"); debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); + debug.append("[autoskilltracker][").append(ToggleCommand.autoSkillTrackerToggled).append("]\n"); debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); debug.append("[blazepuzzle][").append(ToggleCommand.blazeToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java index 7642070..e341f43 100644 --- a/src/main/java/me/Danker/commands/SkillTrackerCommand.java +++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java @@ -13,6 +13,7 @@ import org.apache.commons.lang3.time.StopWatch; import java.util.List; public class SkillTrackerCommand extends CommandBase { + public static boolean running = false; @Override public String getCommandName() { @@ -39,55 +40,63 @@ public class SkillTrackerCommand extends CommandBase { @Override public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { - EntityPlayer player = (EntityPlayer) arg0; - - if (arg1.length < 1) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); - return; - } - - switch (arg1[0].toLowerCase()) { - case "start": - case "resume": - if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) { - DankersSkyblockMod.skillStopwatch.resume(); - } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) { - DankersSkyblockMod.skillStopwatch.start(); - } - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); - break; - case "pause": - case "stop": - if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) { - DankersSkyblockMod.skillStopwatch.suspend(); - } else { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused.")); - } - break; - case "reset": - DankersSkyblockMod.skillStopwatch = new StopWatch(); - DankersSkyblockMod.farmingXPGained = 0; - DankersSkyblockMod.miningXPGained = 0; - DankersSkyblockMod.combatXPGained = 0; - DankersSkyblockMod.foragingXPGained = 0; - DankersSkyblockMod.fishingXPGained = 0; - DankersSkyblockMod.enchantingXPGained = 0; - DankersSkyblockMod.alchemyXPGained = 0; - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset.")); - break; - case "hide": - DankersSkyblockMod.showSkillTracker = false; - ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden.")); - break; - case "show": - DankersSkyblockMod.showSkillTracker = true; - ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown.")); - break; - default: + // MULTI THREAD DRIFTING + new Thread(() -> { + EntityPlayer player = (EntityPlayer) arg0; + + if (arg1.length < 1) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); - } - } + return; + } + + try { + Thread.sleep(200); + switch (arg1[0].toLowerCase()) { + case "start": + case "resume": + if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) { + DankersSkyblockMod.skillStopwatch.resume(); + } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) { + DankersSkyblockMod.skillStopwatch.start(); + } + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); + break; + case "pause": + case "stop": + if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) { + DankersSkyblockMod.skillStopwatch.suspend(); + } else { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused.")); + } + break; + case "reset": + DankersSkyblockMod.skillStopwatch = new StopWatch(); + DankersSkyblockMod.farmingXPGained = 0; + DankersSkyblockMod.miningXPGained = 0; + DankersSkyblockMod.combatXPGained = 0; + DankersSkyblockMod.foragingXPGained = 0; + DankersSkyblockMod.fishingXPGained = 0; + DankersSkyblockMod.enchantingXPGained = 0; + DankersSkyblockMod.alchemyXPGained = 0; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker reset.")); + break; + case "hide": + DankersSkyblockMod.showSkillTracker = false; + ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker hidden.")); + break; + case "show": + DankersSkyblockMod.showSkillTracker = true; + ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker shown.")); + break; + default: + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(arg0))); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + }).start(); + } } diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 15693ef..0054c10 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -41,6 +41,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean swapToPickBlockToggled; public static boolean flowerWeaponsToggled; public static boolean notifySlayerSlainToggled; + public static boolean autoSkillTrackerToggled; // Puzzle Solvers public static boolean threeManToggled; public static boolean oruoToggled; @@ -70,7 +71,7 @@ public class ToggleCommand extends CommandBase implements ICommand { return "/" + getCommandName() + " "; } @@ -88,7 +89,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", - "lividsolver", "stopsalvagestarred", "notifyslayerslain", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "lividsolver", "stopsalvagestarred", "notifyslayerslain", "autoskilltracker", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); @@ -237,6 +238,11 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "NotifySlayerSlain", notifySlayerSlainToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Notify when slayer slain has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + notifySlayerSlainToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "autoskilltracker": + autoSkillTrackerToggled = !autoSkillTrackerToggled; + ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", autoSkillTrackerToggled); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Auto start/stop skill tracker has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + autoSkillTrackerToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "threemanpuzzle": threeManToggled = !threeManToggled; ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); @@ -346,6 +352,7 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Outline displayed text: " + DankersSkyblockMod.VALUE_COLOUR + outlineTextToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Cake timer: " + DankersSkyblockMod.VALUE_COLOUR + cakeTimerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Low health notify: " + DankersSkyblockMod.VALUE_COLOUR + lowHealthNotifyToggled + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Auto start/stop skill tracker: " + DankersSkyblockMod.VALUE_COLOUR + autoSkillTrackerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Livid solver: " + DankersSkyblockMod.VALUE_COLOUR + lividSolverToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Three man puzzle solver: " + DankersSkyblockMod.VALUE_COLOUR + threeManToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Oruo trivia solver: " + DankersSkyblockMod.VALUE_COLOUR + oruoToggled + "\n" + diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 69ccbe4..85780bd 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -59,6 +59,7 @@ public class DankerGui extends GuiScreen { private GuiButton flowerWeapons; private GuiButton pickBlock; private GuiButton notifySlayerSlain; + private GuiButton autoSkillTracker; public DankerGui(int page) { this.page = page; @@ -122,7 +123,8 @@ public class DankerGui extends GuiScreen { watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); - flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); + flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); + autoSkillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled)); switch (page) { case 1: @@ -173,7 +175,8 @@ public class DankerGui extends GuiScreen { this.buttonList.add(watcherReadyMessage); this.buttonList.add(splitFishing); this.buttonList.add(notifySlayerSlain); - this.buttonList.add(flowerWeapons); + this.buttonList.add(flowerWeapons); + this.buttonList.add(autoSkillTracker); this.buttonList.add(backPage); break; } @@ -337,6 +340,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.flowerWeaponsToggled = !ToggleCommand.flowerWeaponsToggled; ConfigHandler.writeBooleanConfig("toggles", "FlowerWeapons", ToggleCommand.flowerWeaponsToggled); flowerWeapons.displayString = "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled); + } else if (button == autoSkillTracker) { + ToggleCommand.autoSkillTrackerToggled = !ToggleCommand.autoSkillTrackerToggled; + ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", ToggleCommand.autoSkillTrackerToggled); + autoSkillTracker.displayString = "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 93425e5..1ee1414 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -196,6 +196,7 @@ public class ConfigHandler { if (!hasKey("toggles", "PickBlock")) writeBooleanConfig("toggles", "PickBlock", false); if (!hasKey("toggles", "FlowerWeapons")) writeBooleanConfig("toggles", "FlowerWeapons", false); if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); + if (!hasKey("toggles", "AutoSkillTracker")) writeBooleanConfig("toggles", "AutoSkillTracker", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false); @@ -464,6 +465,7 @@ public class ConfigHandler { ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); ToggleCommand.flowerWeaponsToggled = getBoolean("toggles", "FlowerWeapons"); + ToggleCommand.autoSkillTrackerToggled = getBoolean("toggles", "AutoSkillTracker"); // Puzzle Solvers ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle"); -- cgit From 174b46ccbb36aaa75d46c65c6f6dc38ee0998ba4 Mon Sep 17 00:00:00 2001 From: Sychic Date: Wed, 23 Dec 2020 12:07:30 -0500 Subject: Revert "Add Repartying" This reverts commit c64eea23 --- src/main/java/me/Danker/DankersSkyblockMod.java | 262 ++++++++------------- .../java/me/Danker/commands/RepartyCommand.java | 60 ----- .../java/me/Danker/commands/SetPartyCommand.java | 66 ------ 3 files changed, 100 insertions(+), 288 deletions(-) delete mode 100644 src/main/java/me/Danker/commands/RepartyCommand.java delete mode 100644 src/main/java/me/Danker/commands/SetPartyCommand.java (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index e253646..a1468e4 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -33,7 +33,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemMap; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.play.client.C01PacketChatMessage; import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraft.world.storage.MapData; @@ -79,8 +78,8 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta6"; - + public static final String VERSION = "1.8.5-beta5"; + static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); @@ -97,7 +96,7 @@ public class DankersSkyblockMod static int tickAmount = 1; static String lastMaddoxCommand = "/cb placeholder"; static double lastMaddoxTime = 0; - static KeyBinding[] keyBindings = new KeyBinding[4]; + static KeyBinding[] keyBindings = new KeyBinding[2]; static boolean usingLabymod = false; static boolean usingOAM = false; static boolean OAMWarning = false; @@ -105,10 +104,10 @@ public class DankersSkyblockMod static boolean foundLivid = false; static Entity livid = null; public static double cakeTime; - + public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); - - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; static Map triviaSolutions = new HashMap<>(); @@ -143,7 +142,7 @@ public class DankersSkyblockMod static int witherDoors = 0; static int dungeonDeaths = 0; static int puzzleFails = 0; - + static String lastSkill = "Farming"; public static boolean showSkillTracker; public static StopWatch skillStopwatch = new StopWatch(); @@ -162,7 +161,7 @@ public class DankersSkyblockMod static double alchemyXP = 0; public static double alchemyXPGained = 0; static double xpLeft = 0; - + public static String MAIN_COLOUR; public static String SECONDARY_COLOUR; public static String ERROR_COLOUR; @@ -189,14 +188,14 @@ public class DankersSkyblockMod public static int PET_80_TO_89; public static int PET_90_TO_99; public static int PET_100; - + @EventHandler public void init(FMLInitializationEvent event) { MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(new PacketHandler()); - + ConfigHandler.reloadConfig(); - + // For golden enchants t6Enchants.put("9Angler VI", "6Angler VI"); t6Enchants.put("9Bane of Arthropods VI", "6Bane of Arthropods VI"); @@ -213,7 +212,7 @@ public class DankersSkyblockMod t6Enchants.put("9Giant Killer VI", "6Giant Killer VI"); t6Enchants.put("9Growth VI", "6Growth VI"); t6Enchants.put("9Infinite Quiver X", "6Infinite Quiver X"); - t6Enchants.put("9Lethality VI", "6Lethality VI"); + t6Enchants.put("9Lethality VI", "6Lethality VI"); t6Enchants.put("9Life Steal IV", "6Life Steal IV"); t6Enchants.put("9Looting IV", "6Looting IV"); t6Enchants.put("9Luck VI", "6Luck VI"); @@ -230,7 +229,7 @@ public class DankersSkyblockMod t6Enchants.put("9Spiked Hook VI", "6Spiked Hook VI"); t6Enchants.put("9Thunderlord VI", "6Thunderlord VI"); t6Enchants.put("9Vampirism VI", "6Vampirism VI"); - + triviaSolutions.put("What is the status of The Watcher?", new String[]{"Stalker"}); triviaSolutions.put("What is the status of Bonzo?", new String[]{"New Necromancer"}); triviaSolutions.put("What is the status of Scarf?", new String[]{"Apprentice Necromancer"}); @@ -267,20 +266,18 @@ public class DankersSkyblockMod triviaSolutions.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"}); triviaSolutions.put("Which of these is not a dragon in The End?", new String[]{"Zoomer Dragon", "Weak Dragon", "Stonk Dragon", "Holy Dragon", "Boomer Dragon", "Booger Dragon", "Older Dragon", "Elder Dragon", "Stable Dragon", "Professor Dragon"}); - + String patternString = "(" + String.join("|", t6Enchants.keySet()) + ")"; t6EnchantPattern = Pattern.compile(patternString); - + keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); - keyBindings[2] = new KeyBinding("Reparty", Keyboard.KEY_P,"Danker's Skyblock Mod"); - keyBindings[3] = new KeyBinding("Get Party", Keyboard.KEY_O, "Danker's Skyblock Mod"); for (KeyBinding keyBinding : keyBindings) { ClientRegistry.registerKeyBinding(keyBinding); } } - + @EventHandler public void preInit(final FMLPreInitializationEvent event) { ClientCommandHandler.instance.registerCommand(new ToggleCommand()); @@ -306,10 +303,8 @@ public class DankersSkyblockMod ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); - ClientCommandHandler.instance.registerCommand(new SetPartyCommand()); - ClientCommandHandler.instance.registerCommand(new RepartyCommand()); } - + @EventHandler public void postInit(final FMLPostInitializationEvent event) { Package[] packages = Package.getPackages(); @@ -339,30 +334,30 @@ public class DankersSkyblockMod } } } - + // Update checker @SubscribeEvent public void onJoin(EntityJoinWorldEvent event) { if (!updateChecked) { updateChecked = true; - + // MULTI THREAD DRIFTING new Thread(() -> { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + System.out.println("Checking for updates..."); JsonObject latestRelease = APIHandler.getResponse("https://api.github.com/repos/bowser0000/SkyblockMod/releases/latest"); - + String latestTag = latestRelease.get("tag_name").getAsString(); DefaultArtifactVersion currentVersion = new DefaultArtifactVersion(VERSION); DefaultArtifactVersion latestVersion = new DefaultArtifactVersion(latestTag.substring(1)); - + if (currentVersion.compareTo(latestVersion) < 0) { String releaseURL = latestRelease.get("html_url").getAsString(); - + ChatComponentText update = new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + " [UPDATE] "); update.setChatStyle(update.getChatStyle().setChatClickEvent(new ClickEvent(Action.OPEN_URL, releaseURL))); - + try { Thread.sleep(2000); } catch (InterruptedException ex) { @@ -373,53 +368,20 @@ public class DankersSkyblockMod }).start(); } } - + @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) { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - - if(SetPartyCommand.gettingParty){ - if(message.contains("-----------------------------")){ - switch(SetPartyCommand.delimiter){ - case 0: - System.out.println("Delimiter Cancelled"); - SetPartyCommand.delimiter++; - event.setCanceled(true); - return; - case 1: - System.out.println("Done Querying Party"); - SetPartyCommand.gettingParty = false; - SetPartyCommand.delimiter = 0; - event.setCanceled(true); - return; - } - } else if(message.contains("Party M")){ - // Looks for number between parentheses - Matcher members = (Pattern.compile("^.*?\\([^\\d]*(\\d+)[^\\d]*\\).*$")).matcher(message); - if(members.find()){ - System.out.println("Number of members read: " + members.group(1)); - event.setCanceled(true); - return; - } - System.out.println("Reading Party"); - SetPartyCommand.partyResponse += message.substring(message.indexOf(":") + 2); - event.setCanceled(true); - return; - } else if (message.contains("Party Leader")){ - event.setCanceled(true); - return; - } - } - + if (!Utils.inSkyblock) return; - + // Action Bar if (event.type == 2) { String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); @@ -487,7 +449,7 @@ public class DankersSkyblockMod System.err.println("Unknown skill."); } } - + if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) { String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); @@ -502,7 +464,7 @@ public class DankersSkyblockMod } int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit); double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D; - + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); skillTimer = SKILL_TIME; showSkill = true; @@ -512,7 +474,7 @@ public class DankersSkyblockMod } return; } - + // Dungeon chat spoken by an NPC, containing : if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) { for (String solution : riddleSolutions) { @@ -523,7 +485,7 @@ public class DankersSkyblockMod } } } - + if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { watcherClearTime = System.currentTimeMillis() / 1000; } @@ -533,9 +495,9 @@ public class DankersSkyblockMod if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { puzzleFails++; } - + if (message.contains(":")) return; - + // Spirit Sceptre if (!ToggleCommand.sceptreMessages && message.contains("Your Spirit Sceptre hit ")) { event.setCanceled(true); @@ -568,18 +530,18 @@ public class DankersSkyblockMod return; } } - + if (ToggleCommand.oruoToggled && Utils.inDungeons) { // Don't set every answer to wrong with this question if (message.contains("What SkyBlock year is it?")) triviaAnswers = null; - + for (String question : triviaSolutions.keySet()) { if (message.contains(question)) { triviaAnswers = triviaSolutions.get(question); break; } } - + // Set wrong answers to red and remove click events if (triviaAnswers != null && (message.contains("ⓐ") || message.contains("ⓑ") || message.contains("ⓒ"))) { boolean isSolution = false; @@ -597,7 +559,7 @@ public class DankersSkyblockMod } } } - + if (ToggleCommand.gpartyToggled) { if (message.contains(" has invited all members of ")) { try { @@ -614,18 +576,18 @@ public class DankersSkyblockMod } } } - + if (ToggleCommand.golemAlertToggled) { if (message.contains("The ground begins to shake as an Endstone Protector rises from below!")) { Utils.createTitle(EnumChatFormatting.RED + "GOLEM SPAWNING!", 3); } } - + if (message.contains("Yum! You gain +") && message.contains(" for 48 hours!")) { cakeTime = System.currentTimeMillis() / 1000 + 172800; // Add 48 hours ConfigHandler.writeDoubleConfig("misc", "cakeTime", cakeTime); } - + boolean wolfRNG = false; boolean spiderRNG = false; boolean zombieRNG = false; @@ -853,7 +815,7 @@ public class DankersSkyblockMod increaseSeaCreatures(); } else if (message.contains("The Sea Emperor arises from the depths")) { increaseSeaCreatures(); - + LootCommand.seaEmperors++; LootCommand.empTime = System.currentTimeMillis() / 1000; LootCommand.empSCs = 0; @@ -996,7 +958,7 @@ public class DankersSkyblockMod } } } - + if (wolfRNG) { LootCommand.wolfTime = System.currentTimeMillis() / 1000; LootCommand.wolfBosses = 0; @@ -1021,7 +983,7 @@ public class DankersSkyblockMod ConfigHandler.writeDoubleConfig("zombie", "timeRNG", LootCommand.zombieTime); ConfigHandler.writeIntConfig("zombie", "bossRNG", 0); } - + // Mythological Tracker if (message.contains("You dug out")) { if (message.contains(" coins!")) { @@ -1067,7 +1029,7 @@ public class DankersSkyblockMod ConfigHandler.writeIntConfig("mythological", "minosInquisitor", LootCommand.minosInquisitors); } } - + // Dungeons Trackers if (message.contains(" ")) { if (message.contains("Recombobulator 3000")) { @@ -1129,7 +1091,7 @@ public class DankersSkyblockMod LootCommand.legSpiritPets++; LootCommand.legSpiritPetsSession++; ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", LootCommand.legSpiritPets); - } + } } else if (message.contains("Spirit Sword")) { LootCommand.spiritSwords++; LootCommand.spiritSwordsSession++; @@ -1244,7 +1206,7 @@ public class DankersSkyblockMod ConfigHandler.writeIntConfig("catacombs", "witherBoot", LootCommand.witherBoots); } } - + // Chat Maddox if (message.contains("[OPEN MENU]")) { List listOfSiblings = event.message.getSiblings(); @@ -1256,20 +1218,20 @@ public class DankersSkyblockMod } if (ToggleCommand.chatMaddoxToggled) Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Open chat then click anywhere on-screen to open Maddox")); } - + // Spirit Bear alerts if (ToggleCommand.spiritBearAlerts && message.contains("The Spirit Bear has appeared!")) { Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "SPIRIT BEAR", 2); } } - + @SubscribeEvent public void renderPlayerInfo(final RenderGameOverlayEvent.Post event) { if (usingLabymod && !(Minecraft.getMinecraft().ingameGUI instanceof GuiIngameForge)) return; if (event.type != RenderGameOverlayEvent.ElementType.EXPERIENCE && event.type != RenderGameOverlayEvent.ElementType.JUMPBAR) return; renderEverything(); } - + // LabyMod Support @SubscribeEvent public void renderPlayerInfoLabyMod(final RenderGameOverlayEvent event) { @@ -1277,24 +1239,24 @@ public class DankersSkyblockMod if (event.type != null) return; renderEverything(); } - + public void renderEverything() { if (Minecraft.getMinecraft().currentScreen instanceof EditLocationsGui) return; Minecraft mc = Minecraft.getMinecraft(); - + if (ToggleCommand.coordsToggled) { EntityPlayer player = mc.thePlayer; - + double xDir = (player.rotationYaw % 360 + 360) % 360; if (xDir > 180) xDir -= 360; xDir = (double) Math.round(xDir * 10d) / 10d; double yDir = (double) Math.round(player.rotationPitch * 10d) / 10d; - + String coordText = COORDS_COLOUR + (int) player.posX + " / " + (int) player.posY + " / " + (int) player.posZ + " (" + xDir + " / " + yDir + ")"; new TextRenderer(mc, coordText, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], ScaleCommand.coordsScale); } - + if (ToggleCommand.dungeonTimerToggled && Utils.inDungeons) { String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + EnumChatFormatting.DARK_RED + "Blood Open:\n" + @@ -1311,20 +1273,20 @@ public class DankersSkyblockMod new TextRenderer(mc, dungeonTimerText, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); new TextRenderer(mc, dungeonTimers, (int) (MoveCommand.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); } - + if (ToggleCommand.lividSolverToggled && foundLivid && livid != null) { new TextRenderer(mc, livid.getName().replace("" + EnumChatFormatting.BOLD, ""), MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], ScaleCommand.lividHpScale); } - + if (ToggleCommand.cakeTimerToggled && Utils.inSkyblock) { double scale = ScaleCommand.cakeTimerScale; double scaleReset = Math.pow(scale, -1); GL11.glScaled(scale, scale, scale); - + double timeNow = System.currentTimeMillis() / 1000; mc.getTextureManager().bindTexture(CAKE_ICON); Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16); - + String cakeText; if (cakeTime - timeNow < 0) { cakeText = EnumChatFormatting.RED + "NONE"; @@ -1332,10 +1294,10 @@ public class DankersSkyblockMod cakeText = CAKE_COLOUR + Utils.getTimeBetween(timeNow, cakeTime); } new TextRenderer(mc, cakeText, MoveCommand.cakeTimerXY[0] + 20, MoveCommand.cakeTimerXY[1] + 5, 1); - + GL11.glScaled(scaleReset, scaleReset, scaleReset); } - + if (showSkillTracker && Utils.inSkyblock) { int xpPerHour; double xpToShow = 0; @@ -1375,7 +1337,7 @@ public class DankersSkyblockMod if (!skillStopwatch.isStarted() || skillStopwatch.isSuspended()) { skillTrackerText += "\n" + EnumChatFormatting.RED + "PAUSED"; } - + new TextRenderer(mc, skillTrackerText, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], ScaleCommand.skillTrackerScale); } @@ -1393,7 +1355,7 @@ public class DankersSkyblockMod String drop20; double timeNow = System.currentTimeMillis() / 1000; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); - + switch (DisplayCommand.display) { case "wolf": if (LootCommand.wolfTime == -1) { @@ -1411,11 +1373,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.wolfWheelsDrops) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + EnumChatFormatting.WHITE + "Critical VI Books:\n" + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + EnumChatFormatting.GOLD + "Couture Runes:\n" + @@ -1426,7 +1388,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvens) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeeth) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + EnumChatFormatting.WHITE + LootCommand.wolfBooks + "\n" + EnumChatFormatting.DARK_RED + LootCommand.wolfEggs + "\n" + EnumChatFormatting.GOLD + LootCommand.wolfCoutures + "\n" + @@ -1451,11 +1413,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.wolfWheelsDropsSession) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + EnumChatFormatting.WHITE + "Critical VI Books:\n" + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + EnumChatFormatting.GOLD + "Couture Runes:\n" + @@ -1466,7 +1428,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvensSession) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeethSession) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + EnumChatFormatting.WHITE + LootCommand.wolfBooksSession + "\n" + EnumChatFormatting.DARK_RED + LootCommand.wolfEggsSession + "\n" + EnumChatFormatting.GOLD + LootCommand.wolfCouturesSession + "\n" + @@ -1491,11 +1453,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.spiderTAPDrops) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + EnumChatFormatting.WHITE + "Bane VI Books:\n" + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + @@ -1506,7 +1468,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulas) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebs) + "\n" + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + EnumChatFormatting.WHITE + LootCommand.spiderBooks + "\n" + EnumChatFormatting.AQUA + LootCommand.spiderCatalysts + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismans + "\n" + @@ -1531,11 +1493,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.spiderTAPDropsSession) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + EnumChatFormatting.WHITE + "Bane VI Books:\n" + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + @@ -1546,7 +1508,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulasSession) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebsSession) + "\n" + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + EnumChatFormatting.WHITE + LootCommand.spiderBooksSession + "\n" + EnumChatFormatting.AQUA + LootCommand.spiderCatalystsSession + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismansSession + "\n" + @@ -1571,11 +1533,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.zombieFoulFleshDrops) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + EnumChatFormatting.WHITE + "Smite VI Books:\n" + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + @@ -1587,7 +1549,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevs) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFlesh) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + EnumChatFormatting.WHITE + LootCommand.zombieBooks + "\n" + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatas + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadeds + "\n" + @@ -1613,11 +1575,11 @@ public class DankersSkyblockMod } else { drop20 = nf.format(LootCommand.zombieFoulFleshDropsSession) + " times"; } - + dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + EnumChatFormatting.WHITE + "Smite VI Books:\n" + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + @@ -1629,7 +1591,7 @@ public class DankersSkyblockMod countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevsSession) + "\n" + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFleshSession) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + EnumChatFormatting.WHITE + LootCommand.zombieBooksSession + "\n" + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatasSession + "\n" + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadedsSession + "\n" + @@ -1650,7 +1612,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.empSCs); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -1692,7 +1654,7 @@ public class DankersSkyblockMod EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperors) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; - + if (ToggleCommand.splitFishing) { new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); @@ -1712,7 +1674,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.empSCsSession); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -1754,7 +1716,7 @@ public class DankersSkyblockMod EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperorsSession) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; - + if (ToggleCommand.splitFishing) { new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); new TextRenderer(mc, countTextTwo, (int) (MoveCommand.displayXY[0] + (270 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); @@ -1774,7 +1736,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.yetiSCs); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -1807,7 +1769,7 @@ public class DankersSkyblockMod } else { bossesBetween = nf.format(LootCommand.yetiSCsSession); } - + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + EnumChatFormatting.GOLD + "Good Catches:\n" + @@ -2261,7 +2223,7 @@ public class DankersSkyblockMod new TextRenderer(mc, dropsText, MoveCommand.displayXY[0], MoveCommand.displayXY[1], ScaleCommand.displayScale); new TextRenderer(mc, countText, (int) (MoveCommand.displayXY[0] + (110 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); } - + if (showTitle) { Utils.drawTitle(titleText); } @@ -2269,17 +2231,17 @@ public class DankersSkyblockMod new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale); } } - + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSound(final PlaySoundEvent event) { if (!Utils.inSkyblock) return; if (event.name.equals("note.pling")) { - // Don't check twice within 3 seconds + // Don't check twice within 3 seconds checkItemsNow = System.currentTimeMillis() / 1000; if (checkItemsNow - itemsChecked < 3) return; - + List scoreboard = ScoreboardHandler.getSidebarLines(); - + for (String line : scoreboard) { String cleanedLine = ScoreboardHandler.cleanSB(line); // If Hypixel lags and scoreboard doesn't update @@ -2290,7 +2252,7 @@ public class DankersSkyblockMod int itemTAP = Utils.getItems("Toxic Arrow Poison"); int itemRev = Utils.getItems("Revenant Flesh"); int itemFoul = Utils.getItems("Foul Flesh"); - + // If no items, are detected, allow check again. Should fix items not being found if (itemTeeth + itemWheels + itemWebs + itemTAP + itemRev + itemFoul > 0) { itemsChecked = System.currentTimeMillis() / 1000; @@ -2306,7 +2268,7 @@ public class DankersSkyblockMod LootCommand.spiderTAPSession += itemTAP; LootCommand.zombieRevFleshSession += itemRev; LootCommand.zombieFoulFleshSession += itemFoul; - + ConfigHandler.writeIntConfig("wolf", "teeth", LootCommand.wolfTeeth); ConfigHandler.writeIntConfig("wolf", "wheel", LootCommand.wolfWheels); ConfigHandler.writeIntConfig("spider", "web", LootCommand.spiderWebs); @@ -2318,12 +2280,12 @@ public class DankersSkyblockMod } } } - + @SubscribeEvent(priority = EventPriority.HIGHEST) public void onTooltip(ItemTooltipEvent event) { if (!Utils.inSkyblock) return; if (event.toolTip == null) return; - + ItemStack item = event.itemStack; Minecraft mc = Minecraft.getMinecraft(); EntityPlayerSP player = mc.thePlayer; @@ -2333,7 +2295,7 @@ public class DankersSkyblockMod event.toolTip.set(i, Utils.returnGoldenEnchants(event.toolTip.get(i))); } } - + if (ToggleCommand.expertiseLoreToggled) { if (item.hasTagCompound()) { NBTTagCompound tags = item.getSubCompound("ExtraAttributes", false); @@ -2341,7 +2303,7 @@ public class DankersSkyblockMod if (tags.hasKey("expertise_kills")) { int index = 4; if (!Minecraft.getMinecraft().gameSettings.advancedItemTooltips) index -= 2; - + event.toolTip.add(event.toolTip.size() - index, ""); event.toolTip.add(event.toolTip.size() - index, "Expertise Kills: " + EnumChatFormatting.RED + tags.getInteger("expertise_kills")); if (Utils.expertiseKillsLeft(tags.getInteger("expertise_kills")) != -1) { @@ -3025,32 +2987,9 @@ public class DankersSkyblockMod @SubscribeEvent public void onKey(KeyInputEvent event) { - - - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - - //Check for pressing O to read party - if(keyBindings[3].isPressed()){ - SetPartyCommand.getParty(); - } - - // Check for pressing P for reparty - if (keyBindings[2].isPressed()) { - if(!SetPartyCommand.set){ - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + SetPartyCommand.getUsage())); - return; - } - - String members = String.join("\n" + EnumChatFormatting.GOLD, RepartyCommand.players); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.RED + EnumChatFormatting.BOLD + "Repartying: \n" + - EnumChatFormatting.GOLD + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + EnumChatFormatting.BOLD + "-------------------")); - RepartyCommand.processCommand(); - } - if (!Utils.inSkyblock) return; + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; if (keyBindings[0].isPressed()) { player.sendChatMessage(lastMaddoxCommand); } @@ -3066,7 +3005,6 @@ public class DankersSkyblockMod player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker paused.")); } } - } @SubscribeEvent diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java deleted file mode 100644 index d3ac7f0..0000000 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ /dev/null @@ -1,60 +0,0 @@ -package me.Danker.commands; - -import me.Danker.DankersSkyblockMod; -import net.minecraft.client.Minecraft; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChatComponentText; - -public class RepartyCommand extends CommandBase implements ICommand { - public static String[] players; - - @Override - public String getCommandName() { return "reparty"; } - - @Override - public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName(); } - - @Override - public int getRequiredPermissionLevel() { return 0; } - - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - - final EntityPlayer player = (EntityPlayer) sender; - - if(!SetPartyCommand.set){ - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); - return; - } - try{ - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); - Thread.sleep(210); - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - } - - public static void processCommand() { - - if(!SetPartyCommand.set){ - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Party unset! use " + SetPartyCommand.getUsage())); - return; - } - (new Thread(() -> { - try{ - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p disband"); - Thread.sleep(210); - Minecraft.getMinecraft().thePlayer.sendChatMessage("/p " + String.join(" ",players)); - } catch (InterruptedException e) { - e.printStackTrace(); - } - })).start(); - - } -} diff --git a/src/main/java/me/Danker/commands/SetPartyCommand.java b/src/main/java/me/Danker/commands/SetPartyCommand.java deleted file mode 100644 index 40551d3..0000000 --- a/src/main/java/me/Danker/commands/SetPartyCommand.java +++ /dev/null @@ -1,66 +0,0 @@ -package me.Danker.commands; - -import me.Danker.DankersSkyblockMod; -import net.minecraft.client.Minecraft; -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommand; -import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.EnumChatFormatting; - -import java.util.Arrays; - -public class SetPartyCommand extends CommandBase implements ICommand { - - public static boolean set = false; - public static int delimiter = 0; - public static boolean gettingParty; - public static String partyResponse = ""; - - @Override - public String getCommandName() { return "setparty"; } - public static String getName() { return "setparty"; } - - @Override - public String getCommandUsage(ICommandSender sender) { return "/" + getCommandName() + " "; } - public static String getUsage(){ return "/" + getName() + " "; } - - @Override - public int getRequiredPermissionLevel() { return 0; } - - @Override - public void processCommand(ICommandSender sender, String[] args) throws CommandException { - final EntityPlayer player = (EntityPlayer) sender; - - if(args.length == 0) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Usage: " + getCommandUsage(sender))); - return; - } - - RepartyCommand.players = args; - - String members = String.join("\n" + EnumChatFormatting.GOLD,RepartyCommand.players); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.GOLD + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------")); - - set = true; - } - - public static void getParty() { - gettingParty = true; - partyResponse = ""; - Minecraft.getMinecraft().thePlayer.sendChatMessage("/pl"); - (new Thread(() ->{ - try{ - Thread.sleep(500); - RepartyCommand.players = Arrays.stream(partyResponse.split(" ")).filter(e -> !e.contains("[") && !e.contains("●")).toArray(String[]::new); - set = true; - } catch (InterruptedException e) { - e.printStackTrace(); - } - })).start(); - } -} -- cgit From 822bccd3221eab32a4bdd5c1e800ba37c262d44f Mon Sep 17 00:00:00 2001 From: flame-cat Date: Wed, 23 Dec 2020 17:13:20 -0500 Subject: Remove Msgs From Auto Skill Tracker Remove the chat messages when the skill tracker automatically starts/stops. If they're using the feature, they'll have the tracker shown anyway --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index d239e3e..a6cc772 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -381,6 +381,9 @@ public class DankersSkyblockMod } else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); + } + else if (message.Contains("Couldn't find a player") || message.Contains("cannot invite that player")) { + } else { while (members.find()) { @@ -407,10 +410,8 @@ public class DankersSkyblockMod if (ToggleCommand.autoSkillTrackerToggled && System.currentTimeMillis() / 1000 - timeSinceGained <= 2) { if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { skillStopwatch.resume(); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); } else if (!skillStopwatch.isStarted()) { skillStopwatch.start(); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker started.")); } } timeSinceGained = System.currentTimeMillis() / 1000; @@ -3292,7 +3293,6 @@ public class DankersSkyblockMod if (ToggleCommand.autoSkillTrackerToggled) { if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) { skillStopwatch.suspend(); - mc.thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Skill tracker paused.")); } } -- cgit From 37db4519a15bdb3571d42eca84a1d4641de89e8b Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 24 Dec 2020 00:39:05 -0500 Subject: Fix indents for multiline strings --- src/main/java/me/Danker/DankersSkyblockMod.java | 1188 +++++++++++------------ 1 file changed, 594 insertions(+), 594 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 798c0fe..191d587 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -323,7 +323,7 @@ public class DankersSkyblockMod { IChatComponent chatComponent = new ChatComponentText( EnumChatFormatting.GOLD + "Thank you for downloading Danker's Skyblock Mod.\n" + - "To get started, run the command " + EnumChatFormatting.GOLD + "/dsm" + EnumChatFormatting.RESET + " to view all the mod features." + "To get started, run the command " + EnumChatFormatting.GOLD + "/dsm" + EnumChatFormatting.RESET + " to view all the mod features." ); chatComponent.setChatStyle(chatComponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText("Click to open the DSM menu."))).setChatClickEvent(new ClickEvent(Action.RUN_COMMAND, "/dsm"))); @@ -1344,17 +1344,17 @@ public class DankersSkyblockMod { if (ToggleCommand.dungeonTimerToggled && Utils.inDungeons) { String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + - EnumChatFormatting.DARK_RED + "Blood Open:\n" + - EnumChatFormatting.RED + "Watcher Clear:\n" + - EnumChatFormatting.BLUE + "Boss Clear:\n" + - EnumChatFormatting.YELLOW + "Deaths:\n" + - EnumChatFormatting.YELLOW + "Puzzle Fails:"; + EnumChatFormatting.DARK_RED + "Blood Open:\n" + + EnumChatFormatting.RED + "Watcher Clear:\n" + + EnumChatFormatting.BLUE + "Boss Clear:\n" + + EnumChatFormatting.YELLOW + "Deaths:\n" + + EnumChatFormatting.YELLOW + "Puzzle Fails:"; String dungeonTimers = EnumChatFormatting.GRAY + "" + witherDoors + "\n" + - EnumChatFormatting.DARK_RED + Utils.getTimeBetween(dungeonStartTime, bloodOpenTime) + "\n" + - EnumChatFormatting.RED + Utils.getTimeBetween(dungeonStartTime, watcherClearTime) + "\n" + - EnumChatFormatting.BLUE + Utils.getTimeBetween(dungeonStartTime, bossClearTime) + "\n" + - EnumChatFormatting.YELLOW + dungeonDeaths + "\n" + - EnumChatFormatting.YELLOW + puzzleFails; + EnumChatFormatting.DARK_RED + Utils.getTimeBetween(dungeonStartTime, bloodOpenTime) + "\n" + + EnumChatFormatting.RED + Utils.getTimeBetween(dungeonStartTime, watcherClearTime) + "\n" + + EnumChatFormatting.BLUE + Utils.getTimeBetween(dungeonStartTime, bossClearTime) + "\n" + + EnumChatFormatting.YELLOW + dungeonDeaths + "\n" + + EnumChatFormatting.YELLOW + puzzleFails; new TextRenderer(mc, dungeonTimerText, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); new TextRenderer(mc, dungeonTimers, (int) (MoveCommand.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), MoveCommand.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); } @@ -1438,8 +1438,8 @@ public class DankersSkyblockMod { } xpPerHour = (int) Math.round(xpToShow / ((skillStopwatch.getTime() + 1) / 3600000d)); String skillTrackerText = SKILL_TRACKER_COLOUR + lastSkill + " XP Earned: " + NumberFormat.getNumberInstance(Locale.US).format(xpToShow) + "\n" + - SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, skillStopwatch.getTime() / 1000d) + "\n" + - SKILL_TRACKER_COLOUR + "XP Per Hour: " + NumberFormat.getIntegerInstance(Locale.US).format(xpPerHour); + SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, skillStopwatch.getTime() / 1000d) + "\n" + + SKILL_TRACKER_COLOUR + "XP Per Hour: " + NumberFormat.getIntegerInstance(Locale.US).format(xpPerHour); if (xpLeft >= 0) { String time = xpPerHour == 0 ? "Never" : Utils.getTimeBetween(0, xpLeft / (xpPerHour / 3600D)); skillTrackerText += "\n" + SKILL_TRACKER_COLOUR + "Time Until Next Level: " + time; @@ -1485,27 +1485,27 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + - EnumChatFormatting.GREEN + "Wolf Teeth:\n" + - EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + - EnumChatFormatting.WHITE + "Critical VI Books:\n" + - EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + - EnumChatFormatting.GOLD + "Couture Runes:\n" + - EnumChatFormatting.AQUA + "Grizzly Baits:\n" + - EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.WHITE + "Critical VI Books:\n" + + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + + EnumChatFormatting.GOLD + "Couture Runes:\n" + + EnumChatFormatting.AQUA + "Grizzly Baits:\n" + + EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvens) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeeth) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + - EnumChatFormatting.WHITE + LootCommand.wolfBooks + "\n" + - EnumChatFormatting.DARK_RED + LootCommand.wolfEggs + "\n" + - EnumChatFormatting.GOLD + LootCommand.wolfCoutures + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfBaits + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxes + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeeth) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpirits + "\n" + + EnumChatFormatting.WHITE + LootCommand.wolfBooks + "\n" + + EnumChatFormatting.DARK_RED + LootCommand.wolfEggs + "\n" + + EnumChatFormatting.GOLD + LootCommand.wolfCoutures + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfBaits + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxes + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "wolf_session": if (LootCommand.wolfTimeSession == -1) { @@ -1525,27 +1525,27 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + - EnumChatFormatting.GREEN + "Wolf Teeth:\n" + - EnumChatFormatting.BLUE + "Hamster Wheels:\n" + - EnumChatFormatting.AQUA + "Spirit Runes:\n" + - EnumChatFormatting.WHITE + "Critical VI Books:\n" + - EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + - EnumChatFormatting.GOLD + "Couture Runes:\n" + - EnumChatFormatting.AQUA + "Grizzly Baits:\n" + - EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; + EnumChatFormatting.GREEN + "Wolf Teeth:\n" + + EnumChatFormatting.BLUE + "Hamster Wheels:\n" + + EnumChatFormatting.AQUA + "Spirit Runes:\n" + + EnumChatFormatting.WHITE + "Critical VI Books:\n" + + EnumChatFormatting.DARK_RED + "Red Claw Eggs:\n" + + EnumChatFormatting.GOLD + "Couture Runes:\n" + + EnumChatFormatting.AQUA + "Grizzly Baits:\n" + + EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.wolfSvensSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeethSession) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + - EnumChatFormatting.WHITE + LootCommand.wolfBooksSession + "\n" + - EnumChatFormatting.DARK_RED + LootCommand.wolfEggsSession + "\n" + - EnumChatFormatting.GOLD + LootCommand.wolfCouturesSession + "\n" + - EnumChatFormatting.AQUA + LootCommand.wolfBaitsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxesSession + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.GREEN + nf.format(LootCommand.wolfTeethSession) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfSpiritsSession + "\n" + + EnumChatFormatting.WHITE + LootCommand.wolfBooksSession + "\n" + + EnumChatFormatting.DARK_RED + LootCommand.wolfEggsSession + "\n" + + EnumChatFormatting.GOLD + LootCommand.wolfCouturesSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.wolfBaitsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.wolfFluxesSession + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "spider": if (LootCommand.spiderTime == -1) { @@ -1565,27 +1565,27 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + - EnumChatFormatting.GREEN + "Tarantula Webs:\n" + - EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + - EnumChatFormatting.WHITE + "Bane VI Books:\n" + - EnumChatFormatting.AQUA + "Spider Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + - EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.WHITE + "Bane VI Books:\n" + + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + + EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulas) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebs) + "\n" + - EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + - EnumChatFormatting.WHITE + LootCommand.spiderBooks + "\n" + - EnumChatFormatting.AQUA + LootCommand.spiderCatalysts + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismans + "\n" + - EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwatters + "\n" + - EnumChatFormatting.GOLD + LootCommand.spiderMosquitos + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebs) + "\n" + + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBites + "\n" + + EnumChatFormatting.WHITE + LootCommand.spiderBooks + "\n" + + EnumChatFormatting.AQUA + LootCommand.spiderCatalysts + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismans + "\n" + + EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwatters + "\n" + + EnumChatFormatting.GOLD + LootCommand.spiderMosquitos + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "spider_session": if (LootCommand.spiderTimeSession == -1) { @@ -1605,27 +1605,27 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + - EnumChatFormatting.GREEN + "Tarantula Webs:\n" + - EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + - EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + - EnumChatFormatting.WHITE + "Bane VI Books:\n" + - EnumChatFormatting.AQUA + "Spider Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + - EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; + EnumChatFormatting.GREEN + "Tarantula Webs:\n" + + EnumChatFormatting.DARK_GREEN + "Arrow Poison:\n" + + EnumChatFormatting.DARK_GRAY + "Bite Runes:\n" + + EnumChatFormatting.WHITE + "Bane VI Books:\n" + + EnumChatFormatting.AQUA + "Spider Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Tarantula Talismans:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Fly Swatters:\n" + + EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.spiderTarantulasSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebsSession) + "\n" + - EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + - EnumChatFormatting.WHITE + LootCommand.spiderBooksSession + "\n" + - EnumChatFormatting.AQUA + LootCommand.spiderCatalystsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismansSession + "\n" + - EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwattersSession + "\n" + - EnumChatFormatting.GOLD + LootCommand.spiderMosquitosSession + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.GREEN + nf.format(LootCommand.spiderWebsSession) + "\n" + + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + + EnumChatFormatting.DARK_GRAY + LootCommand.spiderBitesSession + "\n" + + EnumChatFormatting.WHITE + LootCommand.spiderBooksSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.spiderCatalystsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.spiderTalismansSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + LootCommand.spiderSwattersSession + "\n" + + EnumChatFormatting.GOLD + LootCommand.spiderMosquitosSession + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "zombie": if (LootCommand.zombieTime == -1) { @@ -1645,29 +1645,29 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + - EnumChatFormatting.GREEN + "Revenant Flesh:\n" + - EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + - EnumChatFormatting.WHITE + "Smite VI Books:\n" + - EnumChatFormatting.AQUA + "Undead Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + - EnumChatFormatting.RED + "Revenant Catalysts:\n" + - EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + - EnumChatFormatting.GOLD + "Scythe Blades:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + + EnumChatFormatting.BLUE + "Foul Flesh:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.WHITE + "Smite VI Books:\n" + + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + + EnumChatFormatting.RED + "Revenant Catalysts:\n" + + EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + + EnumChatFormatting.GOLD + "Scythe Blades:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevs) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFlesh) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + - EnumChatFormatting.WHITE + LootCommand.zombieBooks + "\n" + - EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatas + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadeds + "\n" + - EnumChatFormatting.RED + LootCommand.zombieRevCatas + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakes + "\n" + - EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFlesh) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilences + "\n" + + EnumChatFormatting.WHITE + LootCommand.zombieBooks + "\n" + + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatas + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadeds + "\n" + + EnumChatFormatting.RED + LootCommand.zombieRevCatas + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakes + "\n" + + EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "zombie_session": if (LootCommand.zombieTimeSession == -1) { @@ -1687,29 +1687,29 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + - EnumChatFormatting.GREEN + "Revenant Flesh:\n" + - EnumChatFormatting.BLUE + "Foul Flesh:\n" + - EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + - EnumChatFormatting.WHITE + "Smite VI Books:\n" + - EnumChatFormatting.AQUA + "Undead Catalysts:\n" + - EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + - EnumChatFormatting.RED + "Revenant Catalysts:\n" + - EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + - EnumChatFormatting.GOLD + "Scythe Blades:\n" + - EnumChatFormatting.AQUA + "Time Since RNG:\n" + - EnumChatFormatting.AQUA + "Bosses Since RNG:"; + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + + EnumChatFormatting.BLUE + "Foul Flesh:\n" + + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + + EnumChatFormatting.WHITE + "Smite VI Books:\n" + + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + + EnumChatFormatting.RED + "Revenant Catalysts:\n" + + EnumChatFormatting.DARK_GREEN + "Snake Runes:\n" + + EnumChatFormatting.GOLD + "Scythe Blades:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.zombieRevsSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFleshSession) + "\n" + - EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + - EnumChatFormatting.WHITE + LootCommand.zombieBooksSession + "\n" + - EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatasSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadedsSession + "\n" + - EnumChatFormatting.RED + LootCommand.zombieRevCatasSession + "\n" + - EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakesSession + "\n" + - EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.GREEN + nf.format(LootCommand.zombieRevFleshSession) + "\n" + + EnumChatFormatting.BLUE + drop20 + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombiePestilencesSession + "\n" + + EnumChatFormatting.WHITE + LootCommand.zombieBooksSession + "\n" + + EnumChatFormatting.AQUA + LootCommand.zombieUndeadCatasSession + "\n" + + EnumChatFormatting.DARK_PURPLE + LootCommand.zombieBeheadedsSession + "\n" + + EnumChatFormatting.RED + LootCommand.zombieRevCatasSession + "\n" + + EnumChatFormatting.DARK_GREEN + LootCommand.zombieSnakesSession + "\n" + + EnumChatFormatting.GOLD + LootCommand.zombieScythes + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "fishing": if (LootCommand.empTime == -1) { @@ -1724,46 +1724,46 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.GRAY + "Squids:\n" + - EnumChatFormatting.GREEN + "Sea Walkers:\n" + - EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + - EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + - EnumChatFormatting.BLUE + "Sea Witches:\n" + - EnumChatFormatting.GREEN + "Sea Archers:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.GRAY + "Squids:\n" + + EnumChatFormatting.GREEN + "Sea Walkers:\n" + + EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + + EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + + EnumChatFormatting.BLUE + "Sea Witches:\n" + + EnumChatFormatting.GREEN + "Sea Archers:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.squids) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkers) + "\n" + - EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquids) + "\n" + - EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardians) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitches) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchers); + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.squids) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkers) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquids) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardians) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitches) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchers); // Seperated to save vertical space dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + - EnumChatFormatting.YELLOW + "Catfishes:\n" + - EnumChatFormatting.GOLD + "Carrot Kings:\n" + - EnumChatFormatting.GRAY + "Sea Leeches:\n" + - EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + - EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + - EnumChatFormatting.GOLD + "Hydras:\n" + - EnumChatFormatting.GOLD + "Sea Emperors:\n" + - EnumChatFormatting.AQUA + "Time Since Emp:\n" + - EnumChatFormatting.AQUA + "Creatures Since Emp:"; + EnumChatFormatting.YELLOW + "Catfishes:\n" + + EnumChatFormatting.GOLD + "Carrot Kings:\n" + + EnumChatFormatting.GRAY + "Sea Leeches:\n" + + EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + + EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + + EnumChatFormatting.GOLD + "Hydras:\n" + + EnumChatFormatting.GOLD + "Sea Emperors:\n" + + EnumChatFormatting.AQUA + "Time Since Emp:\n" + + EnumChatFormatting.AQUA + "Creatures Since Emp:"; countTextTwo = EnumChatFormatting.GREEN + nf.format(LootCommand.monsterOfTheDeeps) + "\n" + - EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishes) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKings) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeeches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefenders) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectors) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.hydras) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperors) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishes) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKings) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeeches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefenders) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectors) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.hydras) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperors) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; if (ToggleCommand.splitFishing) { new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); @@ -1786,46 +1786,46 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.GRAY + "Squids:\n" + - EnumChatFormatting.GREEN + "Sea Walkers:\n" + - EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + - EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + - EnumChatFormatting.BLUE + "Sea Witches:\n" + - EnumChatFormatting.GREEN + "Sea Archers:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.GRAY + "Squids:\n" + + EnumChatFormatting.GREEN + "Sea Walkers:\n" + + EnumChatFormatting.DARK_GRAY + "Night Squids:\n" + + EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + + EnumChatFormatting.BLUE + "Sea Witches:\n" + + EnumChatFormatting.GREEN + "Sea Archers:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.squidsSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkersSession) + "\n" + - EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquidsSession) + "\n" + - EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardiansSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitchesSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchersSession); + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.squidsSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaWalkersSession) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(LootCommand.nightSquidsSession) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(LootCommand.seaGuardiansSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.seaWitchesSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(LootCommand.seaArchersSession); // Seperated to save vertical space dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + - EnumChatFormatting.YELLOW + "Catfishes:\n" + - EnumChatFormatting.GOLD + "Carrot Kings:\n" + - EnumChatFormatting.GRAY + "Sea Leeches:\n" + - EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + - EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + - EnumChatFormatting.GOLD + "Hydras:\n" + - EnumChatFormatting.GOLD + "Sea Emperors:\n" + - EnumChatFormatting.AQUA + "Time Since Emp:\n" + - EnumChatFormatting.AQUA + "Creatures Since Emp:"; + EnumChatFormatting.YELLOW + "Catfishes:\n" + + EnumChatFormatting.GOLD + "Carrot Kings:\n" + + EnumChatFormatting.GRAY + "Sea Leeches:\n" + + EnumChatFormatting.DARK_PURPLE + "Guardian Defenders:\n" + + EnumChatFormatting.DARK_PURPLE + "Deep Sea Protectors:\n" + + EnumChatFormatting.GOLD + "Hydras:\n" + + EnumChatFormatting.GOLD + "Sea Emperors:\n" + + EnumChatFormatting.AQUA + "Time Since Emp:\n" + + EnumChatFormatting.AQUA + "Creatures Since Emp:"; countTextTwo = EnumChatFormatting.GREEN + nf.format(LootCommand.monsterOfTheDeepsSession) + "\n" + - EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKingsSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeechesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefendersSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectorsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.hydrasSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperorsSession) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.YELLOW + nf.format(LootCommand.catfishesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.carrotKingsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.seaLeechesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.guardianDefendersSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.deepSeaProtectorsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.hydrasSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.seaEmperorsSession) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; if (ToggleCommand.splitFishing) { new TextRenderer(mc, dropsTextTwo, (int) (MoveCommand.displayXY[0] + (160 * ScaleCommand.displayScale)), MoveCommand.displayXY[1], ScaleCommand.displayScale); @@ -1848,25 +1848,25 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.AQUA + "Frozen Steves:\n" + - EnumChatFormatting.WHITE + "Snowmans:\n" + - EnumChatFormatting.DARK_GREEN + "Grinches:\n" + - EnumChatFormatting.GOLD + "Yetis:\n" + - EnumChatFormatting.AQUA + "Time Since Yeti:\n" + - EnumChatFormatting.AQUA + "Creatures Since Yeti:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.AQUA + "Frozen Steves:\n" + + EnumChatFormatting.WHITE + "Snowmans:\n" + + EnumChatFormatting.DARK_GREEN + "Grinches:\n" + + EnumChatFormatting.GOLD + "Yetis:\n" + + EnumChatFormatting.AQUA + "Time Since Yeti:\n" + + EnumChatFormatting.AQUA + "Creatures Since Yeti:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.frozenSteves) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmans) + "\n" + - EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinches) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.yetis) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.frozenSteves) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmans) + "\n" + + EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinches) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.yetis) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "fishing_winter_session": if (LootCommand.yetiTimeSession == -1) { @@ -1881,449 +1881,449 @@ public class DankersSkyblockMod { } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.AQUA + "Frozen Steves:\n" + - EnumChatFormatting.WHITE + "Snowmans:\n" + - EnumChatFormatting.DARK_GREEN + "Grinches:\n" + - EnumChatFormatting.GOLD + "Yetis:\n" + - EnumChatFormatting.AQUA + "Time Since Yeti:\n" + - EnumChatFormatting.AQUA + "Creatures Since Yeti:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.AQUA + "Frozen Steves:\n" + + EnumChatFormatting.WHITE + "Snowmans:\n" + + EnumChatFormatting.DARK_GREEN + "Grinches:\n" + + EnumChatFormatting.GOLD + "Yetis:\n" + + EnumChatFormatting.AQUA + "Time Since Yeti:\n" + + EnumChatFormatting.AQUA + "Creatures Since Yeti:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.frozenStevesSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmansSession) + "\n" + - EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinchesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.yetisSession) + "\n" + - EnumChatFormatting.AQUA + timeBetween + "\n" + - EnumChatFormatting.AQUA + bossesBetween; + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.frozenStevesSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.frostyTheSnowmansSession) + "\n" + + EnumChatFormatting.DARK_GREEN + nf.format(LootCommand.grinchesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.yetisSession) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; break; case "fishing_festival": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + - EnumChatFormatting.BLUE + "Blue Sharks:\n" + - EnumChatFormatting.GOLD + "Tiger Sharks:\n" + - EnumChatFormatting.WHITE + "Great White Sharks:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + + EnumChatFormatting.BLUE + "Blue Sharks:\n" + + EnumChatFormatting.GOLD + "Tiger Sharks:\n" + + EnumChatFormatting.WHITE + "Great White Sharks:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharks) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharks) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharks); + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharks) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharks) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharks); break; case "fishing_festival_session": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + - EnumChatFormatting.BLUE + "Blue Sharks:\n" + - EnumChatFormatting.GOLD + "Tiger Sharks:\n" + - EnumChatFormatting.WHITE + "Great White Sharks:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Nurse Sharks:\n" + + EnumChatFormatting.BLUE + "Blue Sharks:\n" + + EnumChatFormatting.GOLD + "Tiger Sharks:\n" + + EnumChatFormatting.WHITE + "Great White Sharks:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharksSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharksSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharksSession); + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(LootCommand.nurseSharksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.blueSharksSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.tigerSharksSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.greatWhiteSharksSession); break; case "fishing_spooky": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.BLUE + "Scarecrows:\n" + - EnumChatFormatting.GRAY + "Nightmares:\n" + - EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + - EnumChatFormatting.GOLD + "Phantom Fishers:\n" + - EnumChatFormatting.GOLD + "Grim Reapers:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Scarecrows:\n" + + EnumChatFormatting.GRAY + "Nightmares:\n" + + EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + + EnumChatFormatting.GOLD + "Grim Reapers:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrows) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.nightmares) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapers); + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatches) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrows) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.nightmares) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishers) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapers); break; case "fishing_spooky_session": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + - EnumChatFormatting.AQUA + "Fishing Milestone:\n" + - EnumChatFormatting.GOLD + "Good Catches:\n" + - EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + - EnumChatFormatting.BLUE + "Scarecrows:\n" + - EnumChatFormatting.GRAY + "Nightmares:\n" + - EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + - EnumChatFormatting.GOLD + "Phantom Fishers:\n" + - EnumChatFormatting.GOLD + "Grim Reapers:"; + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Scarecrows:\n" + + EnumChatFormatting.GRAY + "Nightmares:\n" + + EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + + EnumChatFormatting.GOLD + "Grim Reapers:"; countText = EnumChatFormatting.AQUA + nf.format(LootCommand.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrowsSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.nightmaresSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapersSession); + EnumChatFormatting.AQUA + nf.format(LootCommand.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.greatCatchesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarecrowsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.nightmaresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.werewolfsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.phantomFishersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.grimReapersSession); break; case "mythological": dropsText = EnumChatFormatting.GOLD + "Coins:\n" + - EnumChatFormatting.WHITE + "Griffin Feathers:\n" + - EnumChatFormatting.GOLD + "Crown of Greeds:\n" + - EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + - EnumChatFormatting.RED + "Minos Hunters:\n" + - EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + - EnumChatFormatting.RED + "Minotaurs:\n" + - EnumChatFormatting.WHITE + "Gaia Constructs:\n" + - EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + - EnumChatFormatting.GOLD + "Minos Inquisitors:"; + EnumChatFormatting.WHITE + "Griffin Feathers:\n" + + EnumChatFormatting.GOLD + "Crown of Greeds:\n" + + EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + + EnumChatFormatting.RED + "Minos Hunters:\n" + + EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + + EnumChatFormatting.RED + "Minotaurs:\n" + + EnumChatFormatting.WHITE + "Gaia Constructs:\n" + + EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + + EnumChatFormatting.GOLD + "Minos Inquisitors:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.mythCoins) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreeds) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirs) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minosHunters) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxes) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minotaurs) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampions) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitors); + EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathers) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreeds) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirs) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minosHunters) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxes) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minotaurs) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampions) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitors); break; case "mythological_session": dropsText = EnumChatFormatting.GOLD + "Coins:\n" + - EnumChatFormatting.WHITE + "Griffin Feathers:\n" + - EnumChatFormatting.GOLD + "Crown of Greeds:\n" + - EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + - EnumChatFormatting.RED + "Minos Hunters:\n" + - EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + - EnumChatFormatting.RED + "Minotaurs:\n" + - EnumChatFormatting.WHITE + "Gaia Constructs:\n" + - EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + - EnumChatFormatting.GOLD + "Minos Inquisitors:"; + EnumChatFormatting.WHITE + "Griffin Feathers:\n" + + EnumChatFormatting.GOLD + "Crown of Greeds:\n" + + EnumChatFormatting.AQUA + "Washed up Souvenirs:\n" + + EnumChatFormatting.RED + "Minos Hunters:\n" + + EnumChatFormatting.GRAY + "Siamese Lynxes:\n" + + EnumChatFormatting.RED + "Minotaurs:\n" + + EnumChatFormatting.WHITE + "Gaia Constructs:\n" + + EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + + EnumChatFormatting.GOLD + "Minos Inquisitors:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.mythCoinsSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreedsSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirsSession) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minosHuntersSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxesSession) + "\n" + - EnumChatFormatting.RED + nf.format(LootCommand.minotaursSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampionsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitorsSession); + EnumChatFormatting.WHITE + nf.format(LootCommand.griffinFeathersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.crownOfGreedsSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(LootCommand.washedUpSouvenirsSession) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minosHuntersSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(LootCommand.siameseLynxesSession) + "\n" + + EnumChatFormatting.RED + nf.format(LootCommand.minotaursSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(LootCommand.gaiaConstructsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.minosChampionsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.minosInquisitorsSession); break; case "catacombs_floor_one": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffs) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffs) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpent); break; case "catacombs_floor_one_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.bonzoStaffsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f1CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f1TimeSpentSession); break; case "catacombs_floor_two": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Scarf's Studies:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Scarf's Studies:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudies) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwords) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudies) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwords) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpent); break; case "catacombs_floor_two_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Scarf's Studies:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Scarf's Studies:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudiesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwordsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.scarfStudiesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveSwordsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f2CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f2TimeSpentSession); break; case "catacombs_floor_three": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBoots) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBoots) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpent); break; case "catacombs_floor_three_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBootsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.adaptiveBootsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f3CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f3TimeSpentSession); break; case "catacombs_floor_four": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + - EnumChatFormatting.GOLD + "Spirit Bows:\n" + - EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + - EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + + EnumChatFormatting.GOLD + "Spirit Bows:\n" + + EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + + EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWings) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBones) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBoots) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwords) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBows) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPets) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPets) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWings) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBones) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBoots) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwords) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBows) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPets) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPets) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpent); break; case "catacombs_floor_four_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + - EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + - EnumChatFormatting.GOLD + "Spirit Bows:\n" + - EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + - EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Boots:\n" + + EnumChatFormatting.DARK_PURPLE + "Spirit Swords:\n" + + EnumChatFormatting.GOLD + "Spirit Bows:\n" + + EnumChatFormatting.DARK_PURPLE + "Epic Spirit Pets:\n" + + EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWingsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBootsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwordsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBowsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPetsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPetsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritWingsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.spiritSwordsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.spiritBowsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.epicSpiritPetsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.legSpiritPetsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f4CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f4TimeSpentSession); break; case "catacombs_floor_five": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Warped Stones:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + - EnumChatFormatting.GOLD + "Last Breaths:\n" + - EnumChatFormatting.GOLD + "Livid Daggers:\n" + - EnumChatFormatting.GOLD + "Shadow Furys:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Warped Stones:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + + EnumChatFormatting.GOLD + "Last Breaths:\n" + + EnumChatFormatting.GOLD + "Livid Daggers:\n" + + EnumChatFormatting.GOLD + "Shadow Furys:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStones) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBoots) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreaths) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurys) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStones) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBoots) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreaths) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggers) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurys) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpent); break; case "catacombs_floor_five_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Warped Stones:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + - EnumChatFormatting.GOLD + "Last Breaths:\n" + - EnumChatFormatting.GOLD + "Livid Daggers:\n" + - EnumChatFormatting.GOLD + "Shadow Furys:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Warped Stones:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Chestplates:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Leggings:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Boots:\n" + + EnumChatFormatting.GOLD + "Last Breaths:\n" + + EnumChatFormatting.GOLD + "Livid Daggers:\n" + + EnumChatFormatting.GOLD + "Shadow Furys:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBootsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreathsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurysSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.warpedStonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowAssBootsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lastBreathsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.lividDaggersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.shadowFurysSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f5CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f5TimeSpentSession); break; case "catacombs_floor_six": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Ancient Roses:\n" + - EnumChatFormatting.GOLD + "Precursor Eyes:\n" + - EnumChatFormatting.GOLD + "Giant's Swords:\n" + - EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + - EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + - EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + - EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + - EnumChatFormatting.GOLD + "Necro Swords:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Ancient Roses:\n" + + EnumChatFormatting.GOLD + "Precursor Eyes:\n" + + EnumChatFormatting.GOLD + "Giant's Swords:\n" + + EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + + EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + + EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + + EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + + EnumChatFormatting.GOLD + "Necro Swords:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRoses) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyes) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwords) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelms) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChests) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBoots) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwords) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRoses) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyes) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwords) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelms) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChests) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBoots) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwords) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpent); break; case "catacombs_floor_six_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.BLUE + "Ancient Roses:\n" + - EnumChatFormatting.GOLD + "Precursor Eyes:\n" + - EnumChatFormatting.GOLD + "Giant's Swords:\n" + - EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + - EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + - EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + - EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + - EnumChatFormatting.GOLD + "Necro Swords:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.BLUE + "Ancient Roses:\n" + + EnumChatFormatting.GOLD + "Precursor Eyes:\n" + + EnumChatFormatting.GOLD + "Giant's Swords:\n" + + EnumChatFormatting.GOLD + "Necro Lord Helmets:\n" + + EnumChatFormatting.GOLD + "Necro Lord Chests:\n" + + EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + + EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + + EnumChatFormatting.GOLD + "Necro Swords:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRosesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwordsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelmsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChestsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBootsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwordsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(LootCommand.ancientRosesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.precursorEyesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.giantsSwordsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordHelmsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordChestsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordLegsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroLordBootsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.necroSwordsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f6CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f6TimeSpentSession); break; case "catacombs_floor_seven": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + - EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + - EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + - EnumChatFormatting.GOLD + "Auto Recombobs:\n" + - EnumChatFormatting.GOLD + "Wither Helmets:\n" + - EnumChatFormatting.GOLD + "Wither Chests:\n" + - EnumChatFormatting.GOLD + "Wither Leggings:\n" + - EnumChatFormatting.GOLD + "Wither Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + + EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + + EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + + EnumChatFormatting.GOLD + "Auto Recombobs:\n" + + EnumChatFormatting.GOLD + "Wither Helmets:\n" + + EnumChatFormatting.GOLD + "Wither Chests:\n" + + EnumChatFormatting.GOLD + "Wither Leggings:\n" + + EnumChatFormatting.GOLD + "Wither Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloods) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosions) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShields) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarps) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandles) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelms) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherChests) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherBoots) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpent); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloods) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosions) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShields) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarps) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandles) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelms) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherChests) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegs) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherBoots) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpent); break; case "catacombs_floor_seven_session": dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + - EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + - EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + - EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + - EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + - EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + - EnumChatFormatting.GOLD + "Auto Recombobulators:\n" + - EnumChatFormatting.GOLD + "Wither Helmets:\n" + - EnumChatFormatting.GOLD + "Wither Chests:\n" + - EnumChatFormatting.GOLD + "Wither Leggings:\n" + - EnumChatFormatting.GOLD + "Wither Boots:\n" + - EnumChatFormatting.AQUA + "Coins Spent:\n" + - EnumChatFormatting.AQUA + "Time Spent:"; + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + + EnumChatFormatting.DARK_PURPLE + "Implosions:\n" + + EnumChatFormatting.DARK_PURPLE + "Wither Shields:\n" + + EnumChatFormatting.DARK_PURPLE + "Shadow Warps:\n" + + EnumChatFormatting.DARK_PURPLE + "Necron's Handles:\n" + + EnumChatFormatting.GOLD + "Auto Recombobulators:\n" + + EnumChatFormatting.GOLD + "Wither Helmets:\n" + + EnumChatFormatting.GOLD + "Wither Chests:\n" + + EnumChatFormatting.GOLD + "Wither Leggings:\n" + + EnumChatFormatting.GOLD + "Wither Boots:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; countText = EnumChatFormatting.GOLD + nf.format(LootCommand.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloodsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosionsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShieldsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarpsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandlesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelmsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherChestsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootCommand.witherBootsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpentSession); + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherBloodsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherCloaksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.implosionsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.witherShieldsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.shadowWarpsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(LootCommand.necronsHandlesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.autoRecombsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherHelmsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherChestsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherLegsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(LootCommand.witherBootsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(LootCommand.f7CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootCommand.f7TimeSpentSession); break; default: System.out.println("Display was an unknown value, turning off."); @@ -2675,11 +2675,11 @@ public class DankersSkyblockMod { break; } waterAnswers = MAIN_COLOUR + "The following levers must be down:\n" + - EnumChatFormatting.DARK_PURPLE + "Purple: " + purple + "\n" + - EnumChatFormatting.GOLD + "Orange: " + orange + "\n" + - EnumChatFormatting.BLUE + "Blue: " + blue + "\n" + - EnumChatFormatting.GREEN + "Green: " + green + "\n" + - EnumChatFormatting.RED + "Red: " + red; + EnumChatFormatting.DARK_PURPLE + "Purple: " + purple + "\n" + + EnumChatFormatting.GOLD + "Orange: " + orange + "\n" + + EnumChatFormatting.BLUE + "Blue: " + blue + "\n" + + EnumChatFormatting.GREEN + "Green: " + green + "\n" + + EnumChatFormatting.RED + "Red: " + red; done = true; break; } -- cgit From 28033cdff035f00ddbef738fb17a517fec8706b7 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 24 Dec 2020 01:21:04 -0500 Subject: Calculate what Skyblock Year it is for the trivia --- src/main/java/me/Danker/DankersSkyblockMod.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 191d587..231c125 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -613,13 +613,16 @@ public class DankersSkyblockMod { } if (ToggleCommand.oruoToggled && Utils.inDungeons) { - // Don't set every answer to wrong with this question - if (message.contains("What SkyBlock year is it?")) triviaAnswers = null; + if (message.contains("What SkyBlock year is it?")) { + int year = (int) (Math.floor((System.currentTimeMillis() - 1560276000000L)/446400) + 1); - for (String question : triviaSolutions.keySet()) { - if (message.contains(question)) { - triviaAnswers = triviaSolutions.get(question); - break; + triviaAnswers = new String[]{"Year " + year}; + } else { + for (String question : triviaSolutions.keySet()) { + if (message.contains(question)) { + triviaAnswers = triviaSolutions.get(question); + break; + } } } -- cgit From e550f99b8d93ddaec54d1e9273ad5121976d7098 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 24 Dec 2020 18:46:17 -0500 Subject: Add a keybind for regular ability --- src/main/java/me/Danker/DankersSkyblockMod.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 231c125..37dd773 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -96,7 +96,7 @@ public class DankersSkyblockMod { static int tickAmount = 1; static String lastMaddoxCommand = "/cb placeholder"; static double lastMaddoxTime = 0; - static KeyBinding[] keyBindings = new KeyBinding[2]; + static KeyBinding[] keyBindings = new KeyBinding[3]; static boolean usingLabymod = false; public static String guiToOpen = null; static boolean foundLivid = false; @@ -273,7 +273,8 @@ public class DankersSkyblockMod { t6EnchantPattern = Pattern.compile(patternString); keyBindings[0] = new KeyBinding("Open Maddox Menu", Keyboard.KEY_M, "Danker's Skyblock Mod"); - keyBindings[1] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); + keyBindings[1] = new KeyBinding("Regular Ability", Keyboard.KEY_NUMPAD4, "Danker's Skyblock Mod"); + keyBindings[2] = new KeyBinding("Start/Stop Skill Tracker", Keyboard.KEY_NUMPAD5, "Danker's Skyblock Mod"); for (KeyBinding keyBinding : keyBindings) { ClientRegistry.registerKeyBinding(keyBinding); @@ -3193,6 +3194,11 @@ public class DankersSkyblockMod { player.sendChatMessage(lastMaddoxCommand); } if (keyBindings[1].isPressed()) { + if (Utils.inDungeons) { + player.dropOneItem(true); + } + } + if (keyBindings[2].isPressed()) { if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { skillStopwatch.resume(); player.addChatMessage(new ChatComponentText(MAIN_COLOUR + "Skill tracker started.")); -- cgit From d3fd640af8a50cfe36a01d294683f5340e008e41 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 24 Dec 2020 18:46:42 -0500 Subject: update skyblock year detection --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 37dd773..40db55a 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -615,8 +615,12 @@ public class DankersSkyblockMod { if (ToggleCommand.oruoToggled && Utils.inDungeons) { if (message.contains("What SkyBlock year is it?")) { - int year = (int) (Math.floor((System.currentTimeMillis() - 1560276000000L)/446400) + 1); + double currentTime = System.currentTimeMillis() /1000L; + double diff = Math.floor(currentTime - 1560276000); + + int year = (int) (diff / 446400 + 1); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("It is Skyblock Year " + year)); triviaAnswers = new String[]{"Year " + year}; } else { for (String question : triviaSolutions.keySet()) { -- cgit From 3e4b6728eaee4daae95dfb8c40ed46510e9ea280 Mon Sep 17 00:00:00 2001 From: Sychic Date: Fri, 25 Dec 2020 15:54:21 -0500 Subject: Fix mispelling --- src/main/java/me/Danker/commands/DungeonsCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index 79d5d96..290f99d 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -110,7 +110,7 @@ public class DungeonsCommand extends CommandBase { EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n" + - EnumChatFormatting.WHITE + " Screts Found: " + secrets + "\n" + + EnumChatFormatting.WHITE + " Secrets Found: " + secrets + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); }).start(); } -- cgit From 358d684e27f6a728753dd56004003c09e830bed7 Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Fri, 25 Dec 2020 16:49:26 -0500 Subject: Add highest floor completed to DungeonsCommand --- .../java/me/Danker/commands/DungeonsCommand.java | 55 +++++++++++++++++----- 1 file changed, 43 insertions(+), 12 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index bdc1403..8b14bf7 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -9,6 +9,7 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.event.HoverEvent; import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; @@ -84,24 +85,54 @@ public class DungeonsCommand extends CommandBase { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "This player has not played dungeons.")); return; } - - double catacombs = Utils.xpToDungeonsLevel(dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject().get("experience").getAsDouble()); + + JsonObject catacombsObject = dungeonsObject.get("dungeon_types").getAsJsonObject().get("catacombs").getAsJsonObject(); + double catacombs = Utils.xpToDungeonsLevel(catacombsObject.get("experience").getAsDouble()); double healer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("healer").getAsJsonObject().get("experience").getAsDouble()); double mage = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("mage").getAsJsonObject().get("experience").getAsDouble()); double berserk = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("berserk").getAsJsonObject().get("experience").getAsDouble()); double archer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("archer").getAsJsonObject().get("experience").getAsDouble()); double tank = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble()); String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString()); - - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" + - EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" + - EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" + - EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" + - EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + - EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + - EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------")); + + int highestFloor = catacombsObject.get("highest_tier_completed").getAsInt(); + JsonObject completionObj = catacombsObject.get("tier_completions").getAsJsonObject(); + + String delimiter = DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------"; + + ChatComponentText classLevels = new ChatComponentText( + EnumChatFormatting.GOLD + " Selected Class: " + selectedClass + "\n\n" + + EnumChatFormatting.RED + " Catacombs Level: " + catacombs + "\n" + + EnumChatFormatting.YELLOW + " Healer Level: " + healer + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" + + EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + + EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + + EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n"); + + StringBuilder completionsHoverString = new StringBuilder(); + + for (int i = 0; i <= highestFloor; i++) { + completionsHoverString + .append(EnumChatFormatting.GOLD) + .append(i == 0 ? "Entrance: " : "Floor " + i + ": ") + .append(EnumChatFormatting.RESET) + .append(completionObj.get(String.valueOf(i)).getAsInt()) + .append(i < highestFloor ? "\n": ""); + } + + ChatComponentText completions = new ChatComponentText(EnumChatFormatting.GOLD + " Highest Floor Completed: " + highestFloor); + + completions.setChatStyle(completions.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText(completionsHoverString.toString())))); + + + player.addChatMessage( + new ChatComponentText(delimiter) + .appendText("\n") + .appendSibling(classLevels) + .appendSibling(completions) + .appendText("\n") + .appendSibling(new ChatComponentText(delimiter)) + ); }).start(); } -- cgit From 6b5f367dae42305dc19b9849e6fdd4fe4ba1a60c Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Fri, 25 Dec 2020 20:04:05 -0500 Subject: Update DankersSkyblockMod.java --- src/main/java/me/Danker/DankersSkyblockMod.java | 1 - 1 file changed, 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 40db55a..55bc799 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -620,7 +620,6 @@ public class DankersSkyblockMod { double diff = Math.floor(currentTime - 1560276000); int year = (int) (diff / 446400 + 1); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("It is Skyblock Year " + year)); triviaAnswers = new String[]{"Year " + year}; } else { for (String question : triviaSolutions.keySet()) { -- cgit From f8a26eac5faa5cee84eaae3fe1b9a7b4588fb7ec Mon Sep 17 00:00:00 2001 From: Sychic Date: Sat, 26 Dec 2020 18:24:14 -0500 Subject: Add secrets back because i accidentally removed it while resolving conflicts --- src/main/java/me/Danker/commands/DungeonsCommand.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index 4179420..f9ad93e 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -78,6 +78,14 @@ public class DungeonsCommand extends CommandBase { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } + + String playerURL = "https://api.hypixel.net/player?uuid=" + uuid + "&key=" + key; + System.out.println("Fetching player data..."); + JsonObject playerResponse = APIHandler.getResponse(playerURL); + if(!playerResponse.get("success").getAsBoolean()){ + String reason = playerResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "This player has not played on Hypixel.")); + } System.out.println("Fetching dungeon stats..."); JsonObject dungeonsObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("dungeons").getAsJsonObject(); @@ -94,6 +102,7 @@ public class DungeonsCommand extends CommandBase { double archer = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("archer").getAsJsonObject().get("experience").getAsDouble()); double tank = Utils.xpToDungeonsLevel(dungeonsObject.get("player_classes").getAsJsonObject().get("tank").getAsJsonObject().get("experience").getAsDouble()); String selectedClass = Utils.capitalizeString(dungeonsObject.get("selected_dungeon_class").getAsString()); + int secrets = playerResponse.get("player").getAsJsonObject().get("achievements").getAsJsonObject().get("skyblock_treasure_hunter").getAsInt(); int highestFloor = catacombsObject.get("highest_tier_completed").getAsInt(); JsonObject completionObj = catacombsObject.get("tier_completions").getAsJsonObject(); @@ -107,7 +116,8 @@ public class DungeonsCommand extends CommandBase { EnumChatFormatting.LIGHT_PURPLE + " Mage Level: " + mage + "\n" + EnumChatFormatting.RED + " Berserk Level: " + berserk + "\n" + EnumChatFormatting.GREEN + " Archer Level: " + archer + "\n" + - EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n"); + EnumChatFormatting.BLUE + " Tank Level: " + tank + "\n\n" + + EnumChatFormatting.WHITE + " Secrets Found: " + secrets + "\n\n"); StringBuilder completionsHoverString = new StringBuilder(); -- cgit From c23aabd86e5cf33d69afc6368f7a4ad28afaeea0 Mon Sep 17 00:00:00 2001 From: flame-cat Date: Sun, 27 Dec 2020 15:31:13 -0500 Subject: Add Error Message to Reparty --- src/main/java/me/Danker/DankersSkyblockMod.java | 18 ++++------ .../java/me/Danker/commands/RepartyCommand.java | 40 ++++++++++++++-------- 2 files changed, 31 insertions(+), 27 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index a6cc772..ce02128 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -78,7 +78,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta5"; + public static final String VERSION = "1.8.5-beta6"; static double checkItemsNow = 0; static double itemsChecked = 0; @@ -103,9 +103,6 @@ public class DankersSkyblockMod static Entity livid = null; public static double cakeTime; - public static List partyList = new ArrayList<>(); - public static List repartyFailList = new ArrayList<>(); - public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", @@ -360,8 +357,8 @@ public class DankersSkyblockMod String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); // Reparty command - if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 3) { - if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members"))) { + if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 5) { + if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members") || message.contains("Couldn't find a player") || message.contains("cannot invite that player") || message.length() == 0)) { return; } @@ -370,30 +367,27 @@ public class DankersSkyblockMod Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); - Matcher party_start = party_start_pattern.matcher(message); Matcher leader = leader_pattern.matcher(message); Matcher members = members_pattern.matcher(message); - if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself.")); } else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); } - else if (message.Contains("Couldn't find a player") || message.Contains("cannot invite that player")) { - + else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { + RepartyCommand.repartyFailList.add(RepartyCommand.currentMember); } else { while (members.find()) { String partyMember = members.group(1); if (!partyMember.equals(player.getName())) { - partyList.add(partyMember); + RepartyCommand.party.add(partyMember); } } } - event.setCanceled(true); } diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index fbcea7f..6442588 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -25,6 +25,10 @@ import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { public static double callTime = 0; + public static boolean inviteFailed = false; + public static String currentMember; + public static List party = new ArrayList<>(); + public static List repartyFailList = new ArrayList<>(); @Override public String getCommandName() { @@ -43,37 +47,43 @@ public class RepartyCommand extends CommandBase implements ICommand { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { + party.clear(); + repartyFailList.clear(); + // MULTI THREAD DRIFTING new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - callTime = System.currentTimeMillis() / 1000; + RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; try { player.sendChatMessage("/p list"); - Thread.sleep(700); - - List party = DankersSkyblockMod.partyList; - if (party.size() == 0) { - DankersSkyblockMod.partyList.clear(); - return; - } + System.out.println("Grabbing the party members..."); + Thread.sleep(550); + if (RepartyCommand.party.size() == 0) return; player.sendChatMessage("/p disband"); - Thread.sleep(250); + Thread.sleep(210); - String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, party); + String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.party); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD + members + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); - Thread.sleep(250); - for (int i = 0; i < party.size(); i++) { - player.sendChatMessage("/p " + party.get(i)); - Thread.sleep(250); + for (int i = 0; i < RepartyCommand.party.size(); i++) { + RepartyCommand.currentMember = RepartyCommand.party.get(i); + player.sendChatMessage("/p " + RepartyCommand.currentMember); + Thread.sleep(400); } - DankersSkyblockMod.partyList.clear(); + if (RepartyCommand.repartyFailList.size() > 0) { + Thread.sleep(300); + String failedMembers = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.repartyFailList); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + + DankersSkyblockMod.ERROR_COLOUR + "Unable to Invite:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.GOLD + failedMembers + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); + } } catch (InterruptedException e) { e.printStackTrace(); } -- cgit From 8b1fe2934a86a1cb64420cfc197dbc5c4faf8973 Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Mon, 28 Dec 2020 20:56:43 -0500 Subject: Update to beta 7 & Merge fix --- build.gradle | 2 +- src/main/java/me/Danker/commands/DHelpCommand.java | 4 ++-- src/main/java/me/Danker/commands/RepartyCommand.java | 6 ++++++ src/main/java/me/Danker/commands/ToggleCommand.java | 5 +++-- 4 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 3056755..1561870 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta6" +version = "1.8.5-beta7" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 47ea76b..dd5395c 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -40,8 +40,8 @@ public class DHelpCommand extends CommandBase { EnumChatFormatting.GOLD + " /loot [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + EnumChatFormatting.GOLD + " /display [winter/festival/spooky/f(1-7)/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 " + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" + - EnumChatFormatting.GOLD + " /move " + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + - EnumChatFormatting.GOLD + " /scale " + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + + EnumChatFormatting.GOLD + " /move " + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + + EnumChatFormatting.GOLD + " /scale " + 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/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 6442588..d3bf9e4 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -40,6 +40,11 @@ public class RepartyCommand extends CommandBase implements ICommand { return "/" + getCommandName(); } + @Override + public List getCommandAliases() { + return Collections.singletonList("rp"); + } + @Override public int getRequiredPermissionLevel() { return 0; @@ -56,6 +61,7 @@ public class RepartyCommand extends CommandBase implements ICommand { RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; try { + Thread.sleep(210); player.sendChatMessage("/p list"); System.out.println("Grabbing the party members..."); Thread.sleep(550); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 4138d9c..ce507e1 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -91,8 +91,9 @@ public class ToggleCommand extends CommandBase implements ICommand { "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", - "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "autoskilltracker" - "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "blockbreakingfarms", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", "autoskilltracker", + "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", + "bonzotimer", "blockbreakingfarms", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); -- cgit From b2ea896a92afa735400c11e573651d8d207d5c79 Mon Sep 17 00:00:00 2001 From: Sychic Date: Wed, 30 Dec 2020 20:56:48 -0500 Subject: Edits to GUI which fix mishaps created while resolving conflicts --- src/main/java/me/Danker/gui/DankerGui.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index b91ed3e..ee8a5d8 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -123,18 +123,17 @@ public class DankerGui extends GuiScreen { rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts)); splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); // Page 5 - lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); + lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); - splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); //Page 6 - flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); - necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); - bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); - blockBreakingFarms = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled)); + necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); + bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); + blockBreakingFarms = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled)); switch (page) { case 1: @@ -186,13 +185,13 @@ public class DankerGui extends GuiScreen { this.buttonList.add(dungeonTimer); this.buttonList.add(stopSalvageStarred); this.buttonList.add(watcherReadyMessage); - this.buttonList.add(notifySlayerSlain); this.buttonList.add(flowerWeapons); + this.buttonList.add(notifySlayerSlain); this.buttonList.add(nextPage); this.buttonList.add(backPage); break; case 6: - this.buttonList.add(necronNotifications); + this.buttonList.add(necronNotifications); this.buttonList.add(bonzoTimer); this.buttonList.add(blockBreakingFarms); this.buttonList.add(backPage); -- cgit From 65ce2e04dbef87146f85979e92fced052652a7b2 Mon Sep 17 00:00:00 2001 From: Kaloyan Draganov Date: Thu, 31 Dec 2020 01:29:19 -0500 Subject: Decrease SkillTracker delay --- src/main/java/me/Danker/commands/SkillTrackerCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/SkillTrackerCommand.java b/src/main/java/me/Danker/commands/SkillTrackerCommand.java index e341f43..03753aa 100644 --- a/src/main/java/me/Danker/commands/SkillTrackerCommand.java +++ b/src/main/java/me/Danker/commands/SkillTrackerCommand.java @@ -50,7 +50,7 @@ public class SkillTrackerCommand extends CommandBase { } try { - Thread.sleep(200); + Thread.sleep(50); switch (arg1[0].toLowerCase()) { case "start": -- cgit From 382dd472e4eb37d62588e673567a4d75d6b33ab3 Mon Sep 17 00:00:00 2001 From: Sychic Date: Thu, 31 Dec 2020 23:08:01 -0500 Subject: Version Change --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 1561870..26dd98f 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta7" +version = "1.8.5-beta8" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index fa00436..febc468 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -78,7 +78,7 @@ import java.util.regex.Pattern; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta7"; + public static final String VERSION = "1.8.5-beta8"; static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); -- cgit From 9fa3405d2ac107488634af3fc7302954d90f4b17 Mon Sep 17 00:00:00 2001 From: Sychic Date: Fri, 1 Jan 2021 20:13:53 -0500 Subject: OAM Warning Patch --- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index febc468..0bcecba 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -315,7 +315,7 @@ public class DankersSkyblockMod { public void postInit(final FMLPostInitializationEvent event) { Package[] packages = Package.getPackages(); for(Package p : packages){ - if(p.getName().startsWith("com.spiderfrog.gadgets")){ + if(p.getName().startsWith("com.spiderfrog.gadgets") || p.getName().startsWith("com.spiderfrog.oldanimations")){ usingOAM = true; break; } -- cgit From 320dab0e8050e4d771c339c3c836035a0a8df990 Mon Sep 17 00:00:00 2001 From: Sychic Date: Tue, 5 Jan 2021 22:50:33 -0500 Subject: Reparty Edits: Change message cancelling and reparty fail handling. (also add a miscellanous logger for debugging) --- src/main/java/me/Danker/DankersSkyblockMod.java | 160 ++++++++++++++++----- .../java/me/Danker/commands/RepartyCommand.java | 105 ++++++++++---- 2 files changed, 202 insertions(+), 63 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 0bcecba..8285bec 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -63,6 +63,7 @@ import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; import org.apache.commons.lang3.time.StopWatch; +import org.apache.logging.log4j.Logger; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; @@ -79,6 +80,7 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; public static final String VERSION = "1.8.5-beta8"; + public static Logger DSMLogger; static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); @@ -108,8 +110,9 @@ public class DankersSkyblockMod { public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); + public static final ResourceLocation LOGO = new ResourceLocation("dsm", "icons/dsm.png"); - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; static Map triviaSolutions = new HashMap<>(); @@ -285,6 +288,7 @@ public class DankersSkyblockMod { @EventHandler public void preInit(final FMLPreInitializationEvent event) { + DSMLogger = event.getModLog(); ClientCommandHandler.instance.registerCommand(new ToggleCommand()); ClientCommandHandler.instance.registerCommand(new SetkeyCommand()); ClientCommandHandler.instance.registerCommand(new GetkeyCommand()); @@ -315,6 +319,7 @@ public class DankersSkyblockMod { public void postInit(final FMLPostInitializationEvent event) { Package[] packages = Package.getPackages(); for(Package p : packages){ + DSMLogger.info(p); if(p.getName().startsWith("com.spiderfrog.gadgets") || p.getName().startsWith("com.spiderfrog.oldanimations")){ usingOAM = true; break; @@ -426,38 +431,125 @@ public class DankersSkyblockMod { } // Reparty command - if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 5) { - if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members") || message.contains("Couldn't find a player") || message.contains("cannot invite that player") || message.length() == 0)) { - return; - } - - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - - Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); - Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); - Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); - Matcher party_start = party_start_pattern.matcher(message); - Matcher leader = leader_pattern.matcher(message); - Matcher members = members_pattern.matcher(message); - - if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself.")); - } - else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); - } - else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { - RepartyCommand.repartyFailList.add(RepartyCommand.currentMember); - } - else { - while (members.find()) { - String partyMember = members.group(1); - if (!partyMember.equals(player.getName())) { - RepartyCommand.party.add(partyMember); - } - } - } - event.setCanceled(true); + // Getting party + if (RepartyCommand.gettingParty) { + if (message.contains("-----")) { + switch(RepartyCommand.Delimiter) { + case 0: + System.out.println("Get Party Delimiter Cancelled"); + RepartyCommand.Delimiter++; + event.setCanceled(true); + return; + case 1: + System.out.println("Done querying party"); + RepartyCommand.gettingParty = false; + RepartyCommand.Delimiter = 0; + event.setCanceled(true); + return; + } + }else if (message.startsWith("Party M") || message.startsWith("Party Leader")){ + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + + Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); + Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); + Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); + Matcher party_start = party_start_pattern.matcher(message); + Matcher leader = leader_pattern.matcher(message); + Matcher members = members_pattern.matcher(message); + + if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself.")); + RepartyCommand.partyThread.interrupt(); + } else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); + RepartyCommand.partyThread.interrupt(); + } else { + while (members.find()) { + String partyMember = members.group(1); + if (!partyMember.equals(player.getName())) { + RepartyCommand.party.add(partyMember); + System.out.println(partyMember); + } + } + } + event.setCanceled(true); + return; + } + } + // Disbanding party + if (RepartyCommand.disbanding) { + if (message.contains("-----")) { + switch (RepartyCommand.Delimiter) { + case 0: + System.out.println("Disband Delimiter Cancelled"); + RepartyCommand.Delimiter++; + event.setCanceled(true); + return; + case 1: + System.out.println("Done disbanding"); + RepartyCommand.disbanding = false; + RepartyCommand.Delimiter = 0; + event.setCanceled(true); + return; + } + } else if (message.endsWith("has disbanded the party!")) { + event.setCanceled(true); + return; + } + } + // Inviting + if (RepartyCommand.inviting) { + if (message.contains("-----")) { + if (RepartyCommand.Delimiter >= RepartyCommand.party.size() * 2 - 1) { + event.setCanceled(true); + RepartyCommand.Delimiter = 0; + System.out.println("Done Inviting!"); + RepartyCommand.inviting = false; + return; + } else { + RepartyCommand.Delimiter++; + event.setCanceled(true); + return; + } + } else if (message.endsWith(" to the party! They have 60 seconds to accept.")) { + Pattern invitePattern = Pattern.compile("(?:(?:\\[.+?] )?(?:\\w+) invited )(?:\\[.+?] )?(\\w+)"); + Matcher invitee = invitePattern.matcher(message); + if (invitee.find()) { + System.out.println("" + invitee.group(1) + ": " + RepartyCommand.repartyFailList.remove(invitee.group(1))); + } + event.setCanceled(true); + return; + } else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { + event.setCanceled(true); + return; + } + } + // Fail Inviting + if (RepartyCommand.failInviting) { + if (message.contains("-----")) { + if (RepartyCommand.Delimiter >= RepartyCommand.repartyFailList.size() * 2 - 1) { + event.setCanceled(true); + RepartyCommand.Delimiter = 0; + System.out.println("Done Inviting!"); + RepartyCommand.inviting = false; + return; + } else { + RepartyCommand.Delimiter++; + event.setCanceled(true); + return; + } + } else if (message.endsWith(" to the party! They have 60 seconds to accept.")) { + Pattern invitePattern = Pattern.compile("(?:(?:\\[.+?] )?(?:\\w+) invited )(?:\\[.+?] )?(\\w+)"); + Matcher invitee = invitePattern.matcher(message); + if (invitee.find()) { + System.out.println("" + invitee.group(1) + ": " + RepartyCommand.repartyFailList.remove(invitee.group(1))); + } + event.setCanceled(true); + return; + } else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { + event.setCanceled(true); + return; + } } if (!Utils.inSkyblock) return; @@ -689,7 +781,7 @@ public class DankersSkyblockMod { return; } } - + if (ToggleCommand.oruoToggled && Utils.inDungeons) { if (message.contains("What SkyBlock year is it?")) { double currentTime = System.currentTimeMillis() /1000L; diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index d3bf9e4..92836c5 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -1,9 +1,9 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; -import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.gui.GuiNewChat; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; @@ -13,6 +13,7 @@ import net.minecraft.util.*; import net.minecraft.util.ChatComponentText; import net.minecraftforge.client.event.*; import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.ObfuscationReflectionHelper; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -25,10 +26,16 @@ import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { public static double callTime = 0; - public static boolean inviteFailed = false; + public static boolean gettingParty = false; + public static int Delimiter = 0; + public static boolean disbanding = false; + public static boolean inviting = false; + public static boolean failInviting = false; public static String currentMember; public static List party = new ArrayList<>(); public static List repartyFailList = new ArrayList<>(); + public static List joinList = new ArrayList<>(); + public static Thread partyThread = null; @Override public String getCommandName() { @@ -52,47 +59,87 @@ public class RepartyCommand extends CommandBase implements ICommand { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { + if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { + partyThread = new Thread(() -> { + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; + GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); + + + try { + player.sendChatMessage("/p " + String.join(" ", repartyFailList)); + String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, repartyFailList); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + + DankersSkyblockMod.MAIN_COLOUR + "Partying:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.YELLOW + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + failInviting = true; + while (failInviting) { + Thread.sleep(10); + } + if (repartyFailList.size() > 0) { + String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + + DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.RED + repartyFails + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + }); + + partyThread.start(); + + return; + } + + party.clear(); repartyFailList.clear(); // MULTI THREAD DRIFTING - new Thread(() -> { + partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; - + GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); + + try { - Thread.sleep(210); - player.sendChatMessage("/p list"); - System.out.println("Grabbing the party members..."); - Thread.sleep(550); - if (RepartyCommand.party.size() == 0) return; - + player.sendChatMessage("/pl"); + gettingParty = true; + while (gettingParty) { + Thread.sleep(10); + } + if (party.size() == 0) return; player.sendChatMessage("/p disband"); - Thread.sleep(210); - - String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.party); + disbanding = true; + while (disbanding) { + Thread.sleep(10); + } + player.sendChatMessage("/p " + String.join(" ", party)); + String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, RepartyCommand.party); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.GOLD + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); - - for (int i = 0; i < RepartyCommand.party.size(); i++) { - RepartyCommand.currentMember = RepartyCommand.party.get(i); - player.sendChatMessage("/p " + RepartyCommand.currentMember); - Thread.sleep(400); + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.YELLOW + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + inviting = true; + repartyFailList = new ArrayList<>(party); + while (inviting) { + Thread.sleep(10); } - - if (RepartyCommand.repartyFailList.size() > 0) { - Thread.sleep(300); - String failedMembers = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.repartyFailList); + if (repartyFailList.size() > 0) { + String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.ERROR_COLOUR + "Unable to Invite:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.GOLD + failedMembers + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); + DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.RED + repartyFails + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); } } catch (InterruptedException e) { e.printStackTrace(); } - }).start(); + }); + + partyThread.start(); } } \ No newline at end of file -- cgit From d20b0500e64a92d2db48d15d2ccf9f033b08f003 Mon Sep 17 00:00:00 2001 From: Sychic Date: Sun, 10 Jan 2021 18:11:52 -0500 Subject: Ghost party argument. Planning on changing to individual partying later when I can figure the logic out. --- .../java/me/Danker/commands/RepartyCommand.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 92836c5..fd63f39 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -25,13 +25,11 @@ import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { - public static double callTime = 0; public static boolean gettingParty = false; public static int Delimiter = 0; public static boolean disbanding = false; public static boolean inviting = false; public static boolean failInviting = false; - public static String currentMember; public static List party = new ArrayList<>(); public static List repartyFailList = new ArrayList<>(); public static List joinList = new ArrayList<>(); @@ -62,7 +60,6 @@ public class RepartyCommand extends CommandBase implements ICommand { if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); @@ -94,22 +91,25 @@ public class RepartyCommand extends CommandBase implements ICommand { return; } + boolean ghost = args.length > 0 && (args[0].toLowerCase().equals("g") || args[0].toLowerCase().equals("ghost")); - party.clear(); - repartyFailList.clear(); + if(ghost){ + party.clear(); + repartyFailList.clear(); + } // MULTI THREAD DRIFTING partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; - GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); try { - player.sendChatMessage("/pl"); - gettingParty = true; - while (gettingParty) { - Thread.sleep(10); + if(ghost){ + player.sendChatMessage("/pl"); + gettingParty = true; + while (gettingParty) { + Thread.sleep(10); + } } if (party.size() == 0) return; player.sendChatMessage("/p disband"); -- cgit From caf6e89bffcf0b75843f3ec9b036a7f15bc48185 Mon Sep 17 00:00:00 2001 From: Sychic Date: Mon, 11 Jan 2021 21:35:34 -0500 Subject: Messed up ghost party argument, actually sends reparty now --- .../java/me/Danker/commands/RepartyCommand.java | 53 ++++++++++++++++------ 1 file changed, 38 insertions(+), 15 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 92836c5..f4cc43d 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -8,30 +8,18 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.*; import net.minecraft.util.ChatComponentText; -import net.minecraftforge.client.event.*; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.ObfuscationReflectionHelper; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - import java.util.*; -import java.text.NumberFormat; import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { - public static double callTime = 0; public static boolean gettingParty = false; public static int Delimiter = 0; public static boolean disbanding = false; public static boolean inviting = false; public static boolean failInviting = false; - public static String currentMember; public static List party = new ArrayList<>(); public static List repartyFailList = new ArrayList<>(); public static List joinList = new ArrayList<>(); @@ -62,7 +50,6 @@ public class RepartyCommand extends CommandBase implements ICommand { if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); @@ -94,6 +81,44 @@ public class RepartyCommand extends CommandBase implements ICommand { return; } + if (args.length > 0 && (args[0].toLowerCase().equals("g") || args[0].toLowerCase().equals("ghost"))) { + partyThread = new Thread(() -> { + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + + + try { + player.sendChatMessage("/p disband"); + disbanding = true; + while (disbanding) { + Thread.sleep(10); + } + player.sendChatMessage("/p " + String.join(" ", party)); + String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, RepartyCommand.party); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.YELLOW + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + inviting = true; + repartyFailList = new ArrayList<>(party); + while (inviting) { + Thread.sleep(10); + } + if (repartyFailList.size() > 0) { + String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + + DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.RED + repartyFails + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + } + } catch (InterruptedException e) { + e.printStackTrace(); + } + }); + + partyThread.start(); + + return; + } party.clear(); repartyFailList.clear(); @@ -101,8 +126,6 @@ public class RepartyCommand extends CommandBase implements ICommand { // MULTI THREAD DRIFTING partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; - GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); try { -- cgit From b9a74f0420d0cdba780fecfe92e1367e4f1cb358 Mon Sep 17 00:00:00 2001 From: Sychic Date: Sun, 10 Jan 2021 18:11:52 -0500 Subject: Ghost party argument. Planning on changing to individual partying later when I can figure the logic out. --- .../java/me/Danker/commands/RepartyCommand.java | 63 +++++++--------------- 1 file changed, 20 insertions(+), 43 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index f4cc43d..fd63f39 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -8,10 +8,20 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.*; import net.minecraft.util.ChatComponentText; +import net.minecraftforge.client.event.*; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.ObfuscationReflectionHelper; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + import java.util.*; +import java.text.NumberFormat; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { @@ -81,58 +91,25 @@ public class RepartyCommand extends CommandBase implements ICommand { return; } - if (args.length > 0 && (args[0].toLowerCase().equals("g") || args[0].toLowerCase().equals("ghost"))) { - partyThread = new Thread(() -> { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - + boolean ghost = args.length > 0 && (args[0].toLowerCase().equals("g") || args[0].toLowerCase().equals("ghost")); - try { - player.sendChatMessage("/p disband"); - disbanding = true; - while (disbanding) { - Thread.sleep(10); - } - player.sendChatMessage("/p " + String.join(" ", party)); - String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, RepartyCommand.party); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.YELLOW + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); - inviting = true; - repartyFailList = new ArrayList<>(party); - while (inviting) { - Thread.sleep(10); - } - if (repartyFailList.size() > 0) { - String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.RED + repartyFails + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - }); - - partyThread.start(); - - return; + if(ghost){ + party.clear(); + repartyFailList.clear(); } - party.clear(); - repartyFailList.clear(); - // MULTI THREAD DRIFTING partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; try { - player.sendChatMessage("/pl"); - gettingParty = true; - while (gettingParty) { - Thread.sleep(10); + if(ghost){ + player.sendChatMessage("/pl"); + gettingParty = true; + while (gettingParty) { + Thread.sleep(10); + } } if (party.size() == 0) return; player.sendChatMessage("/p disband"); -- cgit From 39bf45abfcd4d1704f1173149f8f028e07016f39 Mon Sep 17 00:00:00 2001 From: Sychic Date: Mon, 11 Jan 2021 21:50:58 -0500 Subject: Revert reparty edit commits 1/2 --- .../java/me/Danker/commands/RepartyCommand.java | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index fd63f39..92836c5 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -25,11 +25,13 @@ import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { + public static double callTime = 0; public static boolean gettingParty = false; public static int Delimiter = 0; public static boolean disbanding = false; public static boolean inviting = false; public static boolean failInviting = false; + public static String currentMember; public static List party = new ArrayList<>(); public static List repartyFailList = new ArrayList<>(); public static List joinList = new ArrayList<>(); @@ -60,6 +62,7 @@ public class RepartyCommand extends CommandBase implements ICommand { if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); @@ -91,25 +94,22 @@ public class RepartyCommand extends CommandBase implements ICommand { return; } - boolean ghost = args.length > 0 && (args[0].toLowerCase().equals("g") || args[0].toLowerCase().equals("ghost")); - if(ghost){ - party.clear(); - repartyFailList.clear(); - } + party.clear(); + repartyFailList.clear(); // MULTI THREAD DRIFTING partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; + GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); try { - if(ghost){ - player.sendChatMessage("/pl"); - gettingParty = true; - while (gettingParty) { - Thread.sleep(10); - } + player.sendChatMessage("/pl"); + gettingParty = true; + while (gettingParty) { + Thread.sleep(10); } if (party.size() == 0) return; player.sendChatMessage("/p disband"); -- cgit From 9838bc712ff8c4614a658b1bde4dae913f03541f Mon Sep 17 00:00:00 2001 From: Sychic Date: Mon, 11 Jan 2021 21:51:20 -0500 Subject: Revert reparty edit commits 2/2 --- src/main/java/me/Danker/DankersSkyblockMod.java | 160 +++++---------------- .../java/me/Danker/commands/RepartyCommand.java | 105 ++++---------- 2 files changed, 63 insertions(+), 202 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 8285bec..0bcecba 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -63,7 +63,6 @@ import net.minecraftforge.fml.common.gameevent.TickEvent.Phase; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; import org.apache.commons.lang3.time.StopWatch; -import org.apache.logging.log4j.Logger; import org.lwjgl.input.Keyboard; import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; @@ -80,7 +79,6 @@ import java.util.regex.Pattern; public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; public static final String VERSION = "1.8.5-beta8"; - public static Logger DSMLogger; static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); @@ -110,9 +108,8 @@ public class DankersSkyblockMod { public static final ResourceLocation CAKE_ICON = new ResourceLocation("dsm", "icons/cake.png"); public static final ResourceLocation BONZO_ICON = new ResourceLocation("dsm", "icons/bonzo.png"); - public static final ResourceLocation LOGO = new ResourceLocation("dsm", "icons/dsm.png"); - static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; static Map triviaSolutions = new HashMap<>(); @@ -288,7 +285,6 @@ public class DankersSkyblockMod { @EventHandler public void preInit(final FMLPreInitializationEvent event) { - DSMLogger = event.getModLog(); ClientCommandHandler.instance.registerCommand(new ToggleCommand()); ClientCommandHandler.instance.registerCommand(new SetkeyCommand()); ClientCommandHandler.instance.registerCommand(new GetkeyCommand()); @@ -319,7 +315,6 @@ public class DankersSkyblockMod { public void postInit(final FMLPostInitializationEvent event) { Package[] packages = Package.getPackages(); for(Package p : packages){ - DSMLogger.info(p); if(p.getName().startsWith("com.spiderfrog.gadgets") || p.getName().startsWith("com.spiderfrog.oldanimations")){ usingOAM = true; break; @@ -431,125 +426,38 @@ public class DankersSkyblockMod { } // Reparty command - // Getting party - if (RepartyCommand.gettingParty) { - if (message.contains("-----")) { - switch(RepartyCommand.Delimiter) { - case 0: - System.out.println("Get Party Delimiter Cancelled"); - RepartyCommand.Delimiter++; - event.setCanceled(true); - return; - case 1: - System.out.println("Done querying party"); - RepartyCommand.gettingParty = false; - RepartyCommand.Delimiter = 0; - event.setCanceled(true); - return; - } - }else if (message.startsWith("Party M") || message.startsWith("Party Leader")){ - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - - Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); - Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); - Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); - Matcher party_start = party_start_pattern.matcher(message); - Matcher leader = leader_pattern.matcher(message); - Matcher members = members_pattern.matcher(message); - - if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself.")); - RepartyCommand.partyThread.interrupt(); - } else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); - RepartyCommand.partyThread.interrupt(); - } else { - while (members.find()) { - String partyMember = members.group(1); - if (!partyMember.equals(player.getName())) { - RepartyCommand.party.add(partyMember); - System.out.println(partyMember); - } - } - } - event.setCanceled(true); - return; - } - } - // Disbanding party - if (RepartyCommand.disbanding) { - if (message.contains("-----")) { - switch (RepartyCommand.Delimiter) { - case 0: - System.out.println("Disband Delimiter Cancelled"); - RepartyCommand.Delimiter++; - event.setCanceled(true); - return; - case 1: - System.out.println("Done disbanding"); - RepartyCommand.disbanding = false; - RepartyCommand.Delimiter = 0; - event.setCanceled(true); - return; - } - } else if (message.endsWith("has disbanded the party!")) { - event.setCanceled(true); - return; - } - } - // Inviting - if (RepartyCommand.inviting) { - if (message.contains("-----")) { - if (RepartyCommand.Delimiter >= RepartyCommand.party.size() * 2 - 1) { - event.setCanceled(true); - RepartyCommand.Delimiter = 0; - System.out.println("Done Inviting!"); - RepartyCommand.inviting = false; - return; - } else { - RepartyCommand.Delimiter++; - event.setCanceled(true); - return; - } - } else if (message.endsWith(" to the party! They have 60 seconds to accept.")) { - Pattern invitePattern = Pattern.compile("(?:(?:\\[.+?] )?(?:\\w+) invited )(?:\\[.+?] )?(\\w+)"); - Matcher invitee = invitePattern.matcher(message); - if (invitee.find()) { - System.out.println("" + invitee.group(1) + ": " + RepartyCommand.repartyFailList.remove(invitee.group(1))); - } - event.setCanceled(true); - return; - } else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { - event.setCanceled(true); - return; - } - } - // Fail Inviting - if (RepartyCommand.failInviting) { - if (message.contains("-----")) { - if (RepartyCommand.Delimiter >= RepartyCommand.repartyFailList.size() * 2 - 1) { - event.setCanceled(true); - RepartyCommand.Delimiter = 0; - System.out.println("Done Inviting!"); - RepartyCommand.inviting = false; - return; - } else { - RepartyCommand.Delimiter++; - event.setCanceled(true); - return; - } - } else if (message.endsWith(" to the party! They have 60 seconds to accept.")) { - Pattern invitePattern = Pattern.compile("(?:(?:\\[.+?] )?(?:\\w+) invited )(?:\\[.+?] )?(\\w+)"); - Matcher invitee = invitePattern.matcher(message); - if (invitee.find()) { - System.out.println("" + invitee.group(1) + ": " + RepartyCommand.repartyFailList.remove(invitee.group(1))); - } - event.setCanceled(true); - return; - } else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { - event.setCanceled(true); - return; - } + if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 5) { + if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members") || message.contains("Couldn't find a player") || message.contains("cannot invite that player") || message.length() == 0)) { + return; + } + + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + + Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$"); + Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$"); + Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●"); + Matcher party_start = party_start_pattern.matcher(message); + Matcher leader = leader_pattern.matcher(message); + Matcher members = members_pattern.matcher(message); + + if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself.")); + } + else if (leader.matches() && !(leader.group(1).equals(player.getName()))) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader.")); + } + else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) { + RepartyCommand.repartyFailList.add(RepartyCommand.currentMember); + } + else { + while (members.find()) { + String partyMember = members.group(1); + if (!partyMember.equals(player.getName())) { + RepartyCommand.party.add(partyMember); + } + } + } + event.setCanceled(true); } if (!Utils.inSkyblock) return; @@ -781,7 +689,7 @@ public class DankersSkyblockMod { return; } } - + if (ToggleCommand.oruoToggled && Utils.inDungeons) { if (message.contains("What SkyBlock year is it?")) { double currentTime = System.currentTimeMillis() /1000L; diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index 92836c5..d3bf9e4 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -1,9 +1,9 @@ package me.Danker.commands; import me.Danker.DankersSkyblockMod; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.gui.GuiNewChat; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; @@ -13,7 +13,6 @@ import net.minecraft.util.*; import net.minecraft.util.ChatComponentText; import net.minecraftforge.client.event.*; import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.ObfuscationReflectionHelper; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -26,16 +25,10 @@ import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { public static double callTime = 0; - public static boolean gettingParty = false; - public static int Delimiter = 0; - public static boolean disbanding = false; - public static boolean inviting = false; - public static boolean failInviting = false; + public static boolean inviteFailed = false; public static String currentMember; public static List party = new ArrayList<>(); public static List repartyFailList = new ArrayList<>(); - public static List joinList = new ArrayList<>(); - public static Thread partyThread = null; @Override public String getCommandName() { @@ -59,87 +52,47 @@ public class RepartyCommand extends CommandBase implements ICommand { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { - partyThread = new Thread(() -> { - EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; - RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; - GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); - - - try { - player.sendChatMessage("/p " + String.join(" ", repartyFailList)); - String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, repartyFailList); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Partying:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.YELLOW + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); - failInviting = true; - while (failInviting) { - Thread.sleep(10); - } - if (repartyFailList.size() > 0) { - String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.RED + repartyFails + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); - } - } catch (InterruptedException e) { - e.printStackTrace(); - } - }); - - partyThread.start(); - - return; - } - - party.clear(); repartyFailList.clear(); // MULTI THREAD DRIFTING - partyThread = new Thread(() -> { + new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; RepartyCommand.callTime = (double) System.currentTimeMillis() / 1000; - GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI(); - - + try { - player.sendChatMessage("/pl"); - gettingParty = true; - while (gettingParty) { - Thread.sleep(10); - } - if (party.size() == 0) return; + Thread.sleep(210); + player.sendChatMessage("/p list"); + System.out.println("Grabbing the party members..."); + Thread.sleep(550); + if (RepartyCommand.party.size() == 0) return; + player.sendChatMessage("/p disband"); - disbanding = true; - while (disbanding) { - Thread.sleep(10); - } - player.sendChatMessage("/p " + String.join(" ", party)); - String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, RepartyCommand.party); + Thread.sleep(210); + + String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.party); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.YELLOW + members + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); - inviting = true; - repartyFailList = new ArrayList<>(party); - while (inviting) { - Thread.sleep(10); + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.GOLD + members + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); + + for (int i = 0; i < RepartyCommand.party.size(); i++) { + RepartyCommand.currentMember = RepartyCommand.party.get(i); + player.sendChatMessage("/p " + RepartyCommand.currentMember); + Thread.sleep(400); } - if (repartyFailList.size() > 0) { - String repartyFails = String.join("\n- " + EnumChatFormatting.RED, repartyFailList); + + if (RepartyCommand.repartyFailList.size() > 0) { + Thread.sleep(300); + String failedMembers = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.GOLD, RepartyCommand.repartyFailList); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + - DankersSkyblockMod.MAIN_COLOUR + "Failed to invite:" + EnumChatFormatting.WHITE + "\n- " + - EnumChatFormatting.RED + repartyFails + "\n" + - DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); + DankersSkyblockMod.ERROR_COLOUR + "Unable to Invite:" + EnumChatFormatting.WHITE + "\n- " + + EnumChatFormatting.GOLD + failedMembers + "\n" + + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n")); } } catch (InterruptedException e) { e.printStackTrace(); } - }); - - partyThread.start(); + }).start(); } } \ No newline at end of file -- cgit From 1d7a5d903a91c87291b5b13d275465e6d00fc13f Mon Sep 17 00:00:00 2001 From: Sychic Date: Sun, 24 Jan 2021 20:47:01 -0500 Subject: Add compatibilty to yield for other reparty commands --- src/main/java/me/Danker/DankersSkyblockMod.java | 62 ++++++++++++---------- .../java/me/Danker/commands/RepartyCommand.java | 34 ++++++------ .../java/me/Danker/handlers/ConfigHandler.java | 3 ++ 3 files changed, 56 insertions(+), 43 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 8285bec..019ffe6 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -15,6 +15,7 @@ import net.minecraft.client.gui.*; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; +import net.minecraft.command.ICommand; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.item.EntityItemFrame; @@ -312,36 +313,39 @@ public class DankersSkyblockMod { ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); - ClientCommandHandler.instance.registerCommand(new RepartyCommand()); } @EventHandler public void postInit(final FMLPostInitializationEvent event) { Package[] packages = Package.getPackages(); for(Package p : packages){ - DSMLogger.info(p); if(p.getName().startsWith("com.spiderfrog.gadgets") || p.getName().startsWith("com.spiderfrog.oldanimations")){ usingOAM = true; - break; } } System.out.println("OAM detection: " + usingOAM); - usingLabymod = Loader.isModLoaded("labymod"); System.out.println("LabyMod detection: " + usingLabymod); + + if(!ClientCommandHandler.instance.getCommands().containsKey("reparty")) { + ClientCommandHandler.instance.registerCommand(new RepartyCommand()); + } else if (ConfigHandler.getBoolean("commands", "reparty")) { + for(Map.Entry entry : ClientCommandHandler.instance.getCommands().entrySet()) { + if (entry.getKey().equals("reparty") || entry.getKey().equals("rp")) { + entry.setValue(new RepartyCommand()); + } + } + } + } @SubscribeEvent public void onGuiOpenEvent(GuiOpenEvent event){ if(event.gui instanceof GuiMainMenu && usingOAM && !OAMWarning){ - System.out.println("Gui opened: Instance of GuiMainMenu."); if(!(event.gui instanceof WarningGui)){ - System.out.println("No instance of WarningGui"); event.gui = new WarningGuiRedirect(new WarningGui()); OAMWarning = true; - }else{ - System.out.println("Instance of WarningGui"); } } } @@ -500,16 +504,17 @@ public class DankersSkyblockMod { // Inviting if (RepartyCommand.inviting) { if (message.contains("-----")) { - if (RepartyCommand.Delimiter >= RepartyCommand.party.size() * 2 - 1) { - event.setCanceled(true); - RepartyCommand.Delimiter = 0; - System.out.println("Done Inviting!"); - RepartyCommand.inviting = false; - return; - } else { - RepartyCommand.Delimiter++; - event.setCanceled(true); - return; + switch (RepartyCommand.Delimiter) { + case 1: + event.setCanceled(true); + RepartyCommand.Delimiter = 0; + System.out.println("Player Invited!"); + RepartyCommand.inviting = false; + return; + case 0: + RepartyCommand.Delimiter++; + event.setCanceled(true); + return; } } else if (message.endsWith(" to the party! They have 60 seconds to accept.")) { Pattern invitePattern = Pattern.compile("(?:(?:\\[.+?] )?(?:\\w+) invited )(?:\\[.+?] )?(\\w+)"); @@ -527,16 +532,17 @@ public class DankersSkyblockMod { // Fail Inviting if (RepartyCommand.failInviting) { if (message.contains("-----")) { - if (RepartyCommand.Delimiter >= RepartyCommand.repartyFailList.size() * 2 - 1) { - event.setCanceled(true); - RepartyCommand.Delimiter = 0; - System.out.println("Done Inviting!"); - RepartyCommand.inviting = false; - return; - } else { - RepartyCommand.Delimiter++; - event.setCanceled(true); - return; + switch (RepartyCommand.Delimiter) { + case 1: + event.setCanceled(true); + RepartyCommand.Delimiter = 0; + System.out.println("Player Invited!"); + RepartyCommand.inviting = false; + return; + case 0: + RepartyCommand.Delimiter++; + event.setCanceled(true); + return; } } else if (message.endsWith(" to the party! They have 60 seconds to accept.")) { Pattern invitePattern = Pattern.compile("(?:(?:\\[.+?] )?(?:\\w+) invited )(?:\\[.+?] )?(\\w+)"); diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index fd63f39..d436f90 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -32,7 +32,6 @@ public class RepartyCommand extends CommandBase implements ICommand { public static boolean failInviting = false; public static List party = new ArrayList<>(); public static List repartyFailList = new ArrayList<>(); - public static List joinList = new ArrayList<>(); public static Thread partyThread = null; @Override @@ -57,6 +56,9 @@ public class RepartyCommand extends CommandBase implements ICommand { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { + if (args.length > 0 && args[0].startsWith("sbe")) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("ew imagine using sbe which breaks mojang tos")); + } if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; @@ -91,12 +93,8 @@ public class RepartyCommand extends CommandBase implements ICommand { return; } - boolean ghost = args.length > 0 && (args[0].toLowerCase().equals("g") || args[0].toLowerCase().equals("ghost")); - - if(ghost){ - party.clear(); - repartyFailList.clear(); - } + party.clear(); + repartyFailList.clear(); // MULTI THREAD DRIFTING partyThread = new Thread(() -> { @@ -104,12 +102,10 @@ public class RepartyCommand extends CommandBase implements ICommand { try { - if(ghost){ - player.sendChatMessage("/pl"); - gettingParty = true; - while (gettingParty) { - Thread.sleep(10); - } + player.sendChatMessage("/pl"); + gettingParty = true; + while (gettingParty) { + Thread.sleep(10); } if (party.size() == 0) return; player.sendChatMessage("/p disband"); @@ -117,14 +113,22 @@ public class RepartyCommand extends CommandBase implements ICommand { while (disbanding) { Thread.sleep(10); } - player.sendChatMessage("/p " + String.join(" ", party)); +// player.sendChatMessage("/p " + String.join(" ", party)); String members = String.join(EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW, RepartyCommand.party); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------\n" + DankersSkyblockMod.MAIN_COLOUR + "Repartying:" + EnumChatFormatting.WHITE + "\n- " + EnumChatFormatting.YELLOW + members + "\n" + DankersSkyblockMod.DELIMITER_COLOUR + "-----------------------------")); - inviting = true; repartyFailList = new ArrayList<>(party); + for (String invitee : party) { + player.sendChatMessage("/p " + invitee); + inviting = true; + while (inviting) { + Thread.sleep(10); + } + Thread.sleep(100); + } +// inviting = true; while (inviting) { Thread.sleep(10); } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 9f11aac..9038218 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -452,6 +452,9 @@ public class ConfigHandler { if (!hasKey("colors", "pet80To89")) writeIntConfig("colors", "pet80To89", 0x5C1F35); // idk weird magenta if (!hasKey("colors", "pet90To99")) writeIntConfig("colors", "pet90To99", 0x9E794E); // Brown if (!hasKey("colors", "pet100")) writeIntConfig("colors", "pet100", 0xF2D249); // Gold + + //Commands + if (!hasKey("commands", "reparty")) writeBooleanConfig("commands", "reparty", false); ToggleCommand.gpartyToggled = getBoolean("toggles", "GParty"); ToggleCommand.coordsToggled = getBoolean("toggles", "Coords"); -- cgit From 658ce92df9f08d0da53e53bf61f059f0b15f222f Mon Sep 17 00:00:00 2001 From: Sychic Date: Sun, 24 Jan 2021 20:53:24 -0500 Subject: cleanup --- src/main/java/me/Danker/commands/RepartyCommand.java | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/RepartyCommand.java b/src/main/java/me/Danker/commands/RepartyCommand.java index d436f90..9614daa 100644 --- a/src/main/java/me/Danker/commands/RepartyCommand.java +++ b/src/main/java/me/Danker/commands/RepartyCommand.java @@ -8,20 +8,11 @@ import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.*; import net.minecraft.util.ChatComponentText; -import net.minecraftforge.client.event.*; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.ObfuscationReflectionHelper; -import net.minecraftforge.fml.common.eventhandler.EventPriority; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.util.*; -import java.text.NumberFormat; import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; public class RepartyCommand extends CommandBase implements ICommand { @@ -56,9 +47,6 @@ public class RepartyCommand extends CommandBase implements ICommand { @Override public void processCommand(ICommandSender sender, String[] args) throws CommandException { - if (args.length > 0 && args[0].startsWith("sbe")) { - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("ew imagine using sbe which breaks mojang tos")); - } if (args.length > 0 && (args[0].startsWith("fail") || args[0].equals("f"))) { partyThread = new Thread(() -> { EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; -- cgit From 21bd825c0eb2e9de970fc8b879b6901798aac52e Mon Sep 17 00:00:00 2001 From: Justus Rademacher Date: Thu, 28 Jan 2021 10:37:51 +0100 Subject: Fixxed TriviaSolver showing wrong answer because DwarvenMinesUpdate --- src/main/java/me/Danker/DankersSkyblockMod.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 85d312c..087c0cb 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -243,7 +243,7 @@ public class DankersSkyblockMod { triviaSolutions.put("What is the status of Goldor?", new String[]{"Wither Soldier"}); triviaSolutions.put("What is the status of Storm?", new String[]{"Elementalist"}); triviaSolutions.put("What is the status of Necron?", new String[]{"Wither Lord"}); - triviaSolutions.put("How many total Fairy Souls are there?", new String[]{"209 Fairy Souls"}); + triviaSolutions.put("How many total Fairy Souls are there?", new String[]{"220 Fairy Souls"}); triviaSolutions.put("How many Fairy Souls are there in Spider's Den?", new String[]{"17 Fairy Souls"}); triviaSolutions.put("How many Fairy Souls are there in The End?", new String[]{"12 Fairy Souls"}); triviaSolutions.put("How many Fairy Souls are there in The Barn?", new String[]{"7 Fairy Souls"}); @@ -262,7 +262,7 @@ public class DankersSkyblockMod { triviaSolutions.put("What is the name of the person that upgrades pets?", new String[]{"Kat"}); triviaSolutions.put("What is the name of the lady of the Nether?", new String[]{"Elle"}); triviaSolutions.put("Which villager in the Village gives you a Rogue Sword?", new String[]{"Jamie"}); - triviaSolutions.put("How many unique minions are there?", new String[]{"52 Minions"}); + triviaSolutions.put("How many unique minions are there?", new String[]{"53 Minions"}); triviaSolutions.put("Which of these enemies does not spawn in the Spider's Den?", new String[]{"Zombie Spider", "Cave Spider", "Wither Skeleton", "Dashing Spooder", "Broodfather", "Night Spider"}); triviaSolutions.put("Which of these monsters only spawns at night?", new String[]{"Zombie Villager", "Ghast"}); -- cgit From 35b77eb3357a54a30a930b91fdb9752ee35add20 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Wed, 10 Feb 2021 20:45:35 -0500 Subject: Update cooldown message --- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index b9fc0c3..e979842 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -767,7 +767,7 @@ public class DankersSkyblockMod { return; } // Ability Cooldown - if (!ToggleCommand.cooldownMessages && message.contains("This ability is currently on cooldown for") && message.contains("more second")) { + if (!ToggleCommand.cooldownMessages && message.contains("This ability is on cooldown for ")) { event.setCanceled(true); return; } -- cgit From 3c16133d58943786fe68b021c2bf0c96cb9189dd Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:16:22 -0500 Subject: Add Mythological option to ResetLootCommand --- src/main/java/me/Danker/commands/ResetLootCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index dc968e8..9b4ecfa 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -24,7 +24,7 @@ public class ResetLootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + ""; + return "/" + getCommandName() + ""; } @Override -- cgit From e41036f08456c59ab6c5c4618d05610fb435428d Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:20:31 -0500 Subject: Update wording and don't highlight terminal items in inventory --- src/main/java/me/Danker/DankersSkyblockMod.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index e979842..7b16a36 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -721,10 +721,10 @@ public class DankersSkyblockMod { Utils.createTitle(EnumChatFormatting.YELLOW + "YELLOW PILLAR!", 2); break; case 5: - Utils.createTitle(EnumChatFormatting.GREEN + "LIME PILLAR!", 2); + Utils.createTitle(EnumChatFormatting.DARK_GREEN + "GREEN PILLAR!", 2); break; case 11: - Utils.createTitle(EnumChatFormatting.BLUE + "BLUE PILLAR!", 2); + Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "PURPLE PILLAR!", 2); break; default: Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); @@ -3726,7 +3726,7 @@ public class DankersSkyblockMod { if (ToggleCommand.startsWithToggled && Utils.inDungeons && displayName.startsWith("What starts with:")) { char letter = displayName.charAt(displayName.indexOf("'") + 1); for (Slot slot : invSlots) { - if (slot.getSlotIndex() > 53) continue; + if (slot.inventory == mc.thePlayer.inventory) continue; ItemStack item = slot.getStack(); if (item == null) continue; if (item.isItemEnchanted()) continue; @@ -3747,7 +3747,7 @@ public class DankersSkyblockMod { terminalColorNeeded = colour; for (Slot slot : invSlots) { - if (slot.getSlotIndex() > 53) continue; + if (slot.inventory == mc.thePlayer.inventory) continue; ItemStack item = slot.getStack(); if (item == null) continue; if (item.isItemEnchanted()) continue; -- cgit From efe8267837230ceeccf181a4ca4555967ecebd4a Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:24:19 -0500 Subject: Add Mining 60 support for /skills and Dwarven Mines for /skyblockplayers --- src/main/java/me/Danker/commands/SkillsCommand.java | 2 +- src/main/java/me/Danker/commands/SkyblockPlayersCommand.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java index 2d5cf78..bcaa783 100644 --- a/src/main/java/me/Danker/commands/SkillsCommand.java +++ b/src/main/java/me/Danker/commands/SkillsCommand.java @@ -96,7 +96,7 @@ public class SkillsCommand extends CommandBase { farmingLevel = (double) Math.round(farmingLevel * 100) / 100; } if (userObject.has("experience_skill_mining")) { - miningLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_mining").getAsDouble(), 50); + miningLevel = Utils.xpToSkillLevel(userObject.get("experience_skill_mining").getAsDouble(), 60); miningLevel = (double) Math.round(miningLevel * 100) / 100; } if (userObject.has("experience_skill_combat")) { diff --git a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java index 9558d7d..c69ae6f 100644 --- a/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java +++ b/src/main/java/me/Danker/commands/SkyblockPlayersCommand.java @@ -70,6 +70,7 @@ public class SkyblockPlayersCommand extends CommandBase { int park = 0; // foraging_1 int goldMine = 0; // mining_1 int deepCaverns = 0; // mining_2 + int dwarvenMines = 0; // mining_3 int spidersDen = 0; // combat_1 int blazingFortress = 0; // combat_2 int end = 0; // combat_3 @@ -101,6 +102,9 @@ public class SkyblockPlayersCommand extends CommandBase { if (skyblockPlayers.has("mining_2")) { deepCaverns = skyblockPlayers.get("mining_2").getAsInt(); } + if (skyblockPlayers.has("mining_3")) { + dwarvenMines = skyblockPlayers.get("mining_3").getAsInt(); + } if (skyblockPlayers.has("combat_1")) { spidersDen = skyblockPlayers.get("combat_1").getAsInt(); } @@ -135,6 +139,7 @@ public class SkyblockPlayersCommand extends CommandBase { DankersSkyblockMod.TYPE_COLOUR + " Park: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(park) + " / " + Utils.getPercentage(park, skyblockTotalPlayers) + "%\n" + DankersSkyblockMod.TYPE_COLOUR + " Gold Mine: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(goldMine) + " / " + Utils.getPercentage(goldMine, skyblockTotalPlayers) + "%\n" + DankersSkyblockMod.TYPE_COLOUR + " Deep Caverns: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(deepCaverns) + " / " + Utils.getPercentage(deepCaverns, skyblockTotalPlayers) + "%\n" + + DankersSkyblockMod.TYPE_COLOUR + " Dwarven Mines: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(dwarvenMines) + " / " + Utils.getPercentage(dwarvenMines, skyblockTotalPlayers) + "%\n" + DankersSkyblockMod.TYPE_COLOUR + " Spider's Den: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(spidersDen) + " / " + Utils.getPercentage(spidersDen, skyblockTotalPlayers) + "%\n" + DankersSkyblockMod.TYPE_COLOUR + " Blazing Fortress: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(blazingFortress) + " / " + Utils.getPercentage(blazingFortress, skyblockTotalPlayers) + "%\n" + DankersSkyblockMod.TYPE_COLOUR + " The End: " + DankersSkyblockMod.VALUE_COLOUR + nf.format(end) + " / " + Utils.getPercentage(end, skyblockTotalPlayers) + "%\n" + -- cgit From ac5fd3d50845447eb90791b5bf4c1988c4d758bb Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:25:21 -0500 Subject: Add Mining 60 to the skill tracker --- src/main/java/me/Danker/DankersSkyblockMod.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 7b16a36..742cc82 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -572,8 +572,8 @@ public class DankersSkyblockMod { } } timeSinceGained = System.currentTimeMillis() / 1000; - - int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50; + + int limit = section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining") ? 60 : 50; double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")); xpLeft = xpToLevelUp - currentXP; @@ -641,7 +641,7 @@ public class DankersSkyblockMod { double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); int limit; int totalXp; - if (section.contains("Farming") || section.contains("Enchanting")) { + if (section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining")) { limit = 60; totalXp = 111672425; } else { -- cgit From e9b6d1907a86fa0185271c35c6524c4f5e7c99af Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Wed, 10 Feb 2021 21:26:21 -0500 Subject: Reworked /pets command to include Mythics --- src/main/java/me/Danker/commands/PetsCommand.java | 232 ++++++++++------------ 1 file changed, 100 insertions(+), 132 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/PetsCommand.java b/src/main/java/me/Danker/commands/PetsCommand.java index 7b1b52f..a7824e4 100644 --- a/src/main/java/me/Danker/commands/PetsCommand.java +++ b/src/main/java/me/Danker/commands/PetsCommand.java @@ -16,20 +16,21 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; public class PetsCommand extends CommandBase { static int petXpToLevel(double xp, String rarity) { int[] xpPerLevel = {100, 110, 120, 130, 145, 160, 175, 190, 210, 230, 250, 275, 300, 330, 360, 400, 440, 490, 540, 600, 660, 730, - 800, 880, 960, 1050, 1150, 1260, 1380, 1510, 1650, 1800, 1960, 2130, 2310, 2500, 2700, 2920, 3160, 3420, 3700, - 4000, 4350, 4750, 5200, 5700, 6300, 7000, 7800, 8700, 9700, 10800, 12000, 13300, 14700, 16200, 17800, 19500, - 21300, 23200, 25200, 27400, 29800, 32400, 35200, 38200, 41400, 44800, 48400, 52200, 56200, 60400, 64800, 69400, - 74200, 79200, 84700, 90700, 97200, 104200, 111700, 119700, 128200, 137200, 146700, 156700, 167700, 179700, 192700, - 206700, 221700, 237700, 254700, 272700, 291700, 311700, 333700, 357700, 383700, 411700, 441700, 476700, 516700, - 561700, 611700, 666700, 726700, 791700, 861700, 936700, 1016700, 1101700, 1191700, 1286700, 1386700, 1496700, - 1616700, 1746700, 1886700}; - + 800, 880, 960, 1050, 1150, 1260, 1380, 1510, 1650, 1800, 1960, 2130, 2310, 2500, 2700, 2920, 3160, 3420, 3700, + 4000, 4350, 4750, 5200, 5700, 6300, 7000, 7800, 8700, 9700, 10800, 12000, 13300, 14700, 16200, 17800, 19500, + 21300, 23200, 25200, 27400, 29800, 32400, 35200, 38200, 41400, 44800, 48400, 52200, 56200, 60400, 64800, 69400, + 74200, 79200, 84700, 90700, 97200, 104200, 111700, 119700, 128200, 137200, 146700, 156700, 167700, 179700, 192700, + 206700, 221700, 237700, 254700, 272700, 291700, 311700, 333700, 357700, 383700, 411700, 441700, 476700, 516700, + 561700, 611700, 666700, 726700, 791700, 861700, 936700, 1016700, 1101700, 1191700, 1286700, 1386700, 1496700, + 1616700, 1746700, 1886700}; + int levelOffset = 0; switch (rarity) { case "UNCOMMON": @@ -44,8 +45,11 @@ public class PetsCommand extends CommandBase { case "LEGENDARY": levelOffset = 20; break; + case "MYTHIC": + levelOffset = 20; + break; } - + for (int i = levelOffset, xpAdded = 0; i < levelOffset + 99; i++) { xpAdded += xpPerLevel[i]; if (xp < xpAdded) { @@ -54,7 +58,67 @@ public class PetsCommand extends CommandBase { } return 100; } - + + enum Rarity { + COMMON, + UNCOMMON, + RARE, + EPIC, + LEGENDARY, + MYTHIC; + + public Rarity nextRarity() { + if (this.ordinal() == Rarity.values().length) return this; + return Rarity.values()[this.ordinal() + 1]; + } + + public EnumChatFormatting getChatColor() { + if (this == Rarity.COMMON) return EnumChatFormatting.WHITE; + if (this == Rarity.UNCOMMON) return EnumChatFormatting.GREEN; + if (this == Rarity.RARE) return EnumChatFormatting.BLUE; + if (this == Rarity.EPIC) return EnumChatFormatting.DARK_PURPLE; + if (this == Rarity.LEGENDARY) return EnumChatFormatting.GOLD; + if (this == Rarity.MYTHIC) return EnumChatFormatting.LIGHT_PURPLE; + return null; + } + } + + class Pet { + + public Rarity rarity; + public double xp; + public boolean active; + public boolean rarityBoosted = false; + public String name; + + Pet(JsonObject pet) { + Rarity rarity = Rarity.valueOf(pet.get("tier").getAsString()); + if (!pet.get("heldItem").isJsonNull()) { + String petItemID = pet.get("heldItem").getAsString(); + switch (petItemID) { + case "PET_ITEM_VAMPIRE_FANG": + case "PET_ITEM_TOY_JERRY": + case "PET_ITEM_TIER_BOOST": + rarityBoosted = true; + rarity = rarity.nextRarity(); + } + } + this.active = pet.get("active").getAsBoolean(); + this.name = Utils.capitalizeString(pet.get("type").getAsString());; + this.rarity = rarity; + this.xp = pet.get("exp").getAsDouble(); + } + + public String getStringToAdd() { + int level = petXpToLevel(this.xp, this.rarity.name()); + + String messageToAdd = rarity.getChatColor() + " " + (this.active ? EnumChatFormatting.BOLD + ">>> " : "") + Utils.capitalizeString(this.rarity.name()) + (this.rarityBoosted ? " ⇑" : "") + " " + this.name + " (" + level + ")" + (this.active ? " <<<" : ""); + + return messageToAdd + "\n"; + } + + } + @Override public String getCommandName() { return "petsof"; @@ -64,12 +128,12 @@ public class PetsCommand extends CommandBase { public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " [name]"; } - + @Override public int getRequiredPermissionLevel() { return 0; } - + @Override public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { @@ -83,13 +147,13 @@ public class PetsCommand extends CommandBase { // MULTI THREAD DRIFTING new Thread(() -> { EntityPlayer player = (EntityPlayer) arg0; - + // Check key String key = ConfigHandler.getString("api", "APIKey"); if (key.equals("")) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); } - + // Get UUID for Hypixel API requests String username; String uuid; @@ -102,11 +166,11 @@ public class PetsCommand extends CommandBase { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking pets of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); uuid = APIHandler.getUUID(username); } - + // Find stats of latest profile String latestProfile = APIHandler.getLatestProfileID(uuid, key); if (latestProfile == null) return; - + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); JsonObject profileResponse = APIHandler.getResponse(profileURL); @@ -115,137 +179,41 @@ public class PetsCommand extends CommandBase { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); return; } - + System.out.println("Fetching pets..."); JsonArray petsArray = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("pets").getAsJsonArray(); if (petsArray.size() == 0) { player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + username + " has no pets.")); return; } - + System.out.println("Looping through pets..."); // Push each pet into list - List sortedPets = new ArrayList<>(); + List pets = new ArrayList<>(); for (JsonElement petElement : petsArray) { - sortedPets.add(petElement); + pets.add(new Pet(petElement.getAsJsonObject())); } - - // Sort pets by exp - sortedPets.sort((pet1, pet2) -> { - double petXp1 = pet1.getAsJsonObject().get("exp").getAsDouble(); - double petXp2 = pet2.getAsJsonObject().get("exp").getAsDouble(); - return -Double.compare(petXp1, petXp2); + + // Sort pets by exp and rarity + pets.sort((pet1, pet2) -> { + int rarity = pet1.rarity.compareTo(pet2.rarity); + int xp = Double.compare(pet1.xp, pet2.xp); + if (rarity != 0) return -rarity; + return -xp; }); - - // Sort pets into rarities - List commonPets = new ArrayList<>(); - List uncommonPets = new ArrayList<>(); - List rarePets = new ArrayList<>(); - List epicPets = new ArrayList<>(); - List legendaryPets = new ArrayList<>(); - - for (JsonElement petElement : sortedPets) { - JsonObject pet = petElement.getAsJsonObject(); - String rarity = pet.get("tier").getAsString(); - - switch (rarity) { - case "COMMON": - commonPets.add(pet); - break; - case "UNCOMMON": - uncommonPets.add(pet); - break; - case "RARE": - rarePets.add(pet); - break; - case "EPIC": - epicPets.add(pet); - break; - case "LEGENDARY": - legendaryPets.add(pet); - break; - } - } - - int totalPets = commonPets.size() + uncommonPets.size() + rarePets.size() + epicPets.size() + legendaryPets.size(); + String finalMessage = DankersSkyblockMod.DELIMITER_COLOUR + "" + EnumChatFormatting.BOLD + "-------------------\n" + - EnumChatFormatting.AQUA + " " + username + "'s Pets (" + totalPets + "):\n"; - - // Loop through pet rarities - for (JsonObject legPet : legendaryPets) { - String petName = Utils.capitalizeString(legPet.get("type").getAsString()); - int level = petXpToLevel(legPet.get("exp").getAsDouble(), "LEGENDARY"); - - String messageToAdd; - if (legPet.get("active").getAsBoolean()) { - messageToAdd = EnumChatFormatting.GOLD + " " + EnumChatFormatting.BOLD + ">>> Legendary " + petName + " (" + level + ") <<<"; - } else { - messageToAdd = EnumChatFormatting.GOLD + " Legendary " + petName + " (" + level + ")"; - } - - finalMessage += messageToAdd + "\n"; - } - - for (JsonObject epicPet: epicPets) { - String petName = Utils.capitalizeString(epicPet.get("type").getAsString()); - int level = petXpToLevel(epicPet.get("exp").getAsDouble(), "EPIC"); - - String messageToAdd; - if (epicPet.get("active").getAsBoolean()) { - messageToAdd = EnumChatFormatting.DARK_PURPLE + " " + EnumChatFormatting.BOLD + ">>> Epic " + petName + " (" + level + ") <<<"; - } else { - messageToAdd = EnumChatFormatting.DARK_PURPLE + " Epic " + petName + " (" + level + ")"; - } - - finalMessage += messageToAdd + "\n"; - } - - for (JsonObject rarePet: rarePets) { - String petName = Utils.capitalizeString(rarePet.get("type").getAsString()); - int level = petXpToLevel(rarePet.get("exp").getAsDouble(), "RARE"); - - String messageToAdd; - if (rarePet.get("active").getAsBoolean()) { - messageToAdd = EnumChatFormatting.BLUE + " " + EnumChatFormatting.BOLD + ">>> Rare " + petName + " (" + level + ") <<<"; - } else { - messageToAdd = EnumChatFormatting.BLUE + " Rare " + petName + " (" + level + ")"; - } - - finalMessage += messageToAdd + "\n"; - } - - for (JsonObject uncommonPet: uncommonPets) { - String petName = Utils.capitalizeString(uncommonPet.get("type").getAsString()); - int level = petXpToLevel(uncommonPet.get("exp").getAsDouble(), "UNCOMMON"); - - String messageToAdd; - if (uncommonPet.get("active").getAsBoolean()) { - messageToAdd = EnumChatFormatting.GREEN + " " + EnumChatFormatting.BOLD + ">>> Uncommon " + petName + " (" + level + ") <<<"; - } else { - messageToAdd = EnumChatFormatting.GREEN + " Uncommon " + petName + " (" + level + ")"; - } - - finalMessage += messageToAdd + "\n"; - } - - for (JsonObject commonPet: commonPets) { - String petName = Utils.capitalizeString(commonPet.get("type").getAsString()); - int level = petXpToLevel(commonPet.get("exp").getAsDouble(), "COMMON"); - - String messageToAdd; - if (commonPet.get("active").getAsBoolean()) { - messageToAdd = EnumChatFormatting.BOLD + ">>> Common " + petName + " (" + level + ") <<<"; - } else { - messageToAdd = " Common " + petName + " (" + level + ")"; - } - - finalMessage += messageToAdd + "\n"; + EnumChatFormatting.AQUA + " " + username + "'s Pets (" + pets.size() + "):\n"; + + // Loop through pets + for(Pet pet : pets) { + finalMessage += pet.getStringToAdd(); } - + finalMessage += DankersSkyblockMod.DELIMITER_COLOUR + " " + EnumChatFormatting.BOLD + "-------------------"; player.addChatMessage(new ChatComponentText(finalMessage)); - + }).start(); } -} +} \ No newline at end of file -- cgit From b0a07f3b5861415e3d5b3f24dce06b03bf34e13d Mon Sep 17 00:00:00 2001 From: My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> Date: Thu, 11 Feb 2021 22:23:10 -0500 Subject: Blaze Positions don't reset --- src/main/java/me/Danker/DankersSkyblockMod.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 742cc82..bead466 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -416,6 +416,8 @@ public class DankersSkyblockMod { public void onWorldChange(WorldEvent.Load event) { foundLivid = false; livid = null; + lowestBlaze = null; + highestBlaze = null; nextBonzoUse = 0; } @@ -3143,7 +3145,7 @@ public class DankersSkyblockMod { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { - if (ToggleCommand.blazeToggled) { + if (ToggleCommand.blazeToggled && Utils.inDungeons) { if (lowestBlaze != null) { BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Smallest", LOWEST_BLAZE_COLOUR, event.partialTicks); -- cgit From 50687d5b7d6a2bea7e55a314f925cbea81284567 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 15 Feb 2021 00:41:56 -0500 Subject: Highlight correct 3 weirdos chest --- src/main/java/me/Danker/DankersSkyblockMod.java | 30 ++++++++++- src/main/java/me/Danker/utils/Utils.java | 66 +++++++++++++++++++++++-- 2 files changed, 91 insertions(+), 5 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index e979842..1aafab8 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -113,6 +113,7 @@ public class DankersSkyblockMod { static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", "The reward isn't in any of our chests", "Both of them are telling the truth."}; + static BlockPos riddleChest = null; static Map triviaSolutions = new HashMap<>(); static String[] triviaAnswers = null; static Entity highestBlaze = null; @@ -414,6 +415,7 @@ public class DankersSkyblockMod { @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { + riddleChest = null; foundLivid = false; livid = null; nextBonzoUse = 0; @@ -683,8 +685,30 @@ public class DankersSkyblockMod { if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) { for (String solution : riddleSolutions) { if (message.contains(solution)) { + Minecraft mc = Minecraft.getMinecraft(); String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":")); - Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing.")); + mc.thePlayer.addChatMessage(new ChatComponentText(ANSWER_COLOUR + EnumChatFormatting.BOLD + StringUtils.stripControlCodes(npcName) + MAIN_COLOUR + " has the blessing.")); + if (riddleChest == null) { + List entities = mc.theWorld.getLoadedEntityList(); + for (Entity entity : entities) { + if (entity == null || !entity.hasCustomName()) continue; + if (entity.getCustomNameTag().contains(npcName)) { + BlockPos npcLocation = new BlockPos(entity.posX, 69, entity.posZ); + if (mc.theWorld.getBlockState(npcLocation.north()).getBlock() == Blocks.chest) { + riddleChest = npcLocation.north(); + } else if (mc.theWorld.getBlockState(npcLocation.east()).getBlock() == Blocks.chest) { + riddleChest = npcLocation.east(); + } else if (mc.theWorld.getBlockState(npcLocation.south()).getBlock() == Blocks.chest) { + riddleChest = npcLocation.south(); + } else if (mc.theWorld.getBlockState(npcLocation.west()).getBlock() == Blocks.chest) { + riddleChest = npcLocation.west(); + } else { + System.out.print("Could not find correct riddle chest."); + } + break; + } + } + } break; } } @@ -3143,6 +3167,10 @@ public class DankersSkyblockMod { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { + if (ToggleCommand.threeManToggled && riddleChest != null) { + Utils.drawFilled3DBox(new AxisAlignedBB(riddleChest.getX() - 0.05, riddleChest.getY(), riddleChest.getZ() - 0.05, riddleChest.getX() + 1.05, riddleChest.getY() + 1, riddleChest.getZ() + 1.05), 0x197F19, true, event.partialTicks); + } + if (ToggleCommand.blazeToggled) { if (lowestBlaze != null) { BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index abda6a3..b7c2ddf 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -8,10 +8,7 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.network.NetworkPlayerInfo; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.entity.Entity; @@ -413,6 +410,67 @@ public class Utils { GlStateManager.popMatrix(); } + public static void drawFilled3DBox(AxisAlignedBB aabb, int colourInt, boolean translucent, float partialTicks) { + Entity render = Minecraft.getMinecraft().getRenderViewEntity(); + WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer(); + Color colour = new Color(colourInt); + + double realX = render.lastTickPosX + (render.posX - render.lastTickPosX) * partialTicks; + double realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks; + double realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks; + + GlStateManager.pushMatrix(); + GlStateManager.pushAttrib(); + GlStateManager.translate(-realX, -realY, -realZ); + GlStateManager.disableTexture2D(); + GlStateManager.enableAlpha(); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, translucent ? 1 : 771, 1, 0); + GlStateManager.disableCull(); + GlStateManager.color(colour.getRed() / 255f, colour.getGreen() / 255f, colour.getBlue() / 255f, colour.getAlpha() / 255f); + worldRenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION); + // Bottom + worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex(); + // Top + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex(); + // West + worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex(); + // East + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex(); + // North + worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex(); + // South + worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex(); + Tessellator.getInstance().draw(); + + GlStateManager.translate(realX, realY, realZ); + GlStateManager.enableCull(); + GlStateManager.disableAlpha(); + GlStateManager.disableBlend(); + GlStateManager.enableTexture2D(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.popAttrib(); + GlStateManager.popMatrix(); + } + public static void renderItem(ItemStack item, float x, float y, float z) { GlStateManager.enableRescaleNormal(); -- cgit From e07ddd78ad98bf72122bc175e3a3aebfeb467605 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 15 Feb 2021 00:57:55 -0500 Subject: Fix low health alert when with youtuber/admin with number in username --- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 1aafab8..b45aa58 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3044,7 +3044,7 @@ public class DankersSkyblockMod { if (ToggleCommand.lowHealthNotifyToggled && Utils.inDungeons && world != null) { List scoreboard = ScoreboardHandler.getSidebarLines(); for (String score : scoreboard) { - if (score.endsWith("❤") && score.matches(".*§c\\d.*")) { + if (score.endsWith("❤") && score.matches(".* §c\\d.*")) { String name = score.substring(score.indexOf(" ") + 1); Utils.createTitle(EnumChatFormatting.RED + "LOW HEALTH!\n" + name, 1); break; -- cgit From 7260dd02a2d39512b0c83488894579a0a8a0a960 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 15 Feb 2021 00:59:57 -0500 Subject: Add alias to slayers command (/slayer) --- src/main/java/me/Danker/commands/SlayerCommand.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/SlayerCommand.java b/src/main/java/me/Danker/commands/SlayerCommand.java index 6c83934..e7f78f1 100644 --- a/src/main/java/me/Danker/commands/SlayerCommand.java +++ b/src/main/java/me/Danker/commands/SlayerCommand.java @@ -14,6 +14,7 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import java.text.NumberFormat; +import java.util.Collections; import java.util.List; import java.util.Locale; @@ -24,6 +25,11 @@ public class SlayerCommand extends CommandBase { return "slayer"; } + @Override + public List getCommandAliases() { + return Collections.singletonList("slayer"); + } + @Override public String getCommandUsage(ICommandSender arg0) { return "/" + getCommandName() + " [name]"; -- cgit From 96233a6c7c9b76cfff49ae107a550ed63ef9728b Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 15 Feb 2021 20:44:31 -0500 Subject: Hide incorrect livid nametags --- src/main/java/me/Danker/DankersSkyblockMod.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index b45aa58..c1d3e7f 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1,6 +1,5 @@ package me.Danker; -import akka.event.Logging; import com.google.gson.JsonObject; import me.Danker.commands.*; import me.Danker.gui.*; @@ -46,7 +45,6 @@ import net.minecraftforge.client.event.*; import net.minecraftforge.client.event.sound.PlaySoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.EntityJoinWorldEvent; -import net.minecraftforge.event.entity.player.AttackEntityEvent; import net.minecraftforge.event.entity.player.*; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; @@ -69,7 +67,6 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import java.awt.*; -import java.net.URLDecoder; import java.text.NumberFormat; import java.util.List; import java.util.*; @@ -2540,6 +2537,17 @@ public class DankersSkyblockMod { new TextRenderer(mc, skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale); } } + + @SubscribeEvent + public void onRenderEntity(RenderLivingEvent.Pre event) { + Entity entity = event.entity; + String name = entity.getName(); + if (entity instanceof EntityArmorStand) { + if (ToggleCommand.lividSolverToggled && !entity.isEntityEqual(livid) && name.contains("Livid") && name.length() > 5 && name.charAt(1) == name.charAt(5)) { + event.setCanceled(true); + } + } + } @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSound(final PlaySoundEvent event) { -- cgit From 50783f6024e876436380303b53dcea7d58d9a1bc Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 15 Feb 2021 22:27:01 -0500 Subject: Add ultrasequencer, chronomatron, click in order solver colours to config --- src/main/java/me/Danker/DankersSkyblockMod.java | 22 ++++++++++++++-------- .../java/me/Danker/handlers/ConfigHandler.java | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 10 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index c1d3e7f..671b6ab 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -191,6 +191,12 @@ public class DankersSkyblockMod { public static int PET_80_TO_89; public static int PET_90_TO_99; public static int PET_100; + public static int ULTRASEQUENCER_NEXT; + public static int ULTRASEQUENCER_NEXT_TO_NEXT; + public static int CHRONOMATRON_NEXT; + public static int CHRONOMATRON_NEXT_TO_NEXT; + public static int CLICK_IN_ORDER_NEXT; + public static int CLICK_IN_ORDER_NEXT_TO_NEXT; @EventHandler public void init(FMLInitializationEvent event) { @@ -3796,10 +3802,10 @@ public class DankersSkyblockMod { if (ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) { Slot slot = invSlots.get(terminalNumberNeeded[1]); - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, new Color(255, 0, 221, 255).getRGB()); + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, CLICK_IN_ORDER_NEXT + 0xFF000000); Slot nextSlot = invSlots.get(terminalNumberNeeded[3]); if (nextSlot != slot && nextSlot.getSlotIndex() != 0) { - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, new Color(11, 239, 231, 255).getRGB()); + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, CLICK_IN_ORDER_NEXT_TO_NEXT + 0xFF000000); } } @@ -3817,12 +3823,12 @@ public class DankersSkyblockMod { } if (clickInOrderSlots[lastUltraSequencerClicked] != null) { Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xE540FF40); + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT + 0xE5000000); } if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, 0xD740DAE6); + Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT_TO_NEXT + 0xD7000000); } } } @@ -3855,15 +3861,15 @@ public class DankersSkyblockMod { if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) { if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); } } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xBE40DAE6); + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT_TO_NEXT + 0XBE000000); } } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, 0xE540FF40); + Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); } } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 9038218..05c6804 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -394,7 +394,6 @@ public class ConfigHandler { if (!hasKey("misc", "showSkillTracker")) writeBooleanConfig("misc", "showSkillTracker", false); if (!hasKey("misc", "firstLaunch")) writeBooleanConfig("misc", "firstLaunch", true); - ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft()); int height = scaled.getScaledHeight(); if (!hasKey("locations", "coordsX")) writeIntConfig("locations", "coordsX", 5); @@ -452,8 +451,14 @@ public class ConfigHandler { if (!hasKey("colors", "pet80To89")) writeIntConfig("colors", "pet80To89", 0x5C1F35); // idk weird magenta if (!hasKey("colors", "pet90To99")) writeIntConfig("colors", "pet90To99", 0x9E794E); // Brown if (!hasKey("colors", "pet100")) writeIntConfig("colors", "pet100", 0xF2D249); // Gold + if (!hasKey("colors", "ultrasequencerNext")) writeIntConfig("colors", "ultrasequencerNext", 0x40FF40); + if (!hasKey("colors", "ultrasequencerNextToNext")) writeIntConfig("colors", "ultrasequencerNextToNext", 0x40DAE6); + if (!hasKey("colors", "chronomatronNext")) writeIntConfig("colors", "chronomatronNext", 0x40FF40); + if (!hasKey("colors", "chronomatronNextToNext")) writeIntConfig("colors", "chronomatronNextToNext", 0x40DAE6); + if (!hasKey("colors", "clickInOrderNext")) writeIntConfig("colors", "clickInOrderNext", 0xFF00DD); + if (!hasKey("colors", "clickInOrderNextToNext")) writeIntConfig("colors", "clickInOrderNextToNext", 0x0BEFE7); - //Commands + // Commands if (!hasKey("commands", "reparty")) writeBooleanConfig("commands", "reparty", false); ToggleCommand.gpartyToggled = getBoolean("toggles", "GParty"); @@ -740,6 +745,12 @@ public class ConfigHandler { DankersSkyblockMod.PET_80_TO_89 = getInt("colors", "pet80To89"); DankersSkyblockMod.PET_90_TO_99 = getInt("colors", "pet90To99"); DankersSkyblockMod.PET_100 = getInt("colors", "pet100"); + DankersSkyblockMod.ULTRASEQUENCER_NEXT = getInt("colors", "ultrasequencerNext"); + DankersSkyblockMod.ULTRASEQUENCER_NEXT_TO_NEXT = getInt("colors", "ultrasequencerNextToNext"); + DankersSkyblockMod.CHRONOMATRON_NEXT = getInt("colors", "chronomatronNext"); + DankersSkyblockMod.CHRONOMATRON_NEXT_TO_NEXT = getInt("colors", "chronomatronNextToNext"); + DankersSkyblockMod.CLICK_IN_ORDER_NEXT = getInt("colors", "clickInOrderNext"); + DankersSkyblockMod.CLICK_IN_ORDER_NEXT_TO_NEXT = getInt("colors", "clickInOrderNextToNext"); } } -- cgit From 5fb8f923374e32adf4fadf6c9b0e7fe8dade0418 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 15 Feb 2021 22:38:07 -0500 Subject: Add mining 60 support in /skills when using achievement API --- src/main/java/me/Danker/commands/SkillsCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/SkillsCommand.java b/src/main/java/me/Danker/commands/SkillsCommand.java index 2d5cf78..362777f 100644 --- a/src/main/java/me/Danker/commands/SkillsCommand.java +++ b/src/main/java/me/Danker/commands/SkillsCommand.java @@ -141,7 +141,7 @@ public class SkillsCommand extends CommandBase { farmingLevel = achievementObject.get("skyblock_harvester").getAsInt(); } if (achievementObject.has("skyblock_excavator")) { - miningLevel = Math.min(achievementObject.get("skyblock_excavator").getAsInt(), 50); + miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); } if (achievementObject.has("skyblock_combat")) { combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50); -- cgit From 5d20b7fec0a3f9a866cad488f73fa061cc66efd9 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 16 Feb 2021 17:33:58 -0500 Subject: Fix only slayer turning back on after pressing Go Back --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- src/main/java/me/Danker/gui/OnlySlayerGui.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index 26dd98f..afc4ff8 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta8" +version = "1.8.5-beta9" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 671b6ab..604f57f 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -76,7 +76,7 @@ import java.util.regex.Pattern; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta8"; + public static final String VERSION = "1.8.5-beta9"; static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); diff --git a/src/main/java/me/Danker/gui/OnlySlayerGui.java b/src/main/java/me/Danker/gui/OnlySlayerGui.java index 89c701d..a3c8ffc 100644 --- a/src/main/java/me/Danker/gui/OnlySlayerGui.java +++ b/src/main/java/me/Danker/gui/OnlySlayerGui.java @@ -95,6 +95,7 @@ public class OnlySlayerGui extends GuiScreen { public void actionPerformed(GuiButton button) { if (button == goBack) { DankersSkyblockMod.guiToOpen = "dankergui1"; + return; } else if (button == off) { BlockSlayerCommand.onlySlayerName = ""; BlockSlayerCommand.onlySlayerNumber = ""; -- cgit From 74e7ad6f48d557f611b7ffe20a53fffd3bb5f604 Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Mon, 22 Feb 2021 13:08:34 +0100 Subject: added an easy fairy souls command --- src/main/java/me/Danker/DankersSkyblockMod.java | 1 + .../java/me/Danker/commands/FairySoulsCommand.java | 90 ++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 src/main/java/me/Danker/commands/FairySoulsCommand.java (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 69dc6ee..c5c1434 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -313,6 +313,7 @@ public class DankersSkyblockMod { ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand()); ClientCommandHandler.instance.registerCommand(new DankerGuiCommand()); ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand()); + ClientCommandHandler.instance.registerCommand(new FairySoulsCommand()); } @EventHandler diff --git a/src/main/java/me/Danker/commands/FairySoulsCommand.java b/src/main/java/me/Danker/commands/FairySoulsCommand.java new file mode 100644 index 0000000..2475435 --- /dev/null +++ b/src/main/java/me/Danker/commands/FairySoulsCommand.java @@ -0,0 +1,90 @@ +package me.Danker.commands; + +import com.google.gson.JsonObject; +import me.Danker.DankersSkyblockMod; +import me.Danker.handlers.APIHandler; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.BlockPos; +import net.minecraft.util.ChatComponentText; + +import java.util.List; + +public class FairySoulsCommand extends CommandBase { + @Override + public String getCommandName() { + return "fairysouls"; + } + + @Override + public String getCommandUsage(ICommandSender sender) { + return "/" + getCommandName() + "[name]"; + } + + @Override + public int getRequiredPermissionLevel() { + return 0; + } + + @Override + public List addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { + if (args.length == 1) { + return Utils.getMatchingPlayers(args[0]); + } + return null; + } + + @Override + public void processCommand(ICommandSender sender, String[] args) throws CommandException { + EntityPlayer player = ((EntityPlayer) sender); + // MULTI THREAD DRIFTING + new Thread(() -> { + + // Check key + String key = ConfigHandler.getString("api", "APIKey"); + if(key.equals("")) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "API key not set. Use /setkey.")); + } + + // Get UUID for Hypixel API requests + String username, uuid; + if(args.length == 0) { + username = player.getName(); + uuid = player.getUniqueID().toString().replace("[\\-]", ""); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking fairy souls of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + } else { + username = args[0]; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking fairy souls of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); + uuid = APIHandler.getUUID(username); + } + + // Find fairy souls of latest profile + String latestProfile = APIHandler.getLatestProfileID(uuid, key); + if (latestProfile == null) return; + + String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; + System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL); + if (!profileResponse.get("success").getAsBoolean()) { + String reason = profileResponse.get("cause").getAsString(); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Failed with reason: " + reason)); + return; + } + + // Extracting the fairy souls from the json data + System.out.println("Fetching fairy souls"); + JsonObject userObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject(); + + int fairy_souls = userObject.get("fairy_souls_collected").getAsInt(); + System.out.println(fairy_souls); + + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "The player " + username + " has " + DankersSkyblockMod.VALUE_COLOUR + fairy_souls + DankersSkyblockMod.MAIN_COLOUR + "/220" + " collected")); + + }).start(); + + } +} -- cgit From 76e11acb0375b2ff840f7cdd254d4d599e019f36 Mon Sep 17 00:00:00 2001 From: CuzImClicks Date: Mon, 22 Feb 2021 14:20:06 +0100 Subject: small fix --- .gitignore | 10 ++++++++++ src/main/java/me/Danker/commands/FairySoulsCommand.java | 6 ++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/.gitignore b/.gitignore index f354308..db10469 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,13 @@ build eclipse run *.txt +*.cfg +*.gz +*.log +*.dat +*.mca +*.json +*.dat_mcr +*.lock +*.dat_old +*.properties diff --git a/src/main/java/me/Danker/commands/FairySoulsCommand.java b/src/main/java/me/Danker/commands/FairySoulsCommand.java index 2475435..77a7586 100644 --- a/src/main/java/me/Danker/commands/FairySoulsCommand.java +++ b/src/main/java/me/Danker/commands/FairySoulsCommand.java @@ -51,10 +51,11 @@ public class FairySoulsCommand extends CommandBase { } // Get UUID for Hypixel API requests - String username, uuid; + String username; + String uuid; if(args.length == 0) { username = player.getName(); - uuid = player.getUniqueID().toString().replace("[\\-]", ""); + uuid = APIHandler.getUUID(username); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Checking fairy souls of " + DankersSkyblockMod.SECONDARY_COLOUR + username)); } else { username = args[0]; @@ -68,6 +69,7 @@ public class FairySoulsCommand extends CommandBase { String profileURL = "https://api.hypixel.net/skyblock/profile?profile=" + latestProfile + "&key=" + key; System.out.println("Fetching profile..."); + JsonObject profileResponse = APIHandler.getResponse(profileURL); if (!profileResponse.get("success").getAsBoolean()) { String reason = profileResponse.get("cause").getAsString(); -- cgit From 39fd27efe81309f4c7ecda700f76a17a1e34a729 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 22 Feb 2021 08:21:49 -0500 Subject: Add mining 60 support to /lobbyskills --- src/main/java/me/Danker/commands/LobbySkillsCommand.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/commands/LobbySkillsCommand.java b/src/main/java/me/Danker/commands/LobbySkillsCommand.java index e5bf98c..61ceea7 100644 --- a/src/main/java/me/Danker/commands/LobbySkillsCommand.java +++ b/src/main/java/me/Danker/commands/LobbySkillsCommand.java @@ -100,7 +100,7 @@ public class LobbySkillsCommand extends CommandBase { farmingLevel = (double) Math.round(farmingLevel * 100) / 100; } if (latestProfile.has("experience_skill_mining")) { - miningLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_mining").getAsDouble(), 50); + miningLevel = Utils.xpToSkillLevel(latestProfile.get("experience_skill_mining").getAsDouble(), 60); miningLevel = (double) Math.round(miningLevel * 100) / 100; } if (latestProfile.has("experience_skill_combat")) { @@ -143,7 +143,7 @@ public class LobbySkillsCommand extends CommandBase { farmingLevel = achievementObject.get("skyblock_harvester").getAsInt(); } if (achievementObject.has("skyblock_excavator")) { - miningLevel = Math.min(achievementObject.get("skyblock_excavator").getAsInt(), 50); + miningLevel = achievementObject.get("skyblock_excavator").getAsInt(); } if (achievementObject.has("skyblock_combat")) { combatLevel = Math.min(achievementObject.get("skyblock_combat").getAsInt(), 50); -- cgit From e5867ce13151e6689b5b4097fef610fe30650607 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Mon, 22 Feb 2021 18:03:59 -0500 Subject: Remove broken feature --- src/main/java/me/Danker/DankersSkyblockMod.java | 33 ---------------------- src/main/java/me/Danker/commands/DHelpCommand.java | 2 +- .../java/me/Danker/commands/DankerGuiCommand.java | 1 - .../java/me/Danker/commands/ToggleCommand.java | 9 ++---- src/main/java/me/Danker/gui/DankerGui.java | 11 ++------ .../java/me/Danker/handlers/ConfigHandler.java | 3 -- 6 files changed, 5 insertions(+), 54 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 69dc6ee..183736b 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3217,39 +3217,6 @@ public class DankersSkyblockMod { ItemStack item = event.entityPlayer.getHeldItem(); if (item == null) return; - if (event.action == PlayerInteractEvent.Action.LEFT_CLICK_BLOCK) { - - Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); - - if (ToggleCommand.blockBreakingFarmsToggled) { - ArrayList tools = new ArrayList<>(Arrays.asList( - Items.wooden_hoe, - Items.stone_hoe, - Items.iron_hoe, - Items.golden_hoe, - Items.diamond_hoe, - Items.wooden_axe, - Items.stone_axe, - Items.iron_axe, - Items.golden_axe, - Items.diamond_axe - )); - - ArrayList farmBlocks = new ArrayList<>(Arrays.asList( - Blocks.dirt, - Blocks.farmland, - Blocks.carpet, - Blocks.glowstone, - Blocks.sea_lantern - )); - - if (tools.contains(item.getItem()) && farmBlocks.contains(block)) { - event.setCanceled(true); - } - - } - } - if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_AIR) { if (ToggleCommand.aotdToggled && item.getDisplayName().contains("Aspect of the Dragons")) { event.setCanceled(true); diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index dd5395c..bcaf8b0 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,7 +34,7 @@ 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 " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + + EnumChatFormatting.GOLD + " /toggle " + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" + EnumChatFormatting.GOLD + " /setkey " + 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 [winter/festival/spooky/f(1-7)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + diff --git a/src/main/java/me/Danker/commands/DankerGuiCommand.java b/src/main/java/me/Danker/commands/DankerGuiCommand.java index 119bed8..a6b200f 100644 --- a/src/main/java/me/Danker/commands/DankerGuiCommand.java +++ b/src/main/java/me/Danker/commands/DankerGuiCommand.java @@ -63,7 +63,6 @@ public class DankerGuiCommand extends CommandBase { debug.append("[notifyslayerslain][").append(ToggleCommand.notifySlayerSlainToggled).append("]\n"); debug.append("[necronnotifications][").append(ToggleCommand.necronNotificationsToggled).append("]\n"); debug.append("[bonzotimer][").append(ToggleCommand.bonzoTimerToggled).append("]\n"); - debug.append("[blockbreakingfarms][").append(ToggleCommand.blockBreakingFarmsToggled).append("]\n"); debug.append("[autoskilltracker][").append(ToggleCommand.autoSkillTrackerToggled).append("]\n"); debug.append("[threemanpuzzle][").append(ToggleCommand.threeManToggled).append("]\n"); debug.append("[oruopuzzle][").append(ToggleCommand.oruoToggled).append("]\n"); diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 0aafe1b..b632abc 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -47,7 +47,6 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean notifySlayerSlainToggled; public static boolean necronNotificationsToggled; public static boolean bonzoTimerToggled; - public static boolean blockBreakingFarmsToggled; public static boolean autoSkillTrackerToggled; // Puzzle Solvers public static boolean threeManToggled; @@ -79,7 +78,7 @@ public class ToggleCommand extends CommandBase implements ICommand { return "/" + getCommandName() + " "; } @@ -98,7 +97,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", "implosionmessages", "healmessages", "cooldownmessages", "manamessages", "caketimer", "lowhealthnotify", "autoskilltracker", "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", - "bonzotimer", "blockbreakingfarms", "threemanpuzzle", "oruopuzzle", "blazepuzzle", + "bonzotimer", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", "chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list"); @@ -267,10 +266,6 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", bonzoTimerToggled); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Bonzo's Mask timer has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); break; - case "blockbreakingfarms": - blockBreakingFarmsToggled = !blockBreakingFarmsToggled; - ConfigHandler.writeBooleanConfig("toggles", "BlockBreakingFarms", blockBreakingFarmsToggled); - player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Prevent breaking farms has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + necronNotificationsToggled + DankersSkyblockMod.MAIN_COLOUR + ".")); case "autoskilltracker": autoSkillTrackerToggled = !autoSkillTrackerToggled; ConfigHandler.writeBooleanConfig("toggles", "AutoSkillTracker", autoSkillTrackerToggled); diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 57d0292..90aa5e5 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -65,7 +65,6 @@ public class DankerGui extends GuiScreen { private GuiButton notifySlayerSlain; private GuiButton necronNotifications; private GuiButton bonzoTimer; - private GuiButton blockBreakingFarms; private GuiButton autoSkillTracker; public DankerGui(int page) { @@ -136,8 +135,7 @@ public class DankerGui extends GuiScreen { //Page 6 necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); - blockBreakingFarms = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled)); - autoSkillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled)); + autoSkillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Auto Start/Stop Skill Tracker: " + Utils.getColouredBoolean(ToggleCommand.autoSkillTrackerToggled)); switch (page) { case 1: @@ -195,9 +193,8 @@ public class DankerGui extends GuiScreen { this.buttonList.add(backPage); break; case 6: - this.buttonList.add(necronNotifications); + this.buttonList.add(necronNotifications); this.buttonList.add(bonzoTimer); - this.buttonList.add(blockBreakingFarms); this.buttonList.add(autoSkillTracker); this.buttonList.add(backPage); break; @@ -370,10 +367,6 @@ public class DankerGui extends GuiScreen { ToggleCommand.bonzoTimerToggled = !ToggleCommand.bonzoTimerToggled; ConfigHandler.writeBooleanConfig("toggles", "BonzoTimer", ToggleCommand.bonzoTimerToggled); bonzoTimer.displayString = "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled); - } else if (button == blockBreakingFarms) { - ToggleCommand.blockBreakingFarmsToggled = !ToggleCommand.blockBreakingFarmsToggled; - ConfigHandler.writeBooleanConfig("toggles", "BlockBreakingFarms", ToggleCommand.blockBreakingFarmsToggled); - blockBreakingFarms.displayString = "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled); } else if (button == pickBlock) { ToggleCommand.swapToPickBlockToggled = !ToggleCommand.swapToPickBlockToggled; ConfigHandler.writeBooleanConfig("toggles", "PickBlock", ToggleCommand.swapToPickBlockToggled); diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 05c6804..d5ab40b 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -205,7 +205,6 @@ public class ConfigHandler { if (!hasKey("toggles", "NotifySlayerSlain")) writeBooleanConfig("toggles", "NotifySlayerSlain", false); if (!hasKey("toggles", "NecronNotifications")) writeBooleanConfig("toggles", "NecronNotifications", false); if (!hasKey("toggles", "BonzoTimer")) writeBooleanConfig("toggles", "BonzoTimer", false); - if (!hasKey("toggles", "BlockBreakingFarms")) writeBooleanConfig("toggles", "BlockBreakingFarms", false); if (!hasKey("toggles", "AutoSkillTracker")) writeBooleanConfig("toggles", "AutoSkillTracker", false); // Puzzle Solvers if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false); @@ -225,7 +224,6 @@ public class ConfigHandler { if (!hasKey("toggles", "Superpairs")) writeBooleanConfig("toggles", "Superpairs", false); if (!hasKey("toggles", "HideTooltipsInExperimentAddons")) writeBooleanConfig("toggles", "HideTooltipsInExperimentAddons", false); - if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); // Wolf Loot @@ -493,7 +491,6 @@ public class ConfigHandler { ToggleCommand.notifySlayerSlainToggled = getBoolean("toggles", "NotifySlayerSlain"); ToggleCommand.necronNotificationsToggled = getBoolean("toggles", "NecronNotifications"); ToggleCommand.bonzoTimerToggled = getBoolean("toggles", "BonzoTimer"); - ToggleCommand.blockBreakingFarmsToggled = getBoolean("toggles", "BlockBreakingFarms"); ToggleCommand.swapToPickBlockToggled = getBoolean("toggles", "PickBlock"); ToggleCommand.flowerWeaponsToggled = getBoolean("toggles", "FlowerWeapons"); ToggleCommand.autoSkillTrackerToggled = getBoolean("toggles", "AutoSkillTracker"); -- cgit From 72c842b945a982bc60defc2fa11d4c33a43f36aa Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 23 Feb 2021 11:32:18 -0500 Subject: Update select all colour terminal answers --- src/main/java/me/Danker/DankersSkyblockMod.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/main/java/me') diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 183736b..67dd7b0 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -3590,7 +3590,12 @@ public class DankersSkyblockMod { } else if (inventoryName.startsWith("Select all the")) { if (terminalColorNeeded == null) return; String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); - shouldCancel = !(itemName.contains(terminalColorNeeded) || (terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (terminalColorNeeded.equals("WHITE") && itemName.equals("WOOL"))); + shouldCancel = !(itemName.contains(terminalColorNeeded) || + (terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || + (terminalColorNeeded.equals("WHITE") && (itemName.equals("WOOL") || itemName.equals("BONE MEAL"))) || + (terminalColorNeeded.equals("BLACK") && itemName.equals("INK SACK")) || + (terminalColorNeeded.equals("BLUE") && itemName.equals("LAPIS LAZULI")) || + (terminalColorNeeded.equals("BROWN") && itemName.equals("COCOA BEANS"))); } } @@ -3763,8 +3768,13 @@ public class DankersSkyblockMod { if (item == null) continue; if (item.isItemEnchanted()) continue; String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); - if (itemName.contains(colour) || (colour.equals("SILVER") && itemName.contains("LIGHT GRAY")) || (colour.equals("WHITE") && itemName.equals("WOOL"))) { - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + if (itemName.contains(terminalColorNeeded) || + (terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || + (terminalColorNeeded.equals("WHITE") && (itemName.equals("WOOL") || itemName.equals("BONE MEAL"))) || + (terminalColorNeeded.equals("BLACK") && itemName.equals("INK SACK")) || + (terminalColorNeeded.equals("BLUE") && itemName.equals("LAPIS LAZULI")) || + (terminalColorNeeded.equals("BROWN") && itemName.equals("COCOA BEANS"))) { + Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } } } -- cgit From e4b7afb44c85c30ee64d006bfd4457595beb26d6 Mon Sep 17 00:00:00 2001 From: bowser0000 Date: Tue, 23 Feb 2021 11:32:50 -0500 Subject: Change version to 1.8.5 --- build.gradle | 2 +- src/main/java/me/Danker/DankersSkyblockMod.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/me') diff --git a/build.gradle b/build.gradle index afc4ff8..cae593a 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,7 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8.5-beta9" +version = "1.8.5" group= "me.Danker.DankersSkyblockMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 67dd7b0..b6cc55f 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -76,7 +76,7 @@ import java.util.regex.Pattern; @Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true) public class DankersSkyblockMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8.5-beta9"; + public static final String VERSION = "1.8.5"; static double checkItemsNow = 0; static double itemsChecked = 0; public static Map t6Enchants = new HashMap<>(); -- cgit