diff options
Diffstat (limited to 'src/main/java/me/Danker')
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 48 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DungeonsCommand.java | 1 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/SetkeyCommand.java | 1 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ToggleCommand.java | 27 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/DankerGui.java | 81 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/WarningGui.java | 61 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/WarningGuiRedirect.java | 28 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 27 |
8 files changed, 221 insertions, 53 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index 55bc799..0e90206 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -1,5 +1,6 @@ package me.Danker; +import akka.event.Logging; import com.google.gson.JsonObject; import me.Danker.commands.*; import me.Danker.gui.*; @@ -10,9 +11,7 @@ import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.GuiChat; -import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.gui.*; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; @@ -69,6 +68,7 @@ import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; import java.awt.*; +import java.net.URLDecoder; import java.text.NumberFormat; import java.util.List; import java.util.*; @@ -98,6 +98,8 @@ public class DankersSkyblockMod { static double lastMaddoxTime = 0; static KeyBinding[] keyBindings = new KeyBinding[3]; static boolean usingLabymod = false; + static boolean usingOAM = false; + static boolean OAMWarning = false; public static String guiToOpen = null; static boolean foundLivid = false; static Entity livid = null; @@ -310,10 +312,34 @@ public class DankersSkyblockMod { @EventHandler public void postInit(final FMLPostInitializationEvent event) { - usingLabymod = Loader.isModLoaded("labymod"); - System.out.println("LabyMod detection: " + usingLabymod); + Package[] packages = Package.getPackages(); + for(Package p : packages){ + if(p.getName().startsWith("com.spiderfrog.gadgets")){ + usingOAM = true; + break; + } + } + System.out.println("OAM detection: " + usingOAM); + + + usingLabymod = Loader.isModLoaded("labymod"); + System.out.println("LabyMod detection: " + usingLabymod); } + @SubscribeEvent + public void onGuiOpenEvent(GuiOpenEvent event){ + if(event.gui instanceof GuiMainMenu && usingOAM && !OAMWarning){ + System.out.println("Gui opened: Instance of GuiMainMenu."); + if(!(event.gui instanceof WarningGui)){ + System.out.println("No instance of WarningGui"); + event.gui = new WarningGuiRedirect(new WarningGui()); + OAMWarning = true; + }else{ + System.out.println("Instance of WarningGui"); + } + } + } + // Update checker @SubscribeEvent public void onJoin(EntityJoinWorldEvent event) { @@ -605,6 +631,16 @@ public class DankersSkyblockMod { event.setCanceled(true); return; } + // Ability Cooldown + if (!ToggleCommand.cooldownMessages && message.contains("This ability is currently on cooldown for") && message.contains("more second")) { + event.setCanceled(true); + return; + } + // Out of mana messages + if (!ToggleCommand.manaMessages && message.contains("You do not have enough mana to do this!")) { + event.setCanceled(true); + return; + } // Implosion if (!ToggleCommand.implosionMessages) { if (message.contains("Your Implosion hit ") || message.contains("There are blocks in the way")) { @@ -612,7 +648,7 @@ public class DankersSkyblockMod { return; } } - + if (ToggleCommand.oruoToggled && Utils.inDungeons) { if (message.contains("What SkyBlock year is it?")) { double currentTime = System.currentTimeMillis() /1000L; diff --git a/src/main/java/me/Danker/commands/DungeonsCommand.java b/src/main/java/me/Danker/commands/DungeonsCommand.java index 8b14bf7..4179420 100644 --- a/src/main/java/me/Danker/commands/DungeonsCommand.java +++ b/src/main/java/me/Danker/commands/DungeonsCommand.java @@ -135,5 +135,4 @@ public class DungeonsCommand extends CommandBase { ); }).start(); } - } diff --git a/src/main/java/me/Danker/commands/SetkeyCommand.java b/src/main/java/me/Danker/commands/SetkeyCommand.java index db5fb9a..ee4b5a5 100644 --- a/src/main/java/me/Danker/commands/SetkeyCommand.java +++ b/src/main/java/me/Danker/commands/SetkeyCommand.java @@ -38,5 +38,4 @@ public class SetkeyCommand extends CommandBase implements ICommand { ConfigHandler.writeStringConfig("api", "APIKey", arg1[0]); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set API key to " + DankersSkyblockMod.SECONDARY_COLOUR + arg1[0])); } - } diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 81e3f9c..0955264 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -23,17 +23,21 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean spiritBearAlerts; public static boolean aotdToggled; public static boolean lividDaggerToggled; - public static boolean sceptreMessages; public static boolean petColoursToggled; public static boolean dungeonTimerToggled; public static boolean golemAlertToggled; public static boolean expertiseLoreToggled; public static boolean skill50DisplayToggled; public static boolean outlineTextToggled; + public static boolean cakeTimerToggled; + // Chat Messages + public static boolean sceptreMessages; public static boolean midasStaffMessages; public static boolean implosionMessages; public static boolean healMessages; - public static boolean cakeTimerToggled; + public static boolean cooldownMessages; + public static boolean manaMessages; + // Dungeons Messages public static boolean lowHealthNotifyToggled; public static boolean lividSolverToggled; public static boolean stopSalvageStarredToggled; @@ -71,9 +75,10 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public String getCommandUsage(ICommandSender arg0) { + return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" + "aotd/lividdagger/flowerweapons/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + - "outlinetext/midasstaffmessages/implosionmessages/healmessages/caketimer/lowhealthnotify/" + + "outlinetext/midasstaffmessages/implosionmessages/healmessages/cooldownmessages/manamessages/caketimer/lowhealthnotify/" + "lividsolver/stopsalvagestarred/notifyslayerslain/necronnotifications/bonzotimer/blockbreakingfarms/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/waterpuzzle/tictactoepuzzle/" + "watchermessage/startswithterminal/selectallterminal/clickinorderterminal/blockwrongterminalclicks/" + "itemframeonsealanterns/ultrasequencer/chronomatron/superpairs/hidetooltipsinaddons/pickblock/list>"; @@ -83,7 +88,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public int getRequiredPermissionLevel() { return 0; } - + @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { @@ -91,7 +96,7 @@ public class ToggleCommand extends CommandBase implements ICommand { "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "flowerweapons", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", - "implosionmessages", "healmessages", "caketimer", "lowhealthnotify", + "implosionmessages", "healmessages", "cooldownmessages", "manamessages", "caketimer", "lowhealthnotify", "lividsolver", "stopsalvagestarred", "notifyslayerslain", "necronnotifications", "bonzotimer", "blockbreakingfarms", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", "waterpuzzle", "tictactoepuzzle", "watchermessage", "startswithterminal", "selectallterminal", "clickinorderterminal", "blockwrongterminalclicks", "itemframeonsealanterns", "ultrasequencer", @@ -185,6 +190,16 @@ public class ToggleCommand extends CommandBase implements ICommand { ConfigHandler.writeBooleanConfig("toggles", "HealMessages", healMessages); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Heal messages have been set to " + DankersSkyblockMod.SECONDARY_COLOUR + healMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); break; + case "cooldownmessages": + cooldownMessages = !cooldownMessages; + ConfigHandler.writeBooleanConfig("toggles", "CooldownMessages", cooldownMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Ability cooldown messages has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + cooldownMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; + case "manamessages": + manaMessages = !manaMessages; + ConfigHandler.writeBooleanConfig("toggles", "ManaMessages", manaMessages); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Out of mana messages has been set to " + DankersSkyblockMod.SECONDARY_COLOUR + manaMessages + DankersSkyblockMod.MAIN_COLOUR + ".")); + break; case "petcolors": case "petcolours": petColoursToggled = !petColoursToggled; @@ -357,6 +372,8 @@ public class ToggleCommand extends CommandBase implements ICommand { DankersSkyblockMod.TYPE_COLOUR + " Midas Staff messages: " + DankersSkyblockMod.VALUE_COLOUR + midasStaffMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Implosion messages: " + DankersSkyblockMod.VALUE_COLOUR + implosionMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Heal messages: " + DankersSkyblockMod.VALUE_COLOUR + healMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Ability cooldown messages: " + DankersSkyblockMod.VALUE_COLOUR + cooldownMessages + "\n" + + DankersSkyblockMod.TYPE_COLOUR + " Out of mana messages: " + DankersSkyblockMod.VALUE_COLOUR + manaMessages + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Pet colours: " + DankersSkyblockMod.VALUE_COLOUR + petColoursToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Dungeon timer: " + DankersSkyblockMod.VALUE_COLOUR + dungeonTimerToggled + "\n" + DankersSkyblockMod.TYPE_COLOUR + " Golem spawn alerts: " + DankersSkyblockMod.VALUE_COLOUR + golemAlertToggled + "\n" + diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 2860997..b91ed3e 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -39,18 +39,22 @@ public class DankerGui extends GuiScreen { private GuiButton chatMaddox; private GuiButton spiritBearAlert; 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 cakeTimer; + // Chat Messages + private GuiButton lividDagger; + private GuiButton sceptreMessages; + private GuiButton midasStaffMessages; + private GuiButton implosionMessages; + private GuiButton healMessages; + private GuiButton cooldownMessages; + private GuiButton manaMessages; + //Dungeons + private GuiButton dungeonTimer; private GuiButton lowHealthNotify; private GuiButton lividSolver; private GuiButton stopSalvageStarred; @@ -96,38 +100,41 @@ public class DankerGui extends GuiScreen { pickBlock = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Auto-Swap to Pick Block: " + Utils.getColouredBoolean(ToggleCommand.swapToPickBlockToggled)); // Page 2 coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); - dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); + chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Click On-Screen to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled)); 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 - 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)); + spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts)); + sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); + midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages)); + implosionMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Implosion Messages: " + Utils.getColouredBoolean(ToggleCommand.implosionMessages)); + healMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages)); + cooldownMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Cooldown Messages: " + Utils.getColouredBoolean(ToggleCommand.cooldownMessages)); + manaMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Mana Messages: " + Utils.getColouredBoolean((ToggleCommand.manaMessages))); // Page 4 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)); + gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); 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)); + splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); // Page 5 - stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); - watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); - splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); - notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); - flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); - necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); - bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); + lowHealthNotify = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Low Health Notifications: " + Utils.getColouredBoolean(ToggleCommand.lowHealthNotifyToggled)); + lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); + dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); + stopSalvageStarred = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Stop Salvaging Starred Items: " + Utils.getColouredBoolean(ToggleCommand.stopSalvageStarredToggled)); + watcherReadyMessage = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Display Watcher Ready Message: " + Utils.getColouredBoolean(ToggleCommand.watcherReadyToggled)); + splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + notifySlayerSlain = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Notify when Slayer Slain: " + Utils.getColouredBoolean(ToggleCommand.notifySlayerSlainToggled)); //Page 6 - blockBreakingFarms = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled)); + flowerWeapons = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Prevent Placing FoT/Spirit Sceptre: " + Utils.getColouredBoolean(ToggleCommand.flowerWeaponsToggled)); + necronNotifications = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Necron Phase Notifications: " + Utils.getColouredBoolean(ToggleCommand.necronNotificationsToggled)); + bonzoTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Bonzo's Mask Timer: " + Utils.getColouredBoolean(ToggleCommand.bonzoTimerToggled)); + blockBreakingFarms = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Prevent Breaking Farms: " + Utils.getColouredBoolean(ToggleCommand.blockBreakingFarmsToggled)); switch (page) { case 1: @@ -142,7 +149,7 @@ public class DankerGui extends GuiScreen { break; case 2: this.buttonList.add(coords); - this.buttonList.add(dungeonTimer); + this.buttonList.add(chatMaddox); this.buttonList.add(cakeTimer); this.buttonList.add(skill50Display); this.buttonList.add(slayerCount); @@ -152,13 +159,13 @@ public class DankerGui extends GuiScreen { 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(cooldownMessages); + this.buttonList.add(manaMessages); this.buttonList.add(nextPage); this.buttonList.add(backPage); break; @@ -166,25 +173,27 @@ public class DankerGui extends GuiScreen { this.buttonList.add(goldenEnch); this.buttonList.add(petColours); this.buttonList.add(expertiseLore); - this.buttonList.add(lividSolver); + this.buttonList.add(gparty); this.buttonList.add(golemAlerts); this.buttonList.add(rngesusAlert); - this.buttonList.add(lowHealthNotify); + this.buttonList.add(splitFishing); this.buttonList.add(nextPage); this.buttonList.add(backPage); break; case 5: + this.buttonList.add(lowHealthNotify); + this.buttonList.add(lividSolver); + this.buttonList.add(dungeonTimer); this.buttonList.add(stopSalvageStarred); this.buttonList.add(watcherReadyMessage); - this.buttonList.add(splitFishing); this.buttonList.add(notifySlayerSlain); this.buttonList.add(flowerWeapons); - this.buttonList.add(necronNotifications); - this.buttonList.add(bonzoTimer); this.buttonList.add(nextPage); this.buttonList.add(backPage); break; case 6: + this.buttonList.add(necronNotifications); + this.buttonList.add(bonzoTimer); this.buttonList.add(blockBreakingFarms); this.buttonList.add(backPage); break; @@ -318,6 +327,14 @@ public class DankerGui extends GuiScreen { ToggleCommand.healMessages = !ToggleCommand.healMessages; ConfigHandler.writeBooleanConfig("toggles", "HealMessages", ToggleCommand.healMessages); healMessages.displayString = "Heal Messages: " + Utils.getColouredBoolean(ToggleCommand.healMessages); + } else if (button == cooldownMessages) { + ToggleCommand.cooldownMessages = !ToggleCommand.cooldownMessages; + ConfigHandler.writeBooleanConfig("toggles", "CooldownMessages", ToggleCommand.cooldownMessages); + cooldownMessages.displayString = "Cooldown Messages: " + Utils.getColouredBoolean(ToggleCommand.cooldownMessages); + } else if (button == manaMessages) { + ToggleCommand.manaMessages = !ToggleCommand.manaMessages; + ConfigHandler.writeBooleanConfig("toggles", "ManaMessages", ToggleCommand.manaMessages); + manaMessages.displayString = "Mana Messages: " + Utils.getColouredBoolean(ToggleCommand.manaMessages); } else if (button == lowHealthNotify) { ToggleCommand.lowHealthNotifyToggled = !ToggleCommand.lowHealthNotifyToggled; ConfigHandler.writeBooleanConfig("toggles", "LowHealthNotify", ToggleCommand.lowHealthNotifyToggled); diff --git a/src/main/java/me/Danker/gui/WarningGui.java b/src/main/java/me/Danker/gui/WarningGui.java new file mode 100644 index 0000000..63b4710 --- /dev/null +++ b/src/main/java/me/Danker/gui/WarningGui.java @@ -0,0 +1,61 @@ +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; + + public WarningGui(){ + + } + + @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(); + + close = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Close"); + + this.buttonList.add(close); + } + + @Override + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + this.drawDefaultBackground(); + String text0 = "§cWARNING!§0"; + int text0Width = mc.fontRendererObj.getStringWidth(text0); + new TextRenderer(mc, text0, (int)(width * 0.45) - text0Width / 2, (int) (height * 0.1), 2 ); + String text1 = "You are using SpiderFrog's Old Animations mod."; + int text1Width = mc.fontRendererObj.getStringWidth(text1); + new TextRenderer(mc, text1, width / 2 - text1Width / 2, (int) (height * 0.3), 1D ); + String text2 = "This mod breaks Danker's Skyblock Mod."; + int text2Width = mc.fontRendererObj.getStringWidth(text2); + new TextRenderer(mc, text2, width / 2 - text2Width / 2, (int) (height * 0.4), 1D); + super.drawScreen(mouseX, mouseY, partialTicks); + } + + @Override + public void actionPerformed(GuiButton button){ + if(button == close) { + Minecraft.getMinecraft().displayGuiScreen(null); + } + } +} diff --git a/src/main/java/me/Danker/gui/WarningGuiRedirect.java b/src/main/java/me/Danker/gui/WarningGuiRedirect.java new file mode 100644 index 0000000..78e6f18 --- /dev/null +++ b/src/main/java/me/Danker/gui/WarningGuiRedirect.java @@ -0,0 +1,28 @@ +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; + private GuiButton close; + + protected void keyTyped(char par1, int par2){} + public WarningGuiRedirect(GuiScreen g){ + guiToShow = g; + } + + public void initGui(){ + super.initGui(); + } + + + public void drawScreen(int par1, int par2, float par3){ + super.drawScreen(par1, par2, par3); + + mc.displayGuiScreen(guiToShow); + } +} diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 199936f..0ad6809 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -177,18 +177,25 @@ public class ConfigHandler { if (!hasKey("toggles", "SpiritBearAlerts")) writeBooleanConfig("toggles", "SpiritBearAlerts", true); if (!hasKey("toggles", "AOTD")) writeBooleanConfig("toggles", "AOTD", false); if (!hasKey("toggles", "LividDagger")) writeBooleanConfig("toggles", "LividDagger", false); - if (!hasKey("toggles", "SceptreMessages")) writeBooleanConfig("toggles", "SceptreMessages", true); if (!hasKey("toggles", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true); if (!hasKey("toggles", "ImplosionMessages")) writeBooleanConfig("toggles", "ImplosionMessages", true); if (!hasKey("toggles", "HealMessages")) writeBooleanConfig("toggles", "HealMessages", true); if (!hasKey("toggles", "PetColors")) writeBooleanConfig("toggles", "PetColors", false); - if (!hasKey("toggles", "DungeonTimer")) writeBooleanConfig("toggles", "DungeonTimer", false); if (!hasKey("toggles", "BlockSlayer")) writeStringConfig("toggles", "BlockSlayer", ""); if (!hasKey("toggles", "GolemAlerts")) writeBooleanConfig("toggles", "GolemAlerts", false); if (!hasKey("toggles", "ExpertiseLore")) writeBooleanConfig("toggles", "ExpertiseLore", true); if (!hasKey("toggles", "Skill50Display")) writeBooleanConfig("toggles", "Skill50Display", false); if (!hasKey("toggles", "OutlineText")) writeBooleanConfig("toggles", "OutlineText", false); if (!hasKey("toggles", "CakeTimer")) writeBooleanConfig("toggles", "CakeTimer", false); + // Chat Messages + if (!hasKey("toggles", "SceptreMessages")) writeBooleanConfig("toggles", "SceptreMessages", true); + if (!hasKey("toggles", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true); + if (!hasKey("toggles", "ImplosionMessages")) writeBooleanConfig("toggles", "ImplosionMessages", true); + if (!hasKey("toggles", "HealMessages")) writeBooleanConfig("toggles", "HealMessages", true); + if (!hasKey("toggles", "CooldownMessages")) writeBooleanConfig("toggles","CooldownMessages",true); + if (!hasKey("toggles", "ManaMessages")) writeBooleanConfig("toggles","ManaMessages",true); + // Dungeons + if (!hasKey("toggles", "DungeonTimer")) writeBooleanConfig("toggles", "DungeonTimer", false); if (!hasKey("toggles", "LowHealthNotify")) writeBooleanConfig("toggles", "LowHealthNotify", false); if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false); if (!hasKey("toggles", "StopSalvageStarred")) writeBooleanConfig("toggles", "StopSalvageStarred", false); @@ -458,17 +465,21 @@ public class ConfigHandler { ToggleCommand.spiritBearAlerts = getBoolean("toggles", "SpiritBearAlerts"); ToggleCommand.aotdToggled = getBoolean("toggles", "AOTD"); ToggleCommand.lividDaggerToggled = getBoolean("toggles", "LividDagger"); - ToggleCommand.sceptreMessages = getBoolean("toggles", "SceptreMessages"); - ToggleCommand.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages"); - ToggleCommand.implosionMessages = getBoolean("toggles", "ImplosionMessages"); - ToggleCommand.healMessages = getBoolean("toggles", "HealMessages"); ToggleCommand.petColoursToggled = getBoolean("toggles", "PetColors"); - ToggleCommand.dungeonTimerToggled = getBoolean("toggles", "DungeonTimer"); ToggleCommand.golemAlertToggled = getBoolean("toggles", "GolemAlerts"); ToggleCommand.expertiseLoreToggled = getBoolean("toggles", "ExpertiseLore"); ToggleCommand.skill50DisplayToggled = getBoolean("toggles", "Skill50Display"); ToggleCommand.outlineTextToggled = getBoolean("toggles", "OutlineText"); ToggleCommand.cakeTimerToggled = getBoolean("toggles", "CakeTimer"); + // Chat Messages + ToggleCommand.sceptreMessages = getBoolean("toggles", "SceptreMessages"); + ToggleCommand.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages"); + ToggleCommand.implosionMessages = getBoolean("toggles", "ImplosionMessages"); + ToggleCommand.healMessages = getBoolean("toggles", "HealMessages"); + ToggleCommand.cooldownMessages = getBoolean("toggles", "CooldownMessages"); + ToggleCommand.manaMessages = getBoolean("toggles", "ManaMessages"); + //Dungeons + ToggleCommand.dungeonTimerToggled = getBoolean("toggles", "DungeonTimer"); ToggleCommand.lowHealthNotifyToggled = getBoolean("toggles", "LowHealthNotify"); ToggleCommand.lividSolverToggled = getBoolean("toggles", "LividSolver"); ToggleCommand.stopSalvageStarredToggled = getBoolean("toggles", "StopSalvageStarred"); @@ -582,7 +593,7 @@ public class ConfigHandler { // Spooky Fishing LootCommand.scarecrows = getInt("fishing", "scarecrow"); LootCommand.nightmares = getInt("fishing", "nightmare"); - LootCommand.werewolfs = getInt("fishing", "nightmare"); + LootCommand.werewolfs = getInt("fishing", "werewolf"); LootCommand.phantomFishers = getInt("fishing", "phantomFisher"); LootCommand.grimReapers = getInt("fishing", "grimReaper"); |