aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-12-14 20:02:42 -0500
committerGitHub <noreply@github.com>2020-12-14 20:02:42 -0500
commitb0e3055fbe29c4af71927a13726ae4984fb2b500 (patch)
tree44789ed59cd1371e0dd65c6d019e87068c968330 /src/main
parent47910bc70961bd39d43cfdcbee103949559459c1 (diff)
parent120264a46d06a2dcc9e4f75e39c2411f98c24427 (diff)
downloadSkyblockMod-b0e3055fbe29c4af71927a13726ae4984fb2b500.tar.gz
SkyblockMod-b0e3055fbe29c4af71927a13726ae4984fb2b500.tar.bz2
SkyblockMod-b0e3055fbe29c4af71927a13726ae4984fb2b500.zip
Merge pull request #50 from My-Name-Is-Jeff/development
Features & Fixes: F7 Phase 3 QoL + More
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java139
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java3
-rw-r--r--src/main/java/me/Danker/commands/ScaleCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java26
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java8
-rw-r--r--src/main/java/me/Danker/gui/PuzzleSolversGui.java16
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java7
8 files changed, 193 insertions, 9 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 64a1f5b..b55131e 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;
@@ -126,6 +130,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;
@@ -2733,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] = 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;
+ }
+ }
+ }
+
}
if (titleTimer >= 0) {
@@ -2877,6 +2904,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<String> 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;
@@ -3033,6 +3075,84 @@ 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 != 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((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;
@@ -3078,7 +3198,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,12 +3212,19 @@ public class DankersSkyblockMod
}
}
}
+ } 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[2];
}
@SubscribeEvent
@@ -3158,6 +3285,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);
}
@@ -3172,17 +3300,24 @@ public class DankersSkyblockMod
colourParts.add(colourMatcher.group());
}
colour = String.join(" ", colourParts);
+ terminalColorNeeded = colour;
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);
}
}
}
+ if(ToggleCommand.clickInOrderToggled && displayName.equals("Click in order!")) {
+ Slot slot = invSlots.get(terminalNumberNeeded[1]);
+ 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/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index 395f40d..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 <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/watchermessage/startswithterminal/selectallterminal/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/midasstaffmessages/implosionmessages/healmessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/caketimer/lowhealthnotify/lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
EnumChatFormatting.GOLD + " /setkey <key>" + EnumChatFormatting.AQUA + " - Sets API key.\n" +
EnumChatFormatting.GOLD + " /getkey" + EnumChatFormatting.AQUA + " - Returns key set with /setkey and copies it to your clipboard.\n" +
EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs/mythological/> [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 b10980f..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");
@@ -66,6 +67,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");
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;
diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 172411c..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;
@@ -49,6 +50,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
// Terminal Helpers
public static boolean startsWithToggled;
public static boolean selectAllToggled;
+ public static boolean clickInOrderToggled;
+ public static boolean blockWrongTerminalClicksToggled;
public static boolean itemFrameOnSeaLanternsToggled;
// Experiments
public static boolean ultrasequencerToggled;
@@ -66,8 +69,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" +
"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>";
+ "lividsolver/stopsalvagestarred/notifyslayerslain/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" +
+ "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>";
}
@Override
@@ -83,9 +86,9 @@ 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", "itemframeonsealanterns", "ultrasequencer",
+ "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer",
"chronomatron", "superpairs", "hidetooltipsinaddons", "pickblock", "list");
}
return null;
@@ -222,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);
@@ -267,6 +275,16 @@ 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 helper has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + selectAllToggled + DankersSkyblockMod.MAIN_COLOUR + "."));
+ break;
+ case "blockwrongterminalclicks":
+ blockWrongTerminalClicksToggled = !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":
itemFrameOnSeaLanternsToggled = !itemFrameOnSeaLanternsToggled;
ConfigHandler.writeBooleanConfig("toggles", "IgnoreItemFrameOnSeaLanterns", itemFrameOnSeaLanternsToggled);
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 613e968..ff6d5d0 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);
+ notifySlayerSlain.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/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
index 8701563..17eb433 100644
--- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java
+++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
@@ -24,6 +24,8 @@ public class PuzzleSolversGui extends GuiScreen {
private GuiButton ticTacToe;
private GuiButton startsWith;
private GuiButton selectAll;
+ private GuiButton clickOrder;
+ private GuiButton blockClicks;
private GuiButton itemFrameOnSeaLanterns;
public PuzzleSolversGui(int page) {
@@ -57,7 +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));
- itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled));
+ 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:
@@ -72,6 +76,8 @@ 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);
break;
@@ -125,6 +131,14 @@ 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 Helper: " + Utils.getColouredBoolean(ToggleCommand.clickInOrderToggled);
+ } else if (button == blockClicks) {
+ ToggleCommand.blockWrongTerminalClicksToggled = !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;
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..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);
@@ -203,6 +204,8 @@ 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
if (!hasKey("toggles", "UltraSequencer")) writeBooleanConfig("toggles", "UltraSequencer", false);
@@ -457,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");
@@ -467,6 +471,9 @@ 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
ToggleCommand.ultrasequencerToggled = getBoolean("toggles", "UltraSequencer");