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 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/me/Danker/DankersSkyblockMod.java') 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++; } -- 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/Danker/DankersSkyblockMod.java') 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/Danker/DankersSkyblockMod.java') 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/Danker/DankersSkyblockMod.java') 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 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/Danker/DankersSkyblockMod.java') 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/Danker/DankersSkyblockMod.java') 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/Danker/DankersSkyblockMod.java') 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/Danker/DankersSkyblockMod.java') 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 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/Danker/DankersSkyblockMod.java') 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/Danker/DankersSkyblockMod.java') 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