aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/gui
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2020-12-07 19:00:24 -0500
committerGitHub <noreply@github.com>2020-12-07 19:00:24 -0500
commit0bd7c6336f5866ea5513f85a3cedf5c48e375ab2 (patch)
treec28066f2d9f819f57c42d8911f1e0046f48cdf60 /src/main/java/me/Danker/gui
parent886402bdcd8d68e6d1076c86d53baab47070dd63 (diff)
parentc5e8044e39f784798000b64bbece05eae0282d86 (diff)
downloadSkyblockMod-1.8.4.tar.gz
SkyblockMod-1.8.4.tar.bz2
SkyblockMod-1.8.4.zip
1.8.4v1.8.4
Merge pull request #42 from bowser0000/development
Diffstat (limited to 'src/main/java/me/Danker/gui')
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java114
-rw-r--r--src/main/java/me/Danker/gui/DisplayGui.java6
-rw-r--r--src/main/java/me/Danker/gui/EditLocationsGui.java123
-rw-r--r--src/main/java/me/Danker/gui/ExperimentsGui.java76
-rw-r--r--src/main/java/me/Danker/gui/OnlySlayerGui.java25
-rw-r--r--src/main/java/me/Danker/gui/PuzzleSolversGui.java23
-rw-r--r--src/main/java/me/Danker/gui/SkillTrackerGui.java45
-rw-r--r--src/main/java/me/Danker/gui/buttons/LocationButton.java7
8 files changed, 278 insertions, 141 deletions
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java
index 168f7c7..1c40dc4 100644
--- a/src/main/java/me/Danker/gui/DankerGui.java
+++ b/src/main/java/me/Danker/gui/DankerGui.java
@@ -1,11 +1,6 @@
package me.Danker.gui;
-import java.awt.Desktop;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.commands.ToggleCommand;
import me.Danker.handlers.ConfigHandler;
import me.Danker.handlers.TextRenderer;
@@ -15,6 +10,11 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
+import java.awt.*;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
public class DankerGui extends GuiScreen {
private int page;
@@ -27,6 +27,7 @@ public class DankerGui extends GuiScreen {
private GuiButton changeDisplay;
private GuiButton onlySlayer;
private GuiButton puzzleSolvers;
+ private GuiButton experimentationTableSolvers;
private GuiButton skillTracker;
// Toggles
private GuiButton gparty;
@@ -40,17 +41,19 @@ public class DankerGui extends GuiScreen {
private GuiButton aotd;
private GuiButton lividDagger;
private GuiButton sceptreMessages;
+ private GuiButton midasStaffMessages;
+ private GuiButton implosionMessages;
+ private GuiButton healMessages;
private GuiButton petColours;
private GuiButton dungeonTimer;
private GuiButton golemAlerts;
private GuiButton expertiseLore;
private GuiButton skill50Display;
private GuiButton outlineText;
- private GuiButton midasStaffMessages;
- private GuiButton healMessages;
private GuiButton cakeTimer;
private GuiButton lowHealthNotify;
private GuiButton lividSolver;
+ private GuiButton stopSalvageStarred;
public DankerGui(int page) {
this.page = page;
@@ -80,72 +83,83 @@ public class DankerGui extends GuiScreen {
changeDisplay = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Change Display Settings");
onlySlayer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Set Slayer Quest");
puzzleSolvers = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Toggle Dungeons Puzzle Solvers");
- skillTracker = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Toggle Skill XP/Hour Tracking");
- outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled));
- splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing));
- coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled));
+ 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));
// Page 2
- dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled));
- cakeTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled));
- skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
- slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
- chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled));
+ 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));
+ cakeTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled));
+ skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled));
+ slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal));
aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled));
lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled));
// Page 3
- gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled));
- spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts));
- sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
- midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages));
- healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages));
- goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled));
- petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
+ chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled));
+ gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled));
+ spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts));
+ sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages));
+ midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages));
+ implosionMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages));
+ healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages));
// Page 4
- expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
- lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled));
- golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
- rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts));
- lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled));
-
+ goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled));
+ petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled));
+ expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled));
+ lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled));
+ golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled));
+ rngesusAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "RNGesus Alerts: " + Utils.getColouredBoolean(ToggleCommand.rngesusAlerts));
+ lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled));
+ // Page 5
+ stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled));
+
switch (page) {
case 1:
this.buttonList.add(changeDisplay);
this.buttonList.add(onlySlayer);
this.buttonList.add(puzzleSolvers);
+ this.buttonList.add(experimentationTableSolvers);
this.buttonList.add(skillTracker);
this.buttonList.add(outlineText);
this.buttonList.add(splitFishing);
- this.buttonList.add(coords);
this.buttonList.add(nextPage);
break;
case 2:
+ this.buttonList.add(coords);
this.buttonList.add(dungeonTimer);
this.buttonList.add(cakeTimer);
this.buttonList.add(skill50Display);
this.buttonList.add(slayerCount);
- this.buttonList.add(chatMaddox);
this.buttonList.add(aotd);
this.buttonList.add(lividDagger);
this.buttonList.add(nextPage);
this.buttonList.add(backPage);
break;
case 3:
+ this.buttonList.add(chatMaddox);
this.buttonList.add(gparty);
this.buttonList.add(spiritBearAlert);
this.buttonList.add(sceptreMessages);
this.buttonList.add(midasStaffMessages);
+ this.buttonList.add(implosionMessages);
this.buttonList.add(healMessages);
- this.buttonList.add(goldenEnch);
- this.buttonList.add(petColours);
this.buttonList.add(nextPage);
this.buttonList.add(backPage);
break;
case 4:
+ this.buttonList.add(goldenEnch);
+ this.buttonList.add(petColours);
this.buttonList.add(expertiseLore);
this.buttonList.add(lividSolver);
this.buttonList.add(golemAlerts);
this.buttonList.add(rngesusAlert);
this.buttonList.add(lowHealthNotify);
+ this.buttonList.add(nextPage);
+ this.buttonList.add(backPage);
+ break;
+ case 5:
+ this.buttonList.add(stopSalvageStarred);
this.buttonList.add(backPage);
break;
}
@@ -158,7 +172,7 @@ public class DankerGui extends GuiScreen {
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
- String pageText = "Page: " + page + "/4";
+ String pageText = "Page: " + page + "/5";
int pageWidth = mc.fontRendererObj.getStringWidth(pageText);
new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D);
super.drawScreen(mouseX, mouseY, partialTicks);
@@ -169,29 +183,31 @@ public class DankerGui extends GuiScreen {
if (button == closeGUI) {
Minecraft.getMinecraft().thePlayer.closeScreen();
} else if (button == nextPage) {
- TheMod.guiToOpen = "dankergui" + (page + 1);
+ DankersSkyblockMod.guiToOpen = "dankergui" + (page + 1);
} else if (button == backPage) {
- TheMod.guiToOpen = "dankergui" + (page - 1);
+ DankersSkyblockMod.guiToOpen = "dankergui" + (page - 1);
} else if (button == githubLink) {
try {
Desktop.getDesktop().browse(new URI("https://github.com/bowser0000/SkyblockMod"));
} catch (IOException | URISyntaxException ex) {
- System.err.println(ex);
+ ex.printStackTrace();
}
} else if (button == discordLink) {
try {
Desktop.getDesktop().browse(new URI("https://discord.gg/QsEkNQS"));
} catch (IOException | URISyntaxException ex) {
- System.err.println(ex);
+ ex.printStackTrace();
}
} else if (button == changeDisplay) {
- TheMod.guiToOpen = "displaygui";
+ DankersSkyblockMod.guiToOpen = "displaygui";
} else if (button == onlySlayer) {
- TheMod.guiToOpen = "onlyslayergui";
- } else if (button == puzzleSolvers) {
- TheMod.guiToOpen = "puzzlesolvers";
- } else if (button == skillTracker) {
- TheMod.guiToOpen = "skilltracker";
+ DankersSkyblockMod.guiToOpen = "onlyslayergui";
+ } else if (button == puzzleSolvers) {
+ DankersSkyblockMod.guiToOpen = "puzzlesolvers";
+ } else if (button == experimentationTableSolvers) {
+ DankersSkyblockMod.guiToOpen = "experimentsolvers";
+ } else if (button == skillTracker) {
+ DankersSkyblockMod.guiToOpen = "skilltracker";
} else if (button == outlineText) {
ToggleCommand.outlineTextToggled = !ToggleCommand.outlineTextToggled;
ConfigHandler.writeBooleanConfig("toggles", "OutlineText", ToggleCommand.outlineTextToggled);
@@ -280,6 +296,14 @@ public class DankerGui extends GuiScreen {
ToggleCommand.lowHealthNotifyToggled = !ToggleCommand.lowHealthNotifyToggled;
ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", ToggleCommand.lowHealthNotifyToggled);
lowHealthNotify.displayString = "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled);
+ } else if (button == implosionMessages) {
+ ToggleCommand.implosionMessages = !ToggleCommand.implosionMessages;
+ ConfigHandler.writeBooleanConfig("toggles", "ImplosionMessages", ToggleCommand.implosionMessages);
+ implosionMessages.displayString = "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages);
+ } else if(button == stopSalvageStarred) {
+ ToggleCommand.stopSalvageStarredToggled = !ToggleCommand.stopSalvageStarredToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "StopSalvageStarred", ToggleCommand.stopSalvageStarredToggled);
+ stopSalvageStarred.displayString = "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled);
}
}
diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java
index 0a5f805..f498a67 100644
--- a/src/main/java/me/Danker/gui/DisplayGui.java
+++ b/src/main/java/me/Danker/gui/DisplayGui.java
@@ -1,6 +1,6 @@
package me.Danker.gui;
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.commands.DisplayCommand;
import me.Danker.handlers.ConfigHandler;
import me.Danker.handlers.TextRenderer;
@@ -115,9 +115,9 @@ public class DisplayGui extends GuiScreen {
@Override
public void actionPerformed(GuiButton button) {
if (button == goBack) {
- TheMod.guiToOpen = "dankergui1";
+ DankersSkyblockMod.guiToOpen = "dankergui1";
} else if (button == editLocations) {
- TheMod.guiToOpen = "editlocations";
+ DankersSkyblockMod.guiToOpen = "editlocations";
} else if (button == showSession) {
addSession = !addSession;
showSession.displayString = "Current Session Only: " + Utils.getColouredBoolean(addSession);
diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java
index 75caf6a..8519f1a 100644
--- a/src/main/java/me/Danker/gui/EditLocationsGui.java
+++ b/src/main/java/me/Danker/gui/EditLocationsGui.java
@@ -1,8 +1,6 @@
package me.Danker.gui;
-import org.lwjgl.opengl.GL11;
-
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.commands.MoveCommand;
import me.Danker.commands.ScaleCommand;
import me.Danker.gui.buttons.LocationButton;
@@ -12,6 +10,7 @@ import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.EnumChatFormatting;
+import org.lwjgl.opengl.GL11;
public class EditLocationsGui extends GuiScreen {
@@ -26,6 +25,7 @@ public class EditLocationsGui extends GuiScreen {
private LocationButton lividHP;
private LocationButton cakeTimer;
private LocationButton skillTracker;
+ private LocationButton waterAnswer;
@Override
public boolean doesGuiPauseGame() {
@@ -72,23 +72,32 @@ public class EditLocationsGui extends GuiScreen {
EnumChatFormatting.YELLOW + 2 + "\n" +
EnumChatFormatting.YELLOW + 1;
- String skillTrackerText = TheMod.SKILL_TRACKER_COLOUR + "Farming XP Earned: 462,425.3\n" +
- TheMod.SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, 3602) + "\n" +
- TheMod.SKILL_TRACKER_COLOUR + "XP Per Hour: 462,168";
-
+ String skillTrackerText = DankersSkyblockMod.SKILL_TRACKER_COLOUR + "Farming XP Earned: 462,425.3\n" +
+ DankersSkyblockMod.SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, 3602) + "\n" +
+ DankersSkyblockMod.SKILL_TRACKER_COLOUR + "XP Per Hour: 462,168";
+
+ String waterAnswerText = DankersSkyblockMod.MAIN_COLOUR + "The following levers must be down:\n" +
+ EnumChatFormatting.DARK_PURPLE + "Purple: " + EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay\n" +
+ EnumChatFormatting.GOLD + "Orange: " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal\n" +
+ EnumChatFormatting.BLUE + "Blue: " + EnumChatFormatting.WHITE + "Quartz, " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.DARK_GRAY + "Coal, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay\n" +
+ EnumChatFormatting.GREEN + "Green: " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.GREEN + "Emerald\n" +
+ EnumChatFormatting.RED + "Red: " + EnumChatFormatting.YELLOW + "Gold, " + EnumChatFormatting.AQUA + "Diamond, " + EnumChatFormatting.GREEN + "Emerald, " + EnumChatFormatting.RED + "Clay";
+
display = new LocationButton(0, MoveCommand.displayXY[0], MoveCommand.displayXY[1], 145 * ScaleCommand.displayScale, 102 * ScaleCommand.displayScale, ScaleCommand.displayScale, displayText, displayNums, 110);
dungeonTimer = new LocationButton(0, MoveCommand.dungeonTimerXY[0], MoveCommand.dungeonTimerXY[1], 113 * ScaleCommand.dungeonTimerScale, 57 * ScaleCommand.dungeonTimerScale, ScaleCommand.dungeonTimerScale, dungeonTimerText, dungeonTimerNums, 80);
- coords = new LocationButton(0, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], 141 * ScaleCommand.coordsScale, 12 * ScaleCommand.coordsScale, ScaleCommand.coordsScale, TheMod.COORDS_COLOUR + "74 / 14 / -26 (141.1 / 6.7)", null, null);
- skill50 = new LocationButton(0, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], 233 * ScaleCommand.skill50Scale, 12 * ScaleCommand.skill50Scale, ScaleCommand.skill50Scale, TheMod.SKILL_50_COLOUR + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null);
+ coords = new LocationButton(0, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], 141 * ScaleCommand.coordsScale, 12 * ScaleCommand.coordsScale, ScaleCommand.coordsScale, DankersSkyblockMod.COORDS_COLOUR + "74 / 14 / -26 (141.1 / 6.7)", null, null);
+ skill50 = new LocationButton(0, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], 233 * ScaleCommand.skill50Scale, 12 * ScaleCommand.skill50Scale, ScaleCommand.skill50Scale, DankersSkyblockMod.SKILL_50_COLOUR + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null);
lividHP = new LocationButton(0, MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], 85 * ScaleCommand.lividHpScale, 12 * ScaleCommand.lividHpScale, ScaleCommand.lividHpScale, EnumChatFormatting.WHITE + "﴾ Livid " + EnumChatFormatting.YELLOW + "6.9M" + EnumChatFormatting.RED + "❤ " + EnumChatFormatting.WHITE + "﴿", null, null);
- cakeTimer = new LocationButton(0, MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1] + 5, 85 * ScaleCommand.cakeTimerScale, 18 * ScaleCommand.cakeTimerScale, ScaleCommand.cakeTimerScale, TheMod.CAKE_COLOUR + " 11h16m", null, null);
+ cakeTimer = new LocationButton(0, MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1] + 5, 85 * ScaleCommand.cakeTimerScale, 18 * ScaleCommand.cakeTimerScale, ScaleCommand.cakeTimerScale, DankersSkyblockMod.CAKE_COLOUR + " 11h16m", null, null);
skillTracker = new LocationButton(0, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], 150 * ScaleCommand.skillTrackerScale, 28 * ScaleCommand.skillTrackerScale, ScaleCommand.skillTrackerScale, skillTrackerText, null, null);
-
+ waterAnswer = new LocationButton(0, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], 190 * ScaleCommand.waterAnswerScale, 54 * ScaleCommand.waterAnswerScale, ScaleCommand.waterAnswerScale, waterAnswerText, null, null);
+
this.buttonList.add(coords);
this.buttonList.add(dungeonTimer);
this.buttonList.add(lividHP);
this.buttonList.add(cakeTimer);
this.buttonList.add(skillTracker);
+ this.buttonList.add(waterAnswer);
this.buttonList.add(display);
this.buttonList.add(skill50);
}
@@ -99,9 +108,9 @@ public class EditLocationsGui extends GuiScreen {
mouseMoved(mouseX, mouseY);
double scale = ScaleCommand.cakeTimerScale;
- double scaleReset = (double) Math.pow(scale, -1);
+ double scaleReset = Math.pow(scale, -1);
GL11.glScaled(scale, scale, scale);
- mc.getTextureManager().bindTexture(TheMod.CAKE_ICON);
+ mc.getTextureManager().bindTexture(DankersSkyblockMod.CAKE_ICON);
Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16);
GL11.glScaled(scaleReset, scaleReset, scaleReset);
@@ -113,41 +122,55 @@ public class EditLocationsGui extends GuiScreen {
int yMoved = mouseY - lastMouseY;
if (moving != null) {
- if (moving.equals("display")) {
- MoveCommand.displayXY[0] += xMoved;
- MoveCommand.displayXY[1] += yMoved;
- display.xPosition = MoveCommand.displayXY[0];
- display.yPosition = MoveCommand.displayXY[1];
- } else if (moving.equals("dungeonTimer")) {
- MoveCommand.dungeonTimerXY[0] += xMoved;
- MoveCommand.dungeonTimerXY[1] += yMoved;
- dungeonTimer.xPosition = MoveCommand.dungeonTimerXY[0];
- dungeonTimer.yPosition = MoveCommand.dungeonTimerXY[1];
- } else if (moving.equals("coords")) {
- MoveCommand.coordsXY[0] += xMoved;
- MoveCommand.coordsXY[1] += yMoved;
- coords.xPosition = MoveCommand.coordsXY[0];
- coords.yPosition = MoveCommand.coordsXY[1];
- } else if (moving.equals("skill50")) {
- MoveCommand.skill50XY[0] += xMoved;
- MoveCommand.skill50XY[1] += yMoved;
- skill50.xPosition = MoveCommand.skill50XY[0];
- skill50.yPosition = MoveCommand.skill50XY[1];
- } else if (moving.equals("lividHP")) {
- MoveCommand.lividHpXY[0] += xMoved;
- MoveCommand.lividHpXY[1] += yMoved;
- lividHP.xPosition = MoveCommand.lividHpXY[0];
- lividHP.yPosition = MoveCommand.lividHpXY[1];
- } else if (moving.equals("cakeTimer")) {
- MoveCommand.cakeTimerXY[0] += xMoved;
- MoveCommand.cakeTimerXY[1] += yMoved;
- cakeTimer.xPosition = MoveCommand.cakeTimerXY[0];
- cakeTimer.yPosition = MoveCommand.cakeTimerXY[1];
- } else if (moving.equals("skillTracker")) {
- MoveCommand.skillTrackerXY[0] += xMoved;
- MoveCommand.skillTrackerXY[1] += yMoved;
- skillTracker.xPosition = MoveCommand.skillTrackerXY[0];
- skillTracker.yPosition = MoveCommand.skillTrackerXY[1];
+ switch (moving) {
+ case "display":
+ MoveCommand.displayXY[0] += xMoved;
+ MoveCommand.displayXY[1] += yMoved;
+ display.xPosition = MoveCommand.displayXY[0];
+ display.yPosition = MoveCommand.displayXY[1];
+ break;
+ case "dungeonTimer":
+ MoveCommand.dungeonTimerXY[0] += xMoved;
+ MoveCommand.dungeonTimerXY[1] += yMoved;
+ dungeonTimer.xPosition = MoveCommand.dungeonTimerXY[0];
+ dungeonTimer.yPosition = MoveCommand.dungeonTimerXY[1];
+ break;
+ case "coords":
+ MoveCommand.coordsXY[0] += xMoved;
+ MoveCommand.coordsXY[1] += yMoved;
+ coords.xPosition = MoveCommand.coordsXY[0];
+ coords.yPosition = MoveCommand.coordsXY[1];
+ break;
+ case "skill50":
+ MoveCommand.skill50XY[0] += xMoved;
+ MoveCommand.skill50XY[1] += yMoved;
+ skill50.xPosition = MoveCommand.skill50XY[0];
+ skill50.yPosition = MoveCommand.skill50XY[1];
+ break;
+ case "lividHP":
+ MoveCommand.lividHpXY[0] += xMoved;
+ MoveCommand.lividHpXY[1] += yMoved;
+ lividHP.xPosition = MoveCommand.lividHpXY[0];
+ lividHP.yPosition = MoveCommand.lividHpXY[1];
+ break;
+ case "cakeTimer":
+ MoveCommand.cakeTimerXY[0] += xMoved;
+ MoveCommand.cakeTimerXY[1] += yMoved;
+ cakeTimer.xPosition = MoveCommand.cakeTimerXY[0];
+ cakeTimer.yPosition = MoveCommand.cakeTimerXY[1];
+ break;
+ case "skillTracker":
+ MoveCommand.skillTrackerXY[0] += xMoved;
+ MoveCommand.skillTrackerXY[1] += yMoved;
+ skillTracker.xPosition = MoveCommand.skillTrackerXY[0];
+ skillTracker.yPosition = MoveCommand.skillTrackerXY[1];
+ break;
+ case "waterAnswer":
+ MoveCommand.waterAnswerXY[0] += xMoved;
+ MoveCommand.waterAnswerXY[1] += yMoved;
+ waterAnswer.xPosition = MoveCommand.waterAnswerXY[0];
+ waterAnswer.yPosition = MoveCommand.waterAnswerXY[1];
+ break;
}
this.buttonList.clear();
initGui();
@@ -174,6 +197,8 @@ public class EditLocationsGui extends GuiScreen {
moving = "cakeTimer";
} else if (button == skillTracker) {
moving = "skillTracker";
+ } else if (button == waterAnswer) {
+ moving = "waterAnswer";
}
}
}
@@ -196,6 +221,8 @@ public class EditLocationsGui extends GuiScreen {
ConfigHandler.writeIntConfig("locations", "cakeTimerY", MoveCommand.cakeTimerXY[1]);
ConfigHandler.writeIntConfig("locations", "skillTrackerX", MoveCommand.skillTrackerXY[0]);
ConfigHandler.writeIntConfig("locations", "skillTrackerY", MoveCommand.skillTrackerXY[1]);
+ ConfigHandler.writeIntConfig("locations", "waterAnswerX", MoveCommand.waterAnswerXY[1]);
+ ConfigHandler.writeIntConfig("locations", "waterAnswerY", MoveCommand.waterAnswerXY[1]);
}
}
diff --git a/src/main/java/me/Danker/gui/ExperimentsGui.java b/src/main/java/me/Danker/gui/ExperimentsGui.java
new file mode 100644
index 0000000..b27ff16
--- /dev/null
+++ b/src/main/java/me/Danker/gui/ExperimentsGui.java
@@ -0,0 +1,76 @@
+package me.Danker.gui;
+
+import me.Danker.DankersSkyblockMod;
+import me.Danker.commands.ToggleCommand;
+import me.Danker.handlers.ConfigHandler;
+import me.Danker.utils.Utils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiButton;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+
+public class ExperimentsGui extends GuiScreen {
+
+ private GuiButton goBack;
+ private GuiButton ultrasequencer;
+ private GuiButton chronomatron;
+ private GuiButton superpairs;
+ private GuiButton pickBlock;
+
+ @Override
+ public boolean doesGuiPauseGame() {
+ return false;
+ }
+
+ @Override
+ public void initGui() {
+ super.initGui();
+
+ ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
+ int height = sr.getScaledHeight();
+ int width = sr.getScaledWidth();
+
+ goBack = new GuiButton(0, 2, height - 30, 100, 20, "Go Back");
+ 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));
+
+
+ this.buttonList.add(goBack);
+ this.buttonList.add(ultrasequencer);
+ this.buttonList.add(chronomatron);
+ this.buttonList.add(superpairs);
+ this.buttonList.add(pickBlock);
+ }
+
+ @Override
+ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ this.drawDefaultBackground();
+ super.drawScreen(mouseX, mouseY, partialTicks);
+ }
+
+ @Override
+ public void actionPerformed(GuiButton button) {
+ if (button == goBack) {
+ DankersSkyblockMod.guiToOpen = "dankergui1";
+ } else if (button == ultrasequencer) {
+ ToggleCommand.ultrasequencerToggled = !ToggleCommand.ultrasequencerToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "UltraSequencer", ToggleCommand.ultrasequencerToggled);
+ ultrasequencer.displayString = "Ultrasequencer Solver: " + Utils.getColouredBoolean(ToggleCommand.ultrasequencerToggled);
+ } else if (button == chronomatron) {
+ ToggleCommand.chronomatronToggled = !ToggleCommand.chronomatronToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "Chronomatron", ToggleCommand.chronomatronToggled);
+ chronomatron.displayString = "Chronomatron Solver: " + Utils.getColouredBoolean(ToggleCommand.chronomatronToggled);
+ } else if (button == superpairs) {
+ 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);
+ }
+ }
+
+}
diff --git a/src/main/java/me/Danker/gui/OnlySlayerGui.java b/src/main/java/me/Danker/gui/OnlySlayerGui.java
index c96bfd6..89c701d 100644
--- a/src/main/java/me/Danker/gui/OnlySlayerGui.java
+++ b/src/main/java/me/Danker/gui/OnlySlayerGui.java
@@ -1,6 +1,6 @@
package me.Danker.gui;
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.commands.BlockSlayerCommand;
import me.Danker.handlers.ConfigHandler;
import me.Danker.handlers.TextRenderer;
@@ -38,14 +38,19 @@ public class OnlySlayerGui extends GuiScreen {
int width = sr.getScaledWidth();
onlyName = BlockSlayerCommand.onlySlayerName;
- if (BlockSlayerCommand.onlySlayerNumber.equals("I")) {
- onlyNumberInt = 1;
- } else if (BlockSlayerCommand.onlySlayerNumber.equals("II")) {
- onlyNumberInt = 2;
- } else if (BlockSlayerCommand.onlySlayerNumber.equals("III")) {
- onlyNumberInt = 3;
- } else {
- onlyNumberInt = 4;
+ switch (BlockSlayerCommand.onlySlayerNumber) {
+ case "I":
+ onlyNumberInt = 1;
+ break;
+ case "II":
+ onlyNumberInt = 2;
+ break;
+ case "III":
+ onlyNumberInt = 3;
+ break;
+ default:
+ onlyNumberInt = 4;
+ break;
}
goBack = new GuiButton(0, 2, height - 30, 100, 20, "Go Back");
@@ -89,7 +94,7 @@ public class OnlySlayerGui extends GuiScreen {
@Override
public void actionPerformed(GuiButton button) {
if (button == goBack) {
- TheMod.guiToOpen = "dankergui1";
+ DankersSkyblockMod.guiToOpen = "dankergui1";
} else if (button == off) {
BlockSlayerCommand.onlySlayerName = "";
BlockSlayerCommand.onlySlayerNumber = "";
diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
index b052b02..8701563 100644
--- a/src/main/java/me/Danker/gui/PuzzleSolversGui.java
+++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java
@@ -1,6 +1,6 @@
package me.Danker.gui;
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.commands.ToggleCommand;
import me.Danker.handlers.ConfigHandler;
import me.Danker.utils.Utils;
@@ -21,6 +21,7 @@ public class PuzzleSolversGui extends GuiScreen {
private GuiButton blaze;
private GuiButton creeper;
private GuiButton water;
+ private GuiButton ticTacToe;
private GuiButton startsWith;
private GuiButton selectAll;
private GuiButton itemFrameOnSeaLanterns;
@@ -52,10 +53,11 @@ public class PuzzleSolversGui extends GuiScreen {
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));
- startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled));
- selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled));
+ ticTacToe = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Tic Tac Toe Solver: " + Utils.getColouredBoolean(ToggleCommand.ticTacToeToggled));
+ startsWith = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled));
// Page 2
- itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled));
+ selectAll = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled));
+ itemFrameOnSeaLanterns = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Ignore Arrows On Sea Lanterns: " + Utils.getColouredBoolean(ToggleCommand.itemFrameOnSeaLanternsToggled));
switch (page) {
case 1:
@@ -64,11 +66,12 @@ public class PuzzleSolversGui extends GuiScreen {
this.buttonList.add(blaze);
this.buttonList.add(creeper);
this.buttonList.add(water);
+ this.buttonList.add(ticTacToe);
this.buttonList.add(startsWith);
- this.buttonList.add(selectAll);
this.buttonList.add(nextPage);
break;
case 2:
+ this.buttonList.add(selectAll);
this.buttonList.add(itemFrameOnSeaLanterns);
this.buttonList.add(backPage);
break;
@@ -85,7 +88,7 @@ public class PuzzleSolversGui extends GuiScreen {
@Override
public void actionPerformed(GuiButton button) {
if (button == goBack) {
- TheMod.guiToOpen = "dankergui1";
+ DankersSkyblockMod.guiToOpen = "dankergui1";
} else if (button == backPage) {
Minecraft.getMinecraft().displayGuiScreen(new PuzzleSolversGui(page - 1));
} else if (button == nextPage) {
@@ -110,13 +113,17 @@ public class PuzzleSolversGui extends GuiScreen {
ToggleCommand.waterToggled = !ToggleCommand.waterToggled;
ConfigHandler.writeBooleanConfig("toggles", "WaterPuzzle", ToggleCommand.waterToggled);
water.displayString = "Water Solver: " + Utils.getColouredBoolean(ToggleCommand.waterToggled);
+ } else if (button == ticTacToe) {
+ ToggleCommand.ticTacToeToggled = !ToggleCommand.ticTacToeToggled;
+ ConfigHandler.writeBooleanConfig("toggles", "TicTacToePuzzle", ToggleCommand.ticTacToeToggled);
+ ticTacToe.displayString = "Tic Tac Toe Solver: " + Utils.getColouredBoolean(ToggleCommand.ticTacToeToggled);
} else if (button == startsWith) {
ToggleCommand.startsWithToggled = !ToggleCommand.startsWithToggled;
- ConfigHandler.writeBooleanConfig("toggle", "StartsWithTerminal", ToggleCommand.startsWithToggled);
+ ConfigHandler.writeBooleanConfig("toggles", "StartsWithTerminal", ToggleCommand.startsWithToggled);
startsWith.displayString = "Starts With Letter Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.startsWithToggled);
} else if (button == selectAll) {
ToggleCommand.selectAllToggled = !ToggleCommand.selectAllToggled;
- ConfigHandler.writeBooleanConfig("toggle", "SelectAllTerminal", ToggleCommand.selectAllToggled);
+ ConfigHandler.writeBooleanConfig("toggles", "SelectAllTerminal", ToggleCommand.selectAllToggled);
selectAll.displayString = "Select All Color Terminal Solver: " + Utils.getColouredBoolean(ToggleCommand.selectAllToggled);
} else if (button == itemFrameOnSeaLanterns) {
ToggleCommand.itemFrameOnSeaLanternsToggled = !ToggleCommand.itemFrameOnSeaLanternsToggled;
diff --git a/src/main/java/me/Danker/gui/SkillTrackerGui.java b/src/main/java/me/Danker/gui/SkillTrackerGui.java
index 9672890..4b38f2e 100644
--- a/src/main/java/me/Danker/gui/SkillTrackerGui.java
+++ b/src/main/java/me/Danker/gui/SkillTrackerGui.java
@@ -1,14 +1,13 @@
package me.Danker.gui;
-import org.apache.commons.lang3.time.StopWatch;
-
-import me.Danker.TheMod;
+import me.Danker.DankersSkyblockMod;
import me.Danker.handlers.ConfigHandler;
import me.Danker.handlers.TextRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
+import org.apache.commons.lang3.time.StopWatch;
public class SkillTrackerGui extends GuiScreen {
@@ -51,12 +50,12 @@ public class SkillTrackerGui extends GuiScreen {
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
this.drawDefaultBackground();
String stateText = "";
- if (TheMod.skillStopwatch.isStarted() && !TheMod.skillStopwatch.isSuspended()) {
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) {
stateText = "Timer: Running";
- } else if (!TheMod.skillStopwatch.isStarted() || TheMod.skillStopwatch.isSuspended()) {
+ } else if (!DankersSkyblockMod.skillStopwatch.isStarted() || DankersSkyblockMod.skillStopwatch.isSuspended()) {
stateText = "Timer: Paused";
}
- if (!TheMod.showSkillTracker) {
+ if (!DankersSkyblockMod.showSkillTracker) {
stateText += " (Hidden)";
}
int stateTextWidth = mc.fontRendererObj.getStringWidth(stateText);
@@ -67,31 +66,31 @@ public class SkillTrackerGui extends GuiScreen {
@Override
public void actionPerformed(GuiButton button) {
if (button == goBack) {
- TheMod.guiToOpen = "dankergui1";
+ DankersSkyblockMod.guiToOpen = "dankergui1";
} else if (button == start) {
- if (TheMod.skillStopwatch.isStarted() && TheMod.skillStopwatch.isSuspended()) {
- TheMod.skillStopwatch.resume();
- } else if (!TheMod.skillStopwatch.isStarted()) {
- TheMod.skillStopwatch.start();
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) {
+ DankersSkyblockMod.skillStopwatch.resume();
+ } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) {
+ DankersSkyblockMod.skillStopwatch.start();
}
} else if (button == stop) {
- if (TheMod.skillStopwatch.isStarted() && !TheMod.skillStopwatch.isSuspended()) {
- TheMod.skillStopwatch.suspend();
+ if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) {
+ DankersSkyblockMod.skillStopwatch.suspend();
}
} else if (button == reset) {
- TheMod.skillStopwatch = new StopWatch();
- TheMod.farmingXPGained = 0;
- TheMod.miningXPGained = 0;
- TheMod.combatXPGained = 0;
- TheMod.foragingXPGained = 0;
- TheMod.fishingXPGained = 0;
- TheMod.enchantingXPGained = 0;
- TheMod.alchemyXPGained = 0;
+ DankersSkyblockMod.skillStopwatch = new StopWatch();
+ DankersSkyblockMod.farmingXPGained = 0;
+ DankersSkyblockMod.miningXPGained = 0;
+ DankersSkyblockMod.combatXPGained = 0;
+ DankersSkyblockMod.foragingXPGained = 0;
+ DankersSkyblockMod.fishingXPGained = 0;
+ DankersSkyblockMod.enchantingXPGained = 0;
+ DankersSkyblockMod.alchemyXPGained = 0;
} else if (button == hide) {
- TheMod.showSkillTracker = false;
+ DankersSkyblockMod.showSkillTracker = false;
ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false);
} else if (button == show) {
- TheMod.showSkillTracker = true;
+ DankersSkyblockMod.showSkillTracker = true;
ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true);
}
}
diff --git a/src/main/java/me/Danker/gui/buttons/LocationButton.java b/src/main/java/me/Danker/gui/buttons/LocationButton.java
index 061f198..a8937fd 100644
--- a/src/main/java/me/Danker/gui/buttons/LocationButton.java
+++ b/src/main/java/me/Danker/gui/buttons/LocationButton.java
@@ -34,12 +34,11 @@ public class LocationButton extends GuiButton {
} else {
splitText = text2.split("\n");
}
- int index = 0;
+
int longestText = -1;
- for (int i = 0; i < splitText.length; i++) {
- int stringLength = mc.fontRendererObj.getStringWidth(splitText[i]);
+ for (String s : splitText) {
+ int stringLength = mc.fontRendererObj.getStringWidth(s);
if (stringLength > longestText) {
- index = i;
longestText = stringLength;
}
}