aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-11-27 12:15:32 -0500
committerbowser0000 <bowser0000@gmail.com>2020-11-27 12:15:32 -0500
commit9592c4bcf0fd912b7ca5586977d47422b933d56e (patch)
tree5ffa49454d6f8a7d136230b0c4637756f2ae7ca0 /src
parent16f1cd3c009184e8c8f5c75b9afae9ca531d2fee (diff)
downloadSkyblockMod-9592c4bcf0fd912b7ca5586977d47422b933d56e.tar.gz
SkyblockMod-9592c4bcf0fd912b7ca5586977d47422b933d56e.tar.bz2
SkyblockMod-9592c4bcf0fd912b7ca5586977d47422b933d56e.zip
Fix Siamese Lynx detection, add toggle for only showing correct blaze
Added toggle in case detection messes up and to increase performance
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/TheMod.java8
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java16
-rw-r--r--src/main/java/me/Danker/gui/PuzzleSolversGui.java11
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java2
5 files changed, 28 insertions, 11 deletions
diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java
index 1cc0939..1ff1df9 100644
--- a/src/main/java/me/Danker/TheMod.java
+++ b/src/main/java/me/Danker/TheMod.java
@@ -981,7 +981,7 @@ public class TheMod
LootCommand.minosHunters++;
LootCommand.minosHuntersSession++;
ConfigHandler.writeIntConfig("mythological", "minosHunter", LootCommand.minosHunters);
- } else if (message.contains("Siamese Lynxes!!")) {
+ } else if (message.contains("Siamese Lynxes!")) {
LootCommand.siameseLynxes++;
LootCommand.siameseLynxesSession++;
ConfigHandler.writeIntConfig("mythological", "siameseLynx", LootCommand.siameseLynxes);
@@ -2546,7 +2546,7 @@ public class TheMod
}
}
- if (highestBlaze != null || lowestBlaze != null) {
+ if (ToggleCommand.onlyShowCorrectBlazeToggled && (highestBlaze != null || lowestBlaze != null)) {
new Thread(() -> {
boolean wallFound = false;
for (int x = (int) player.posX - 25; x <= player.posX + 25; x++) {
@@ -2630,13 +2630,13 @@ public class TheMod
@SubscribeEvent
public void onWorldRender(RenderWorldLastEvent event) {
if (ToggleCommand.blazeToggled) {
- if (lowestBlaze != null && lowToHigh) {
+ if (lowestBlaze != null && ((lowToHigh && ToggleCommand.onlyShowCorrectBlazeToggled) || !ToggleCommand.onlyShowCorrectBlazeToggled)) {
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 && !lowToHigh) {
+ if (highestBlaze != null && ((!lowToHigh && ToggleCommand.onlyShowCorrectBlazeToggled) || !ToggleCommand.onlyShowCorrectBlazeToggled)) {
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);
diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java
index 9d9bb51..4896cd5 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/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/healmessages/caketimer/lowhealthnotify/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/list>" + EnumChatFormatting.AQUA + " - Toggles features. /toggle list returns values of every toggle.\n" +
+ EnumChatFormatting.GOLD + " /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/threemanpuzzle/midasstaffmessages/healmessages/caketimer/lowhealthnotify/lividsolver/oruopuzzle/blazepuzzle/onlyshowcorrectblaze/creeperpuzzle/waterpuzzle/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/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java
index 6e85d58..43c9fac 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 threeManToggled;
public static boolean oruoToggled;
public static boolean blazeToggled;
+ public static boolean onlyShowCorrectBlazeToggled;
public static boolean creeperToggled;
public static boolean waterToggled;
@@ -52,7 +53,7 @@ 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/healmessages/caketimer/lowhealthnotify/lividsolver/threemanpuzzle/oruopuzzle/" +
- "blazepuzzle/creeperpuzzle/waterpuzzle/list>";
+ "blazepuzzle/onlyshowcorrectblaze/creeperpuzzle/waterpuzzle/list>";
}
@Override
@@ -68,7 +69,8 @@ public class ToggleCommand extends CommandBase implements ICommand {
"sceptremessages", "petcolors", "dungeontimer", "golemalerts",
"expertiselore", "skill50display", "outlinetext", "midasstaffmessages",
"healmessages", "caketimer", "lowhealthnotify", "lividsolver", "threemanpuzzle",
- "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "list");
+ "oruopuzzle", "blazepuzzle", "onlyshowcorrectblaze", "creeperpuzzle",
+ "waterpuzzle", "list");
}
return null;
}
@@ -209,14 +211,19 @@ public class ToggleCommand extends CommandBase implements ICommand {
ConfigHandler.writeBooleanConfig("toggles", "BlazePuzzle", blazeToggled);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Blaze puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + blazeToggled + TheMod.MAIN_COLOUR + "."));
break;
+ case "onlyshowcorrectblaze":
+ onlyShowCorrectBlazeToggled = !onlyShowCorrectBlazeToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "OnlyShowCorrectBlaze", onlyShowCorrectBlazeToggled);
+ player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Only show correct blaze has been set to " + TheMod.SECONDARY_COLOUR + onlyShowCorrectBlazeToggled + TheMod.MAIN_COLOUR + "."));
+ break;
case "creeperpuzzle":
creeperToggled = !creeperToggled;
- ConfigHandler.writeBooleanConfig("creeperpuzzle", "CreeperPuzzle", creeperToggled);
+ ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", creeperToggled);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Creeper puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + creeperToggled + TheMod.MAIN_COLOUR + "."));
break;
case "waterpuzzle":
waterToggled = !waterToggled;
- ConfigHandler.writeBooleanConfig("waterpuzzle", "WaterPuzzle", waterToggled);
+ ConfigHandler.writeBooleanConfig("toggles", "WaterPuzzle", waterToggled);
player.addChatMessage(new ChatComponentText(TheMod.MAIN_COLOUR + "Water puzzle solver has been set to " + TheMod.SECONDARY_COLOUR + waterToggled + TheMod.MAIN_COLOUR + "."));
break;
case "list":
@@ -245,6 +252,7 @@ public class ToggleCommand extends CommandBase implements ICommand {
TheMod.TYPE_COLOUR + " Three man puzzle solver: " + TheMod.VALUE_COLOUR + threeManToggled + "\n" +
TheMod.TYPE_COLOUR + " Oruo trivia solver: " + TheMod.VALUE_COLOUR + oruoToggled + "\n" +
TheMod.TYPE_COLOUR + " Blaze puzzle solver: " + TheMod.VALUE_COLOUR + blazeToggled + "\n" +
+ TheMod.TYPE_COLOUR + " Only show correct blaze: " + TheMod.VALUE_COLOUR + onlyShowCorrectBlazeToggled + "\n" +
TheMod.TYPE_COLOUR + " Creeper puzzle solver: " + TheMod.VALUE_COLOUR + creeperToggled + "\n" +
TheMod.TYPE_COLOUR + " Water puzzle solver: " + TheMod.VALUE_COLOUR + waterToggled));
default:
diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
index 4ae97bb..ff4a911 100644
--- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java
+++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
@@ -15,6 +15,7 @@ public class PuzzleSolversGui extends GuiScreen {
private GuiButton riddle;
private GuiButton trivia;
private GuiButton blaze;
+ private GuiButton onlyShowCorrectBlaze;
private GuiButton creeper;
private GuiButton water;
@@ -35,13 +36,15 @@ public class PuzzleSolversGui extends GuiScreen {
riddle = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Riddle Solver: " + Utils.getColouredBoolean(ToggleCommand.threeManToggled));
trivia = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Trivia Solver: " + Utils.getColouredBoolean(ToggleCommand.oruoToggled));
blaze = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Blaze Solver: " + Utils.getColouredBoolean(ToggleCommand.blazeToggled));
- 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));
+ onlyShowCorrectBlaze = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Only Show Correct Blaze Hitbox: " + Utils.getColouredBoolean(ToggleCommand.onlyShowCorrectBlazeToggled));
+ creeper = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled));
+ water = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled));
this.buttonList.add(goBack);
this.buttonList.add(riddle);
this.buttonList.add(trivia);
this.buttonList.add(blaze);
+ this.buttonList.add(onlyShowCorrectBlaze);
this.buttonList.add(creeper);
this.buttonList.add(water);
}
@@ -68,6 +71,10 @@ public class PuzzleSolversGui extends GuiScreen {
ToggleCommand.blazeToggled = !ToggleCommand.blazeToggled;
ConfigHandler.writeBooleanConfig("toggles", "BlazePuzzle", ToggleCommand.blazeToggled);
blaze.displayString = "Blaze Solver: " + Utils.getColouredBoolean(ToggleCommand.blazeToggled);
+ } else if (button == onlyShowCorrectBlaze) {
+ ToggleCommand.onlyShowCorrectBlazeToggled = !ToggleCommand.onlyShowCorrectBlazeToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "OnlyShowCorrectBlaze", ToggleCommand.onlyShowCorrectBlazeToggled);
+ onlyShowCorrectBlaze.displayString = "Only Show Correct Blaze Hitbox: " + Utils.getColouredBoolean(ToggleCommand.onlyShowCorrectBlazeToggled);
} else if (button == creeper) {
ToggleCommand.creeperToggled = !ToggleCommand.creeperToggled;
ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", ToggleCommand.creeperToggled);
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java
index c680716..2758f3b 100644
--- a/src/main/java/me/Danker/handlers/ConfigHandler.java
+++ b/src/main/java/me/Danker/handlers/ConfigHandler.java
@@ -199,6 +199,7 @@ public class ConfigHandler {
if (!hasKey("toggles", "ThreeManPuzzle")) writeBooleanConfig("toggles", "ThreeManPuzzle", false);
if (!hasKey("toggles", "OruoPuzzle")) writeBooleanConfig("toggles", "OruoPuzzle", false);
if (!hasKey("toggles", "BlazePuzzle")) writeBooleanConfig("toggles", "BlazePuzzle", false);
+ if (!hasKey("toggles", "OnlyShowCorrectBlaze")) writeBooleanConfig("toggles", "OnlyShowCorrectBlaze", false);
if (!hasKey("toggles", "CreeperPuzzle")) writeBooleanConfig("toggles", "CreeperPuzzle", false);
if (!hasKey("toggles", "WaterPuzzle")) writeBooleanConfig("toggles", "WaterPuzzle", false);
@@ -435,6 +436,7 @@ public class ConfigHandler {
ToggleCommand.threeManToggled = getBoolean("toggles", "ThreeManPuzzle");
ToggleCommand.oruoToggled = getBoolean("toggles", "OruoPuzzle");
ToggleCommand.blazeToggled = getBoolean("toggles", "BlazePuzzle");
+ ToggleCommand.onlyShowCorrectBlazeToggled = getBoolean("toggles", "OnlyShowCorrectBlaze");
ToggleCommand.creeperToggled = getBoolean("toggles", "CreeperPuzzle");
ToggleCommand.waterToggled = getBoolean("toggles", "WaterPuzzle");