diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-02-27 18:25:51 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-02-27 18:25:51 -0500 |
commit | ad53066846fb168255499a332a1ad4bca39f5935 (patch) | |
tree | 9482f461f3f12c64bcb8e6572f43bc480d817d85 /src/main/java/me/Danker/gui | |
parent | a2f85ba6b9d80be3026aa906783a21c0b05cb681 (diff) | |
download | SkyblockMod-ad53066846fb168255499a332a1ad4bca39f5935.tar.gz SkyblockMod-ad53066846fb168255499a332a1ad4bca39f5935.tar.bz2 SkyblockMod-ad53066846fb168255499a332a1ad4bca39f5935.zip |
Move features into their own files
Diffstat (limited to 'src/main/java/me/Danker/gui')
-rw-r--r-- | src/main/java/me/Danker/gui/EditLocationsGui.java | 19 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/OnlySlayerGui.java | 22 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/SkillTrackerGui.java | 39 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/WarningGui.java | 6 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/WarningGuiRedirect.java | 2 |
5 files changed, 41 insertions, 47 deletions
diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java index e3d6b73..cefe0a3 100644 --- a/src/main/java/me/Danker/gui/EditLocationsGui.java +++ b/src/main/java/me/Danker/gui/EditLocationsGui.java @@ -3,6 +3,7 @@ package me.Danker.gui; import me.Danker.DankersSkyblockMod; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; +import me.Danker.features.*; import me.Danker.gui.buttons.LocationButton; import me.Danker.handlers.ConfigHandler; import me.Danker.utils.Utils; @@ -73,9 +74,9 @@ public class EditLocationsGui extends GuiScreen { EnumChatFormatting.YELLOW + 2 + "\n" + EnumChatFormatting.YELLOW + 1; - 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 skillTrackerText = SkillTracker.SKILL_TRACKER_COLOUR + "Farming XP Earned: 462,425.3\n" + + SkillTracker.SKILL_TRACKER_COLOUR + "Time Elapsed: " + Utils.getTimeBetween(0, 3602) + "\n" + + SkillTracker.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" + @@ -86,13 +87,13 @@ public class EditLocationsGui extends GuiScreen { 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, 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); + coords = new LocationButton(0, MoveCommand.coordsXY[0], MoveCommand.coordsXY[1], 141 * ScaleCommand.coordsScale, 12 * ScaleCommand.coordsScale, ScaleCommand.coordsScale, NoF3Coords.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, Skill50Display.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, DankersSkyblockMod.CAKE_COLOUR + " 11h16m", null, null); + cakeTimer = new LocationButton(0, MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1] + 5, 85 * ScaleCommand.cakeTimerScale, 18 * ScaleCommand.cakeTimerScale, ScaleCommand.cakeTimerScale, CakeTimer.CAKE_COLOUR + " 11h16m", null, null); skillTracker = new LocationButton(0, MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[1], 150 * ScaleCommand.skillTrackerScale, 28 * ScaleCommand.skillTrackerScale, ScaleCommand.skillTrackerScale, skillTrackerText, null, null); waterAnswer = new LocationButton(0, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], 190 * ScaleCommand.waterAnswerScale, 54 * ScaleCommand.waterAnswerScale, ScaleCommand.waterAnswerScale, waterAnswerText, null, null); - bonzoTimer = new LocationButton(0, MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1] + 5, 85 * ScaleCommand.bonzoTimerScale, 18 * ScaleCommand.bonzoTimerScale, ScaleCommand.bonzoTimerScale, DankersSkyblockMod.BONZO_COLOR + " 3m30s", null, null); + bonzoTimer = new LocationButton(0, MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1] + 5, 85 * ScaleCommand.bonzoTimerScale, 18 * ScaleCommand.bonzoTimerScale, ScaleCommand.bonzoTimerScale, BonzoMaskTimer.BONZO_COLOR + " 3m30s", null, null); this.buttonList.add(coords); @@ -114,14 +115,14 @@ public class EditLocationsGui extends GuiScreen { double cakeTimerScale = ScaleCommand.cakeTimerScale; double cakeTimerScaleReset = Math.pow(cakeTimerScale, -1); GL11.glScaled(cakeTimerScale, cakeTimerScale, cakeTimerScale); - mc.getTextureManager().bindTexture(DankersSkyblockMod.CAKE_ICON); + mc.getTextureManager().bindTexture(CakeTimer.CAKE_ICON); Gui.drawModalRectWithCustomSizedTexture(MoveCommand.cakeTimerXY[0], MoveCommand.cakeTimerXY[1], 0, 0, 16, 16, 16, 16); GL11.glScaled(cakeTimerScaleReset, cakeTimerScaleReset, cakeTimerScaleReset); double bonzoTimerScale = ScaleCommand.bonzoTimerScale; double bonzoTimerScaleReset = Math.pow(bonzoTimerScale, -1); GL11.glScaled(bonzoTimerScale, bonzoTimerScale, bonzoTimerScale); - mc.getTextureManager().bindTexture(DankersSkyblockMod.BONZO_ICON); + mc.getTextureManager().bindTexture(BonzoMaskTimer.BONZO_ICON); Gui.drawModalRectWithCustomSizedTexture(MoveCommand.bonzoTimerXY[0], MoveCommand.bonzoTimerXY[1], 0, 0, 16, 16, 16, 16); GL11.glScaled(bonzoTimerScaleReset, bonzoTimerScaleReset, bonzoTimerScaleReset); diff --git a/src/main/java/me/Danker/gui/OnlySlayerGui.java b/src/main/java/me/Danker/gui/OnlySlayerGui.java index a3c8ffc..552a354 100644 --- a/src/main/java/me/Danker/gui/OnlySlayerGui.java +++ b/src/main/java/me/Danker/gui/OnlySlayerGui.java @@ -1,7 +1,7 @@ package me.Danker.gui; import me.Danker.DankersSkyblockMod; -import me.Danker.commands.BlockSlayerCommand; +import me.Danker.features.BlockWrongSlayer; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; import net.minecraft.client.Minecraft; @@ -37,8 +37,8 @@ public class OnlySlayerGui extends GuiScreen { int height = sr.getScaledHeight(); int width = sr.getScaledWidth(); - onlyName = BlockSlayerCommand.onlySlayerName; - switch (BlockSlayerCommand.onlySlayerNumber) { + onlyName = BlockWrongSlayer.onlySlayerName; + switch (BlockWrongSlayer.onlySlayerNumber) { case "I": onlyNumberInt = 1; break; @@ -80,10 +80,10 @@ public class OnlySlayerGui extends GuiScreen { Minecraft mc = Minecraft.getMinecraft(); String displayText; - if (BlockSlayerCommand.onlySlayerName.equals("")) { + if (BlockWrongSlayer.onlySlayerName.equals("")) { displayText = "Only Allow Slayer: Off"; } else { - displayText = "Only Allow Slayer: " + BlockSlayerCommand.onlySlayerName + " " + BlockSlayerCommand.onlySlayerNumber; + displayText = "Only Allow Slayer: " + BlockWrongSlayer.onlySlayerName + " " + BlockWrongSlayer.onlySlayerNumber; } int displayWidth = mc.fontRendererObj.getStringWidth(displayText); new TextRenderer(mc, displayText, width / 2 - displayWidth / 2, 10, 1D); @@ -97,8 +97,8 @@ public class OnlySlayerGui extends GuiScreen { DankersSkyblockMod.guiToOpen = "dankergui1"; return; } else if (button == off) { - BlockSlayerCommand.onlySlayerName = ""; - BlockSlayerCommand.onlySlayerNumber = ""; + BlockWrongSlayer.onlySlayerName = ""; + BlockWrongSlayer.onlySlayerNumber = ""; ConfigHandler.writeStringConfig("toggles", "BlockSlayer", ""); return; } else if (button == zombie) { @@ -132,10 +132,10 @@ public class OnlySlayerGui extends GuiScreen { default: onlyNumber = "IV"; } - - BlockSlayerCommand.onlySlayerName = onlyName; - BlockSlayerCommand.onlySlayerNumber = onlyNumber; - ConfigHandler.writeStringConfig("toggles", "BlockSlayer", BlockSlayerCommand.onlySlayerName + " " + BlockSlayerCommand.onlySlayerNumber); + + BlockWrongSlayer.onlySlayerName = onlyName; + BlockWrongSlayer.onlySlayerNumber = onlyNumber; + ConfigHandler.writeStringConfig("toggles", "BlockSlayer", BlockWrongSlayer.onlySlayerName + " " + BlockWrongSlayer.onlySlayerNumber); } } diff --git a/src/main/java/me/Danker/gui/SkillTrackerGui.java b/src/main/java/me/Danker/gui/SkillTrackerGui.java index 4b38f2e..fb7a7c9 100644 --- a/src/main/java/me/Danker/gui/SkillTrackerGui.java +++ b/src/main/java/me/Danker/gui/SkillTrackerGui.java @@ -1,6 +1,7 @@ package me.Danker.gui; import me.Danker.DankersSkyblockMod; +import me.Danker.features.SkillTracker; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; import net.minecraft.client.Minecraft; @@ -50,12 +51,12 @@ public class SkillTrackerGui extends GuiScreen { public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); String stateText = ""; - if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) { + if (SkillTracker.skillStopwatch.isStarted() && !SkillTracker.skillStopwatch.isSuspended()) { stateText = "Timer: Running"; - } else if (!DankersSkyblockMod.skillStopwatch.isStarted() || DankersSkyblockMod.skillStopwatch.isSuspended()) { + } else if (!SkillTracker.skillStopwatch.isStarted() || SkillTracker.skillStopwatch.isSuspended()) { stateText = "Timer: Paused"; } - if (!DankersSkyblockMod.showSkillTracker) { + if (!SkillTracker.showSkillTracker) { stateText += " (Hidden)"; } int stateTextWidth = mc.fontRendererObj.getStringWidth(stateText); @@ -68,29 +69,29 @@ public class SkillTrackerGui extends GuiScreen { if (button == goBack) { DankersSkyblockMod.guiToOpen = "dankergui1"; } else if (button == start) { - if (DankersSkyblockMod.skillStopwatch.isStarted() && DankersSkyblockMod.skillStopwatch.isSuspended()) { - DankersSkyblockMod.skillStopwatch.resume(); - } else if (!DankersSkyblockMod.skillStopwatch.isStarted()) { - DankersSkyblockMod.skillStopwatch.start(); + if (SkillTracker.skillStopwatch.isStarted() && SkillTracker.skillStopwatch.isSuspended()) { + SkillTracker.skillStopwatch.resume(); + } else if (!SkillTracker.skillStopwatch.isStarted()) { + SkillTracker.skillStopwatch.start(); } } else if (button == stop) { - if (DankersSkyblockMod.skillStopwatch.isStarted() && !DankersSkyblockMod.skillStopwatch.isSuspended()) { - DankersSkyblockMod.skillStopwatch.suspend(); + if (SkillTracker.skillStopwatch.isStarted() && !SkillTracker.skillStopwatch.isSuspended()) { + SkillTracker.skillStopwatch.suspend(); } } else if (button == reset) { - DankersSkyblockMod.skillStopwatch = new StopWatch(); - DankersSkyblockMod.farmingXPGained = 0; - DankersSkyblockMod.miningXPGained = 0; - DankersSkyblockMod.combatXPGained = 0; - DankersSkyblockMod.foragingXPGained = 0; - DankersSkyblockMod.fishingXPGained = 0; - DankersSkyblockMod.enchantingXPGained = 0; - DankersSkyblockMod.alchemyXPGained = 0; + SkillTracker.skillStopwatch = new StopWatch(); + SkillTracker.farmingXPGained = 0; + SkillTracker.miningXPGained = 0; + SkillTracker.combatXPGained = 0; + SkillTracker.foragingXPGained = 0; + SkillTracker.fishingXPGained = 0; + SkillTracker.enchantingXPGained = 0; + SkillTracker.alchemyXPGained = 0; } else if (button == hide) { - DankersSkyblockMod.showSkillTracker = false; + SkillTracker.showSkillTracker = false; ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", false); } else if (button == show) { - DankersSkyblockMod.showSkillTracker = true; + SkillTracker.showSkillTracker = true; ConfigHandler.writeBooleanConfig("misc", "showSkillTracker", true); } } diff --git a/src/main/java/me/Danker/gui/WarningGui.java b/src/main/java/me/Danker/gui/WarningGui.java index 63b4710..db0c21b 100644 --- a/src/main/java/me/Danker/gui/WarningGui.java +++ b/src/main/java/me/Danker/gui/WarningGui.java @@ -1,17 +1,11 @@ package me.Danker.gui; -import akka.event.Logging; import me.Danker.handlers.TextRenderer; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiLabel; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; -import javax.xml.soap.Text; -import java.util.ArrayList; -import java.util.List; - public class WarningGui extends GuiScreen { private GuiButton close; diff --git a/src/main/java/me/Danker/gui/WarningGuiRedirect.java b/src/main/java/me/Danker/gui/WarningGuiRedirect.java index 78e6f18..d61cae3 100644 --- a/src/main/java/me/Danker/gui/WarningGuiRedirect.java +++ b/src/main/java/me/Danker/gui/WarningGuiRedirect.java @@ -1,10 +1,8 @@ package me.Danker.gui; -import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiMainMenu; import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.ScaledResolution; public class WarningGuiRedirect extends GuiMainMenu { public GuiScreen guiToShow; |