diff options
author | bowser0000 <bowser0000@gmail.com> | 2020-11-02 16:44:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 16:44:31 -0500 |
commit | 292f5dde43c3e00b78e1d4e772ae336340b0a834 (patch) | |
tree | 7c3810178429cbca5ec62fd05183394e99b4bf5d | |
parent | 5c5ffdbd4379d4c5002cd42c297f90e631566006 (diff) | |
parent | dfe29936c3bf3c7189a9a4d73d4d1ec33122f7ea (diff) | |
download | SkyblockMod-292f5dde43c3e00b78e1d4e772ae336340b0a834.tar.gz SkyblockMod-292f5dde43c3e00b78e1d4e772ae336340b0a834.tar.bz2 SkyblockMod-292f5dde43c3e00b78e1d4e772ae336340b0a834.zip |
1.8.1v1.8.1
Merge pull request #27 from bowser0000/development
-rw-r--r-- | README.md | 10 | ||||
-rw-r--r-- | build.gradle | 6 | ||||
-rw-r--r-- | src/main/java/me/Danker/TheMod.java | 492 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DHelpCommand.java | 10 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/DisplayCommand.java | 10 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/LootCommand.java | 37 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/MoveCommand.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ResetLootCommand.java | 16 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ScaleCommand.java | 9 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ToggleCommand.java | 50 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/DankerGui.java | 83 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/DisplayGui.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/EditLocationsGui.java | 12 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/PuzzleSolversGui.java | 75 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 35 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/PacketHandler.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 173 |
17 files changed, 825 insertions, 217 deletions
@@ -6,6 +6,7 @@ Discord Server: https://discord.gg/QsEkNQS ## Incompatibilities - Old Animations <2.6.4 - Frequent crashes - Old Animations 2.6.4 - Pet colors does not work +- LabyMod + Sidebar Mod Revamp - Displays don't show ## Current features - Guild party desktop notifications (toggleable) @@ -13,6 +14,7 @@ Discord Server: https://discord.gg/QsEkNQS - Golden T10/T6/T4 enchant display (toggleable) - Block AOTD ability (toggleable) - Disable Spirit Sceptre messages (toggleable) +- Disable Midas Staff messages (toggleable) - Slayer item tracker (with graphic display) (scalable) - RNGesus drop alerts (toggleable) - Click in chat to open Maddox (toggleable) @@ -21,6 +23,8 @@ Discord Server: https://discord.gg/QsEkNQS - Fishing tracker (with graphic display) (scalable) - Expertise kills in fishing rod lore - Dungeons tracker (with graphic display) (scalable) +- Dungeons puzzle solver (Riddle, trivia, blaze, creeper) (toggleable) +- Find correct Livid (with graphic display of HP) (toggleable) - Pet background colors based on level - Golem spawning alerts (toggleable) - Show total skill xp instead of progress to next level @@ -30,14 +34,14 @@ Discord Server: https://discord.gg/QsEkNQS ## Commands - /dhelp - Returns this message in-game. - /dsm - Opens the GUI for Danker's Skyblock Mod. -- /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list> - Toggles features. /toggle list returns values of every toggle. +- /toggle <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalerts/aotd/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/list> - Toggles features. /toggle list returns values of every toggle. - /setkey <key> - Sets API key. - /getkey - Returns key set with /setkey and copies it to your clipboard. - /loot <zombie/spider/wolf/fishing/catacombs> [winter/f(1-6)/session] - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead. - /display <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/f(1-6)/session] - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active. - /resetloot <zombie/spider/wolf/fishing/catacombs/confirm/cancel> - - Resets loot for trackers. /resetloot confirm confirms the reset. -- /move <coords/display/dungeontimer/skill50> <x> <y> - Moves text display to specified X and Y coordinates. -- /scale <coords/display/dungeontimer/skill50> <scale (0.1 - 10)> - Scales text display to a specified multipler between 0.1x and 10x. +- /move <coords/display/dungeontimer/skill50/lividhp> <x> <y> - Moves text display to specified X and Y coordinates. +- /scale <coords/display/dungeontimer/skill50/lividhp> <scale (0.1 - 10)> - Scales text display to a specified multipler between 0.1x and 10x. - /slayer [player] - Uses API to get slayer xp of a person. If no name is provided, it checks yours. - /skills [player] - Uses API to get skill levels of a person. If no name is provided, it checks yours. - /lobbyskills - Uses API to find the average skills of the lobby, as well the three players with the highest skill average. diff --git a/build.gradle b/build.gradle index cae3082..90e1bc0 100644 --- a/build.gradle +++ b/build.gradle @@ -20,12 +20,16 @@ plugins { id "net.minecraftforge.gradle.forge" version "2.0.2" } */ -version = "1.8" +version = "1.8.1" group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "Danker's Skyblock Mod" sourceCompatibility = targetCompatibility = 1.8 +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + minecraft { version = "1.8.9-11.15.1.2318-1.8.9" runDir = "run" diff --git a/src/main/java/me/Danker/TheMod.java b/src/main/java/me/Danker/TheMod.java index 4c30ee9..bada8b8 100644 --- a/src/main/java/me/Danker/TheMod.java +++ b/src/main/java/me/Danker/TheMod.java @@ -5,6 +5,7 @@ import java.awt.SystemTray; import java.awt.Toolkit; import java.awt.TrayIcon; import java.text.NumberFormat; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -43,38 +44,48 @@ import me.Danker.gui.DankerGui; import me.Danker.gui.DisplayGui; import me.Danker.gui.EditLocationsGui; import me.Danker.gui.OnlySlayerGui; +import me.Danker.gui.PuzzleSolversGui; import me.Danker.handlers.APIHandler; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.PacketHandler; import me.Danker.handlers.ScoreboardHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.settings.KeyBinding; +import net.minecraft.entity.Entity; +import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.event.ClickEvent; import net.minecraft.event.ClickEvent.Action; +import net.minecraft.init.Blocks; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerChest; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; import net.minecraft.util.StringUtils; +import net.minecraft.util.Vec3; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.client.event.sound.PlaySoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Loader; @@ -86,6 +97,7 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent; +import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent; import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; @@ -94,7 +106,7 @@ import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion; public class TheMod { public static final String MODID = "Danker's Skyblock Mod"; - public static final String VERSION = "1.8"; + public static final String VERSION = "1.8.1"; static double checkItemsNow = 0; static double itemsChecked = 0; @@ -104,6 +116,7 @@ public class TheMod public static int titleTimer = -1; public static boolean showTitle = false; public static String titleText = ""; + public static int SKILL_TIME; public static int skillTimer = -1; public static boolean showSkill = false; public static String skillText = ""; @@ -113,6 +126,19 @@ public class TheMod static int lastMouse = -1; static boolean usingLabymod = false; public static String guiToOpen = null; + static String[] riddleSolutions = {"The reward is not in my chest!", "At least one of them is lying, and the reward is not in", + "My chest doesn't have the reward. We are all telling the truth", "My chest has the reward and I'm telling the truth", + "The reward isn't in any of our chests", "Both of them are telling the truth."}; + static Map<String, String> triviaSolutions = new HashMap<String, String>(); + static Entity highestBlaze = null; + static Entity lowestBlaze = null; + // Among Us colours + static int[] creeperLineColours = {0x50EF39, 0xC51111, 0x132ED1, 0x117F2D, 0xED54BA, 0xEF7D0D, 0xF5F557, 0xD6E0F0, 0x6B2FBB, 0x39FEDC}; + static boolean drawCreeperLines = false; + static Vec3 creeperLocation = new Vec3(0, 0, 0); + static List<Vec3[]> creeperLines = new ArrayList<Vec3[]>(); + static boolean foundLivid = false; + static Entity livid = null; static double dungeonStartTime = 0; static double bloodOpenTime = 0; @@ -132,34 +158,73 @@ public class TheMod cf.reloadConfig(); // For golden enchants + t6Enchants.put("9Angler VI", "6Angler VI"); t6Enchants.put("9Bane of Arthropods VI", "6Bane of Arthropods VI"); + t6Enchants.put("9Caster VI", "6Caster VI"); + t6Enchants.put("9Compact X", "6Compact X"); t6Enchants.put("9Critical VI", "6Critical VI"); t6Enchants.put("9Dragon Hunter V", "6Dragon Hunter V"); + t6Enchants.put("9Efficiency VI", "6Efficiency VI"); t6Enchants.put("9Ender Slayer VI", "6Ender Slayer VI"); t6Enchants.put("9Experience IV", "6Experience IV"); + t6Enchants.put("9Expertise X", "6Expertise X"); + t6Enchants.put("9Feather Falling X", "6Feather Falling X"); + t6Enchants.put("9Frail VI", "6Frail VI"); t6Enchants.put("9Giant Killer VI", "6Giant Killer VI"); + t6Enchants.put("9Growth VI", "6Growth VI"); + t6Enchants.put("9Infinite Quiver X", "6Infinite Quiver X"); + t6Enchants.put("9Lethality VI", "6Lethality VI"); t6Enchants.put("9Life Steal IV", "6Life Steal IV"); t6Enchants.put("9Looting IV", "6Looting IV"); t6Enchants.put("9Luck VI", "6Luck VI"); + t6Enchants.put("9Luck of the Sea VI", "6Luck of the Sea VI"); + t6Enchants.put("9Lure VI", "6Lure VI"); + t6Enchants.put("9Magnet VI", "6Magnet VI"); + t6Enchants.put("9Overload V", "6Overload V"); + t6Enchants.put("9Power VI", "6Power VI"); + t6Enchants.put("9Protection VI", "6Protection VI"); t6Enchants.put("9Scavenger IV", "6Scavenger IV"); t6Enchants.put("9Scavenger V", "6Scavenger V"); t6Enchants.put("9Sharpness VI", "6Sharpness VI"); - t6Enchants.put("9Smite VII", "6Smite VII"); t6Enchants.put("9Smite VI", "6Smite VI"); - t6Enchants.put("9Vampirism VI", "6Vampirism VI"); - t6Enchants.put("9Power VI", "6Power VI"); - t6Enchants.put("9Growth VI", "6Growth VI"); - t6Enchants.put("9Protection VI", "6Protection VI"); - t6Enchants.put("9Efficiency VI", "6Efficiency VI"); - t6Enchants.put("9Angler VI", "6Angler VI"); - t6Enchants.put("9Caster VI", "6Caster VI"); - t6Enchants.put("9Frail VI", "6Frail VI"); - t6Enchants.put("9Luck of the Sea VI", "6Luck of the Sea VI"); - t6Enchants.put("9Lure VI", "6Lure VI"); - t6Enchants.put("9Magnet VI", "6Magnet VI"); t6Enchants.put("9Spiked Hook VI", "6Spiked Hook VI"); - t6Enchants.put("9Feather Falling X", "6Feather Falling X"); - t6Enchants.put("9Infinite Quiver X", "6Infinite Quiver X"); + t6Enchants.put("9Thunderlord VI", "6Thunderlord VI"); + t6Enchants.put("9Vampirism VI", "6Vampirism VI"); + + triviaSolutions.put("What is the status of The Watcher?", "Stalker"); + triviaSolutions.put("What is the status of Bonzo?", "New Necromancer"); + triviaSolutions.put("What is the status of Scarf?", "Apprentice Necromancer"); + triviaSolutions.put("What is the status of The Professor?", "Professor"); + triviaSolutions.put("What is the status of Thorn?", "Shaman Necromancer"); + triviaSolutions.put("What is the status of Livid?", "Master Necromancer"); + triviaSolutions.put("What is the status of Sadan?", "Necromancer Lord"); + triviaSolutions.put("What is the status of Maxor?", "Young Wither"); + triviaSolutions.put("What is the status of Goldor?", "Wither Soldier"); + triviaSolutions.put("What is the status of Storm?", "Elementalist"); + triviaSolutions.put("What is the status of Necron?", "Wither Lord"); + triviaSolutions.put("How many total Fairy Souls are there?", "209 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Spider's Den?", "17 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in The End?", "12 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in The Barn?", "7 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Mushroom Desert?", "8 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Blazing Fortress?", "19 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in The Park?", "11 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Jerry's Workshop?", "5 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Hub?", "79 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in The Hub?", "79 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Deep Caverns?", "21 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Gold Mine?", "12 Fairy Souls"); + triviaSolutions.put("How many Fairy Souls are there in Dungeon Hub?", "7 Fairy Souls"); + triviaSolutions.put("Which brother is on the Spider's Den?", "Rick"); + triviaSolutions.put("What is the name of Rick's brother?", "Pat"); + triviaSolutions.put("What is the name of the Painter in the Hub?", "Marco"); + triviaSolutions.put("What is the name of the person that upgrades pets?", "Kat"); + triviaSolutions.put("What is the name of the lady of the Nether?", "Elle"); + triviaSolutions.put("Which villager in the Village gives you a Rogue Sword?", "Jamie"); + triviaSolutions.put("How many unique minions are there?", "52 Minions"); + triviaSolutions.put("Which of these enemies does not spawn in the Spider's Den?", "Zombie Spider OR Cave Spider OR Broodfather OR Wither Skeleton"); + triviaSolutions.put("Which of these monsters only spawns at night?", "Zombie Villager OR Ghast"); + triviaSolutions.put("Which of these is not a dragon in The End?", "Zoomer Dragon OR Weak Dragon OR Stonk Dragon OR Holy Dragon OR Boomer Dragon"); String patternString = "(" + String.join("|", t6Enchants.keySet()) + ")"; pattern = Pattern.compile(patternString); @@ -239,6 +304,12 @@ public class TheMod } } + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + foundLivid = false; + livid = null; + } + // It randomly broke, so I had to make it the highest priority @SubscribeEvent(priority = EventPriority.HIGHEST) public void onChat(ClientChatReceivedEvent event) { @@ -260,7 +331,7 @@ public class TheMod int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""))); double percentage = (double) Math.floor(((currentXp + previousXp) / 55172425) * 10000D) / 100D; - skillTimer = 40; + skillTimer = SKILL_TIME; showSkill = true; skillText = EnumChatFormatting.AQUA + xpGained + " (" + NumberFormat.getNumberInstance(Locale.US).format(currentXp + previousXp) + "/55,172,425) " + percentage + "%"; } @@ -278,6 +349,16 @@ public class TheMod } // Dungeon chat spoken by an NPC, containing : + if (ToggleCommand.threeManToggled && Utils.inDungeons && message.contains("[NPC]")) { + for (String solution : riddleSolutions) { + if (message.contains(solution)) { + String npcName = message.substring(message.indexOf("]") + 2, message.indexOf(":")); + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_GREEN + "" + EnumChatFormatting.BOLD + npcName + EnumChatFormatting.GREEN + " has the blessing.")); + break; + } + } + } + if (message.contains("[BOSS] The Watcher: You have proven yourself. You may pass.")) { watcherClearTime = System.currentTimeMillis() / 1000; } @@ -287,6 +368,15 @@ public class TheMod if (message.contains(":")) return; + if (ToggleCommand.oruoToggled && Utils.inDungeons) { + for (String question : triviaSolutions.keySet()) { + if (message.contains(question)) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Answer: " + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + triviaSolutions.get(question))); + break; + } + } + } + if (tc.gpartyToggled) { if (message.contains(" has invited all members of ")) { try { @@ -472,260 +562,157 @@ public class TheMod lc.greatCatches++; lc.greatCatchesSession++; cf.writeIntConfig("fishing", "greatCatch", lc.greatCatches); - } else if (message.contains("You caught a lowly Squid")) { + } else if (message.contains("A Squid appeared")) { lc.squids++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.squidsSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "squid", lc.squids); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); - } else if (message.contains("From the depths of the waters, you've reeled in a Sea Walker")) { + } else if (message.contains("You caught a Sea Walker")) { lc.seaWalkers++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.seaWalkersSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "seaWalker", lc.seaWalkers); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); - } else if (message.contains("Pitch darkness reveals you've caught a")) { + } else if (message.contains("Pitch darkness reveals a Night Squid")) { lc.nightSquids++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.nightSquidsSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "nightSquid", lc.nightSquids); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); - } else if (message.contains("You've stumbled upon a patrolling Sea Guardian")) { + } else if (message.contains("You stumbled upon a Sea Guardian")) { lc.seaGuardians++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.seaGuardiansSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "seaGuardian", lc.seaGuardians); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) { lc.seaWitches++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.seaWitchesSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "seaWitch", lc.seaWitches); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); - } else if (message.contains("From the depths of the waters, you've reeled in a Sea Archer")) { + } else if (message.contains("You reeled in a Sea Archer")) { lc.seaArchers++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.seaArchersSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "seaArcher", lc.seaArchers); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); - } else if (message.contains("The Monster of the Deep emerges from the dark depths")) { + } else if (message.contains("The Monster of the Deep has emerged")) { lc.monsterOfTheDeeps++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.monsterOfTheDeepsSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "monsterOfDeep", lc.monsterOfTheDeeps); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); - } else if (message.contains("You have found a Catfish, don't let it steal your catches")) { + } else if (message.contains("Huh? A Catfish")) { lc.catfishes++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.catfishesSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "catfish", lc.catfishes); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("Is this even a fish? It's the Carrot King")) { lc.carrotKings++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.carrotKingsSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "carrotKing", lc.carrotKings); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("Gross! A Sea Leech")) { lc.seaLeeches++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.seaLeechesSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "seaLeech", lc.seaLeeches); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("You've discovered a Guardian Defender of the sea")) { lc.guardianDefenders++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.guardianDefendersSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "guardianDefender", lc.guardianDefenders); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) { lc.deepSeaProtectors++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.deepSeaProtectorsSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "deepSeaProtector", lc.deepSeaProtectors); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("The Water Hydra has come to test your strength")) { lc.hydras++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.hydrasSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "hydra", lc.hydras); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("The Sea Emperor arises from the depths")) { + increaseSeaCreatures(); + lc.seaEmperors++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.empTime = System.currentTimeMillis() / 1000; lc.empSCs = 0; lc.seaEmperorsSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; lc.empTimeSession = System.currentTimeMillis() / 1000; lc.empSCsSession = 0; cf.writeIntConfig("fishing", "seaEmperor", lc.seaEmperors); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); cf.writeDoubleConfig("fishing", "empTime", lc.empTime); cf.writeIntConfig("fishing", "empSC", lc.empSCs); } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter lc.frozenSteves++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.frozenStevesSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "frozenSteve", lc.frozenSteves); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("It's a snowman! He looks harmless")) { lc.frostyTheSnowmans++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.frostyTheSnowmansSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "snowman", lc.frostyTheSnowmans); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("stole Jerry's Gifts...get them back")) { lc.grinches++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.grinchesSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "grinch", lc.grinches); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("What is this creature")) { + increaseSeaCreatures(); + lc.yetis++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.yetiTime = System.currentTimeMillis() / 1000; lc.yetiSCs = 0; lc.yetisSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; lc.yetiTimeSession = System.currentTimeMillis() / 1000; lc.yetiSCsSession = 0; cf.writeIntConfig("fishing", "yeti", lc.yetis); cf.writeDoubleConfig("fishing", "yetiTime", lc.yetiTime); cf.writeIntConfig("fishing", "yetiSC", lc.yetiSCs); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); } else if (message.contains("A tiny fin emerges from the water, you've caught a Nurse Shark")) { // Fishing Festival lc.nurseSharks++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.nurseSharksSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "nurseShark", lc.nurseSharks); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("You spot a fin as blue as the water it came from, it's a Blue Shark")) { lc.blueSharks++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.blueSharksSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "blueShark", lc.blueSharks); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("A striped beast bounds from the depths, the wild Tiger Shark")) { lc.tigerSharks++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.tigerSharksSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "tigerShark", lc.tigerSharks); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); increaseSeaCreatures(); } else if (message.contains("Hide no longer, a Great White Shark has tracked your scent and thirsts for your blood")) { lc.greatWhiteSharks++; - lc.seaCreatures++; - lc.fishingMilestone++; lc.greatWhiteSharksSession++; - lc.seaCreaturesSession++; - lc.fishingMilestoneSession++; cf.writeIntConfig("fishing", "greatWhiteShark", lc.greatWhiteSharks); - cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); - cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); + increaseSeaCreatures(); + } else if (message.contains("Phew! It's only a Scarecrow")) { + lc.scarecrows++; + lc.scarecrowsSession++; + cf.writeIntConfig("fishing", "scarecrow", lc.werewolfs); + increaseSeaCreatures(); + } else if (message.contains("You hear trotting from beneath the waves, you caught a Nightmare")) { + lc.nightmares++; + lc.nightmaresSession++; + cf.writeIntConfig("fishing", "nightmare", lc.werewolfs); + increaseSeaCreatures(); + } else if (message.contains("It must be a full moon, a Werewolf appears")) { + lc.werewolfs++; + lc.werewolfsSession++; + cf.writeIntConfig("fishing", "werewolf", lc.werewolfs); + increaseSeaCreatures(); + } else if (message.contains("The spirit of a long lost Phantom Fisher has come to haunt you")) { + lc.phantomFishers++; + lc.phantomFishersSession++; + cf.writeIntConfig("fishing", "phantomFisher", lc.werewolfs); + increaseSeaCreatures(); + } else if (message.contains("This can't be! The manifestation of death himself")) { + lc.grimReapers++; + lc.grimReapersSession++; + cf.writeIntConfig("fishing", "grimReaper", lc.werewolfs); increaseSeaCreatures(); } else if (message.contains("Dungeon starts in 1 second.")) { // Dungeons Stuff - dungeonStartTime = System.currentTimeMillis() / 1000; + dungeonStartTime = System.currentTimeMillis() / 1000 + 1; bloodOpenTime = dungeonStartTime; watcherClearTime = dungeonStartTime; bossClearTime = dungeonStartTime; @@ -958,7 +945,11 @@ public class TheMod } // Spirit Sceptre - if (!tc.sceptreMessages && message.contains("Your Bat Staff hit ")) { + if (!tc.sceptreMessages && message.contains("Your Spirit Sceptre hit ")) { + event.setCanceled(true); + } + // Midas Staff + if (!tc.midasStaffMessages && message.contains("Your Molten Wave hit ")) { event.setCanceled(true); } } @@ -997,7 +988,7 @@ public class TheMod new TextRenderer(Minecraft.getMinecraft(), coordText, moc.coordsXY[0], moc.coordsXY[1], ScaleCommand.coordsScale); } - if (tc.dungeonTimerToggled) { + if (tc.dungeonTimerToggled && Utils.inDungeons) { String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + EnumChatFormatting.DARK_RED + "Blood Open:\n" + EnumChatFormatting.RED + "Watcher Clear:\n" + @@ -1014,6 +1005,10 @@ public class TheMod new TextRenderer(Minecraft.getMinecraft(), dungeonTimers, (int) (moc.dungeonTimerXY[0] + (80 * ScaleCommand.dungeonTimerScale)), moc.dungeonTimerXY[1], ScaleCommand.dungeonTimerScale); } + if (tc.lividSolverToggled && foundLivid && livid != null) { + new TextRenderer(Minecraft.getMinecraft(), livid.getName().replace("" + EnumChatFormatting.BOLD, ""), moc.lividHpXY[0], moc.lividHpXY[1], ScaleCommand.lividHpScale); + } + if (!ds.display.equals("off")) { final LootCommand lc = new LootCommand(); String dropsText = ""; @@ -1482,6 +1477,44 @@ public class TheMod EnumChatFormatting.BLUE + nf.format(lc.blueSharksSession) + "\n" + EnumChatFormatting.GOLD + nf.format(lc.tigerSharksSession) + "\n" + EnumChatFormatting.WHITE + nf.format(lc.greatWhiteSharksSession); + } else if (ds.display.equals("spooky_fishing")) { + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Scarecrows:\n" + + EnumChatFormatting.GRAY + "Nightmares:\n" + + EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + + EnumChatFormatting.GOLD + "Grim Reapers:"; + countText = EnumChatFormatting.AQUA + nf.format(lc.seaCreatures) + "\n" + + EnumChatFormatting.AQUA + nf.format(lc.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(lc.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(lc.greatCatches) + "\n" + + EnumChatFormatting.BLUE + nf.format(lc.scarecrows) + "\n" + + EnumChatFormatting.GRAY + nf.format(lc.nightmares) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(lc.werewolfs) + "\n" + + EnumChatFormatting.GOLD + nf.format(lc.phantomFishers) + "\n" + + EnumChatFormatting.GOLD + nf.format(lc.grimReapers); + } else if (ds.display.equals("spooky_fishing_session")) { + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Scarecrows:\n" + + EnumChatFormatting.GRAY + "Nightmares:\n" + + EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + + EnumChatFormatting.GOLD + "Grim Reapers:"; + countText = EnumChatFormatting.AQUA + nf.format(lc.seaCreaturesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(lc.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(lc.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(lc.greatCatchesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(lc.scarecrowsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(lc.nightmaresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(lc.werewolfsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(lc.phantomFishersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(lc.grimReapersSession); } else if (ds.display.equals("catacombs_floor_one")) { dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + @@ -1813,14 +1846,15 @@ public class TheMod @SubscribeEvent public void onTick(TickEvent.ClientTickEvent event) { - // Check if player is in Skyblock every second + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + + // Checks every second tickAmount++; if (tickAmount % 20 == 0) { - Minecraft mc = Minecraft.getMinecraft(); - EntityPlayerSP player = mc.thePlayer; - if (player != null) { Utils.checkForSkyblock(); + Utils.checkForDungeons(); } if (DisplayCommand.auto && mc != null && mc.theWorld != null) { @@ -1858,9 +1892,104 @@ public class TheMod ConfigHandler.writeStringConfig("misc", "display", DisplayCommand.display); } + if (ToggleCommand.creeperToggled && Utils.inDungeons && mc.theWorld != null) { + double x = player.posX; + double y = player.posY; + double z = player.posZ; + // Find creepers nearby + AxisAlignedBB creeperScan = new AxisAlignedBB(x - 14, y - 8, z - 13, x + 14, y + 8, z + 13); // 28x16x26 cube + List<EntityCreeper> creepers = mc.theWorld.getEntitiesWithinAABB(EntityCreeper.class, creeperScan); + // Check if creeper is nearby + if (creepers.size() > 0) { + EntityCreeper creeper = creepers.get(0); + // Start creeper line drawings + creeperLines.clear(); + if (!drawCreeperLines) creeperLocation = new Vec3(creeper.posX, creeper.posY + 1, creeper.posZ); + drawCreeperLines = true; + // Search for nearby sea lanterns and prismarine blocks + BlockPos point1 = new BlockPos(creeper.posX - 14, creeper.posY - 7, creeper.posZ - 13); + BlockPos point2 = new BlockPos(creeper.posX + 14, creeper.posY + 10, creeper.posZ + 13); + Iterable<BlockPos> blocks = BlockPos.getAllInBox(point1, point2); + for (BlockPos blockPos : blocks) { + Block block = mc.theWorld.getBlockState(blockPos).getBlock(); + if (block == Blocks.sea_lantern || block == Blocks.prismarine) { + // Connect block to nearest block on opposite side + Vec3 startBlock = new Vec3(blockPos.getX() + 0.5, blockPos.getY() + 0.5, blockPos.getZ() + 0.5); + BlockPos oppositeBlock = Utils.getFirstBlockPosAfterVectors(mc, startBlock, creeperLocation, 10, 20); + BlockPos endBlock = Utils.getNearbyBlock(mc, oppositeBlock, Blocks.sea_lantern, Blocks.prismarine); + if (endBlock != null && startBlock.yCoord > 68 && endBlock.getY() > 68) { // Don't create line underground + // Add to list for drawing + Vec3[] insertArray = {startBlock, new Vec3(endBlock.getX() + 0.5, endBlock.getY() + 0.5, endBlock.getZ() + 0.5)}; + creeperLines.add(insertArray); + } + } + } + } else { + drawCreeperLines = false; + } + } + + if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && mc.theWorld != null) { + boolean inF5 = false; + + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("The Catacombs (F5)")) { + inF5 = true; + break; + } + } + + if (inF5) { + List<Entity> loadedLivids = new ArrayList<Entity>(); + List<Entity> entities = mc.theWorld.getLoadedEntityList(); + for (Entity entity : entities) { + String name = entity.getName(); + if (name.contains("Livid") && name.length() > 5 && name.charAt(1) == name.charAt(5) && !loadedLivids.contains(entity)) { + loadedLivids.add(entity); + } + } + if (loadedLivids.size() > 8) { + livid = loadedLivids.get(0); + foundLivid = true; + } + } + } + tickAmount = 0; } + // Checks 5 times per second + if (tickAmount % 4 == 0) { + if (ToggleCommand.blazeToggled && Utils.inDungeons && mc.theWorld != null) { + List<Entity> entities = mc.theWorld.getLoadedEntityList(); + int highestHealth = 0; + highestBlaze = null; + int lowestHealth = 99999999; + lowestBlaze = null; + + for (Entity entity : entities) { + if (entity.getName().contains("Blaze") && entity.getName().contains("/")) { + String blazeName = StringUtils.stripControlCodes(entity.getName()); + try { + int health = Integer.parseInt(blazeName.substring(blazeName.indexOf("/") + 1, blazeName.length() - 2)); + if (health > highestHealth) { + highestHealth = health; + highestBlaze = entity; + } + if (health < lowestHealth) { + lowestHealth = health; + lowestBlaze = entity; + } + } catch (NumberFormatException ex) { + System.err.println(ex); + } + } + } + } + } + if (titleTimer >= 0) { if (titleTimer == 0) { showTitle = false; @@ -1889,12 +2018,37 @@ public class TheMod mc.displayGuiScreen(new OnlySlayerGui()); } else if (guiToOpen.equals("editlocations")) { mc.displayGuiScreen(new EditLocationsGui()); + } else if (guiToOpen.equals("puzzlesolvers")) { + mc.displayGuiScreen(new PuzzleSolversGui()); } guiToOpen = null; } } @SubscribeEvent + public void onWorldRender(RenderWorldLastEvent event) { + if (ToggleCommand.blazeToggled) { + if (lowestBlaze != null) { + BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); + Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Smallest", 0xFF0000, 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, 0xFF, 0x00, 0x00, 0xFF, event.partialTicks); + } + if (highestBlaze != null) { + BlockPos stringPos = new BlockPos(highestBlaze.posX, highestBlaze.posY + 1, highestBlaze.posZ); + Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Biggest", 0x40FF40, 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); + Utils.draw3DBox(aabb, 0x00, 0xFF, 0x00, 0xFF, event.partialTicks); + } + } + if (ToggleCommand.creeperToggled && drawCreeperLines && !creeperLines.isEmpty()) { + for (int i = 0; i < creeperLines.size(); i++) { + Utils.draw3DLine(creeperLines.get(i)[0], creeperLines.get(i)[1], creeperLineColours[i % 10], event.partialTicks); + } + } + } + + @SubscribeEvent public void onInteract(PlayerInteractEvent event) { if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; ItemStack item = event.entityPlayer.getHeldItem(); @@ -2054,11 +2208,8 @@ public class TheMod @SubscribeEvent public void onServerConnect(ClientConnectedToServerEvent event) { - if (!PacketHandler.added) { - event.manager.channel().pipeline().addBefore("packet_handler", "danker_packet_handler", new PacketHandler()); - PacketHandler.added = true; - System.out.println("Added packet handler to channel pipeline."); - } + event.manager.channel().pipeline().addBefore("packet_handler", "danker_packet_handler", new PacketHandler()); + System.out.println("Added packet handler to channel pipeline."); } public void increaseSeaCreatures() { @@ -2075,7 +2226,6 @@ public class TheMod List<String> scoreboard = ScoreboardHandler.getSidebarLines(); for (String s : scoreboard) { String sCleaned = ScoreboardHandler.cleanSB(s); - System.out.println(sCleaned); if (sCleaned.contains("Jerry's Workshop") || sCleaned.contains("Jerry Pond")) { if (lc.yetiSCs != -1) { lc.yetiSCs++; @@ -2086,6 +2236,12 @@ public class TheMod } } + lc.seaCreatures++; + lc.fishingMilestone++; + lc.seaCreaturesSession++; + lc.fishingMilestoneSession++; + cf.writeIntConfig("fishing", "seaCreature", lc.seaCreatures); + cf.writeIntConfig("fishing", "milestone", lc.fishingMilestone); cf.writeIntConfig("fishing", "empSC", lc.empSCs); cf.writeIntConfig("fishing", "yetiSC", lc.yetiSCs); diff --git a/src/main/java/me/Danker/commands/DHelpCommand.java b/src/main/java/me/Danker/commands/DHelpCommand.java index 03aa318..c4fd618 100644 --- a/src/main/java/me/Danker/commands/DHelpCommand.java +++ b/src/main/java/me/Danker/commands/DHelpCommand.java @@ -34,14 +34,14 @@ 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/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/lividsolver/oruopuzzle/blazepuzzle/creeperpuzzle/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> [winter/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + - EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" + + EnumChatFormatting.GOLD + " /loot <zombie/spider/wolf/fishing/catacombs> [winter/festival/spooky/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Returns loot received from slayer quests or fishing stats. /loot fishing winter returns winter sea creatures instead.\n" + + EnumChatFormatting.GOLD + " /display <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/spooky/f(1-6)/session]" + EnumChatFormatting.AQUA + " - Text display for trackers. /display fishing winter displays winter sea creatures instead. /display auto automatically displays the loot for the slayer quest you have active.\n" + EnumChatFormatting.GOLD + " /resetloot <zombie/spider/wolf/fishing/catacombs/confirm/cancel>" + EnumChatFormatting.AQUA + " - Resets loot for trackers. /resetloot confirm confirms the reset.\n" + - EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + - EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + + EnumChatFormatting.GOLD + " /move <coords/display/dungeontimer/skill50/lividhp> <x> <y>" + EnumChatFormatting.AQUA + " - Moves text display to specified X and Y coordinates.\n" + + EnumChatFormatting.GOLD + " /scale <coords/display/dungeontimer/skill50/lividhp> <scale (0.1 - 10)>" + EnumChatFormatting.AQUA + " - Scales text display to a specified multipler between 0.1x and 10x.\n" + EnumChatFormatting.GOLD + " /slayer [player]" + EnumChatFormatting.AQUA + " - Uses API to get slayer xp of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + " /skills [player]" + EnumChatFormatting.AQUA + " - Uses API to get skill levels of a person. If no name is provided, it checks yours.\n" + EnumChatFormatting.GOLD + " /lobbyskills" + EnumChatFormatting.AQUA + " - Uses API to find the average skills of the lobby, as well the three players with the highest skill average.\n" + diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index b96ab2b..ee4422f 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -22,7 +22,7 @@ public class DisplayCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/session/f(1-6)]"; + return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs/auto/off> [winter/festival/spooky/session/f(1-6)]"; } @Override @@ -35,7 +35,7 @@ public class DisplayCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "auto", "off"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { - return getListOfStringsMatchingLastWord(args, "winter", "festival", "session"); + return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6"); } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { @@ -89,6 +89,12 @@ public class DisplayCommand extends CommandBase { } else { display = "fishing_festival"; } + } else if (arg1.length > 1 && arg1[1].equalsIgnoreCase("spooky")) { + if (showSession) { + display = "spooky_fishing_session"; + } else { + display = "spooky_fishing"; + } } else { if (showSession) { display = "fishing_session"; diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index bbe4f73..65f8031 100644 --- a/src/main/java/me/Danker/commands/LootCommand.java +++ b/src/main/java/me/Danker/commands/LootCommand.java @@ -88,6 +88,12 @@ public class LootCommand extends CommandBase { public static int blueSharks; public static int tigerSharks; public static int greatWhiteSharks; + // Spooky Fishing + public static int scarecrows; + public static int nightmares; + public static int werewolfs; + public static int phantomFishers; + public static int grimReapers; // Catacombs Dungeons public static int recombobulators; @@ -215,6 +221,12 @@ public class LootCommand extends CommandBase { public static int blueSharksSession = 0; public static int tigerSharksSession = 0; public static int greatWhiteSharksSession = 0; + // Spooky Fishing + public static int scarecrowsSession = 0; + public static int nightmaresSession = 0; + public static int werewolfsSession = 0; + public static int phantomFishersSession = 0; + public static int grimReapersSession = 0; // Catacombs Dungeons public static int recombobulatorsSession = 0; @@ -274,7 +286,7 @@ public class LootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/festival/f(1-6)/session]"; + return "/" + getCommandName() + " <zombie/spider/wolf/fishing/catacombs> [winter/festival/spooky/f(1-6)/session]"; } @Override @@ -287,7 +299,7 @@ public class LootCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { - return getListOfStringsMatchingLastWord(args, "winter", "festival", "session"); + return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { return getListOfStringsMatchingLastWord(args, "f1", "floor1", "f2", "floor2", "f3", "floor3", "f4", "floor4", "f5", "floor5", "f6", "floor6"); } else if (args.length > 1 || (args.length == 3 && args[0].equalsIgnoreCase("fishing") && args[1].equalsIgnoreCase("winter"))) { @@ -578,6 +590,27 @@ public class LootCommand extends CommandBase { EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(tigerSharks) + "\n" + EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(greatWhiteSharks) + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + } else if (arg1[1].equalsIgnoreCase("spooky")) { + if (showSession) { + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + " Spooky Fishing Summary (Current Session):\n" + + EnumChatFormatting.BLUE + " Scarecrows: " + nf.format(scarecrowsSession) + "\n" + + EnumChatFormatting.GRAY + " Nightmares: " + nf.format(nightmaresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(werewolfsSession) + "\n" + + EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(phantomFishersSession) + "\n" + + EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(grimReapersSession) + "\n" + + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); + return; + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.GOLD + EnumChatFormatting.BOLD + " Spooky Fishing Summary:\n" + + EnumChatFormatting.BLUE + " Scarecrows: " + nf.format(scarecrows) + "\n" + + EnumChatFormatting.GRAY + " Nightmares: " + nf.format(nightmares) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Werewolves: " + nf.format(werewolfs) + "\n" + + EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(phantomFishers) + "\n" + + EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(grimReapers) + "\n" + + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); } } diff --git a/src/main/java/me/Danker/commands/MoveCommand.java b/src/main/java/me/Danker/commands/MoveCommand.java index 7fb9acd..8b68e7e 100644 --- a/src/main/java/me/Danker/commands/MoveCommand.java +++ b/src/main/java/me/Danker/commands/MoveCommand.java @@ -17,6 +17,7 @@ public class MoveCommand extends CommandBase { public static int[] displayXY = {0, 0}; public static int[] dungeonTimerXY = {0, 0}; public static int[] skill50XY = {0, 0}; + public static int[] lividHpXY = {0, 0}; @Override public String getCommandName() { @@ -25,7 +26,7 @@ public class MoveCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <x> <y>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <x> <y>"; } @Override @@ -36,7 +37,7 @@ public class MoveCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp"); } return null; } @@ -75,6 +76,12 @@ public class MoveCommand extends CommandBase { cf.writeIntConfig("locations", "skill50X", skill50XY[0]); cf.writeIntConfig("locations", "skill50Y", skill50XY[1]); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); + } else if (arg1[0].equalsIgnoreCase("lividhp")) { + lividHpXY[0] = Integer.parseInt(arg1[1]); + lividHpXY[1] = Integer.parseInt(arg1[2]); + cf.writeIntConfig("locations", "lividHpX", lividHpXY[0]); + cf.writeIntConfig("locations", "lividHpY", lividHpXY[1]); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid HP has been moved to " + EnumChatFormatting.DARK_GREEN + arg1[1] + ", " + arg1[2])); } else { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index bf5b218..678f486 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -182,6 +182,11 @@ public class ResetLootCommand extends CommandBase { lc.blueSharksSession = 0; lc.tigerSharksSession = 0; lc.greatWhiteSharksSession = 0; + lc.scarecrowsSession = 0; + lc.nightmaresSession = 0; + lc.werewolfsSession = 0; + lc.phantomFishersSession = 0; + lc.grimReapersSession = 0; cf.deleteCategory("fishing"); cf.reloadConfig(); } @@ -217,8 +222,19 @@ public class ResetLootCommand extends CommandBase { lc.shadowAssLegsSession = 0; lc.shadowAssBootsSession = 0; lc.lividDaggersSession = 0; + lc.shadowFurysSession = 0; lc.f5CoinsSpentSession = 0; lc.f5TimeSpentSession = 0; + lc.ancientRosesSession = 0; + lc.precursorEyesSession = 0; + lc.giantsSwordsSession = 0; + lc.necroLordHelmsSession = 0; + lc.necroLordChestsSession = 0; + lc.necroLordLegsSession = 0; + lc.necroLordBootsSession = 0; + lc.necroSwordsSession = 0; + lc.f6CoinsSpentSession = 0; + lc.f6TimeSpentSession = 0; cf.deleteCategory("catacombs"); cf.reloadConfig(); } diff --git a/src/main/java/me/Danker/commands/ScaleCommand.java b/src/main/java/me/Danker/commands/ScaleCommand.java index 5f21b77..76a3062 100644 --- a/src/main/java/me/Danker/commands/ScaleCommand.java +++ b/src/main/java/me/Danker/commands/ScaleCommand.java @@ -17,6 +17,7 @@ public class ScaleCommand extends CommandBase { public static double displayScale; public static double dungeonTimerScale; public static double skill50Scale; + public static double lividHpScale; @Override public String getCommandName() { @@ -25,7 +26,7 @@ public class ScaleCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <coords/display/dungeontimer/skill50> <size (0.1 - 10)>"; + return "/" + getCommandName() + " <coords/display/dungeontimer/skill50/lividhp> <size (0.1 - 10)>"; } @Override @@ -36,7 +37,7 @@ public class ScaleCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50"); + return getListOfStringsMatchingLastWord(args, "coords", "display", "dungeontimer", "skill50", "lividhp"); } return null; } @@ -72,6 +73,10 @@ public class ScaleCommand extends CommandBase { skill50Scale = scaleAmount; ConfigHandler.writeDoubleConfig("scales", "skill50Scale", skill50Scale); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Skill 50 display has been scaled to " + EnumChatFormatting.DARK_GREEN + skill50Scale + "x")); + } else if (arg1[0].equalsIgnoreCase("lividhp")) { + lividHpScale = scaleAmount; + ConfigHandler.writeDoubleConfig("scales", "lividHpScale", lividHpScale); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid HP has been scaled to " + EnumChatFormatting.DARK_GREEN + lividHpScale + "x")); } else { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 2835db6..f58777c 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -30,6 +30,13 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean expertiseLoreToggled; public static boolean skill50DisplayToggled; public static boolean outlineTextToggled; + public static boolean midasStaffMessages; + public static boolean lividSolverToggled; + // Puzzle Solvers + public static boolean threeManToggled; + public static boolean oruoToggled; + public static boolean blazeToggled; + public static boolean creeperToggled; @Override public String getCommandName() { @@ -38,7 +45,9 @@ 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/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/outlinetext/list>"; + return "/" + getCommandName() + " <gparty/coords/golden/slayercount/rngesusalerts/splitfishing/chatmaddox/spiritbearalert/" + + "aotd/lividdagger/sceptremessages/petcolors/dungeontimer/golemalerts/expertiselore/skill50display/" + + "outlinetext/midasstaffmessages/lividsolver/threemanpuzzle/oruopuzzle/blazepuzzle/creeperpuzzle/list>"; } @Override @@ -49,7 +58,12 @@ public class ToggleCommand extends CommandBase implements ICommand { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", "sceptremessages", "petcolors", "dungeontimer", "golemalerts", "expertiselore", "skill50display", "outlinetext", "list"); + return getListOfStringsMatchingLastWord(args, "gparty", "coords", "golden", "slayercount", "rngesusalerts", + "splitfishing", "chatmaddox", "spiritbearalerts", "aotd", "lividdagger", + "sceptremessages", "petcolors", "dungeontimer", "golemalerts", + "expertiselore", "skill50display", "outlinetext", "midasstaffmessages", + "lividsolver", "threemanpuzzle", "oruopuzzle", "blazepuzzle", "creeperpuzzle", + "list"); } return null; } @@ -132,6 +146,30 @@ public class ToggleCommand extends CommandBase implements ICommand { outlineTextToggled = !outlineTextToggled; cf.writeBooleanConfig("toggles", "OutlineText", outlineTextToggled); player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Outline displayed text has been set to " + EnumChatFormatting.DARK_GREEN + outlineTextToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("midasstaffmessages")) { + midasStaffMessages = !midasStaffMessages; + cf.writeBooleanConfig("toggles", "MidasStaffMessages", midasStaffMessages); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Midas Staff messages have been set to " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("lividsolver")) { + lividSolverToggled = !lividSolverToggled; + cf.writeBooleanConfig("toggles", "LividSolver", lividSolverToggled); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Livid solver has been set to " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("threemanpuzzle")) { + threeManToggled = !threeManToggled; + cf.writeBooleanConfig("toggles", "ThreeManPuzzle", threeManToggled); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Three man puzzle solver has been set to " + EnumChatFormatting.DARK_GREEN + threeManToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("oruopuzzle")) { + oruoToggled = !oruoToggled; + cf.writeBooleanConfig("toggles", "OruoPuzzle", oruoToggled); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Oruo trivia solver has been set to " + EnumChatFormatting.DARK_GREEN + oruoToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("blazepuzzle")) { + blazeToggled = !blazeToggled; + cf.writeBooleanConfig("toggles", "BlazePuzzle", blazeToggled); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Blaze puzzle solver has been set to " + EnumChatFormatting.DARK_GREEN + blazeToggled + EnumChatFormatting.GREEN + ".")); + } else if (arg1[0].equalsIgnoreCase("creeperpuzzle")) { + creeperToggled = !creeperToggled; + cf.writeBooleanConfig("creeperpuzzle", "CreeperPuzzle", creeperToggled); + player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Creeper puzzle solver has been set to " + EnumChatFormatting.DARK_GREEN + creeperToggled + EnumChatFormatting.GREEN + ".")); } else if (arg1[0].equalsIgnoreCase("list")) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.GREEN + "Guild party notifications: " + EnumChatFormatting.DARK_GREEN + gpartyToggled + "\n" + EnumChatFormatting.GREEN + " Coord/Angle display: " + EnumChatFormatting.DARK_GREEN + coordsToggled + "\n" + @@ -149,7 +187,13 @@ public class ToggleCommand extends CommandBase implements ICommand { EnumChatFormatting.GREEN + " Golem spawn alerts: " + EnumChatFormatting.DARK_GREEN + golemAlertToggled + "\n" + EnumChatFormatting.GREEN + " Expertise in lore: " + EnumChatFormatting.DARK_GREEN + expertiseLoreToggled + "\n" + EnumChatFormatting.GREEN + " Skill 50 display: " + EnumChatFormatting.DARK_GREEN + skill50DisplayToggled + "\n" + - EnumChatFormatting.GREEN + " Outline displayed text: " + EnumChatFormatting.DARK_GREEN + outlineTextToggled)); + EnumChatFormatting.GREEN + " Outline displayed text: " + EnumChatFormatting.DARK_GREEN + outlineTextToggled + "\n" + + EnumChatFormatting.GREEN + " Midas Staff messages: " + EnumChatFormatting.DARK_GREEN + midasStaffMessages + "\n" + + EnumChatFormatting.GREEN + " Livid solver: " + EnumChatFormatting.DARK_GREEN + lividSolverToggled + "\n" + + EnumChatFormatting.GREEN + " Three man puzzle solver: " + EnumChatFormatting.DARK_GREEN + threeManToggled + "\n" + + EnumChatFormatting.GREEN + " Oruo trivia solver: " + EnumChatFormatting.DARK_GREEN + oruoToggled + "\n" + + EnumChatFormatting.GREEN + " Blaze puzzle solver: " + EnumChatFormatting.DARK_GREEN + blazeToggled + "\n" + + EnumChatFormatting.GREEN + " Creeper puzzle solver: " + EnumChatFormatting.DARK_GREEN + creeperToggled)); } else { player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Usage: " + getCommandUsage(arg0))); } diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index 0ee10b9..15e0fa5 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -26,6 +26,7 @@ public class DankerGui extends GuiScreen { private GuiButton discordLink; private GuiButton changeDisplay; private GuiButton onlySlayer; + private GuiButton puzzleSolvers; // Toggles private GuiButton gparty; private GuiButton coords; @@ -44,6 +45,8 @@ public class DankerGui extends GuiScreen { private GuiButton expertiseLore; private GuiButton skill50Display; private GuiButton outlineText; + private GuiButton midasStaffMessages; + private GuiButton lividSolver; public DankerGui(int page) { this.page = page; @@ -72,50 +75,60 @@ public class DankerGui extends GuiScreen { // Page 1 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"); - outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled)); - gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); - coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); - goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled)); - slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal)); + puzzleSolvers = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Toggle Dungeons Puzzle Solvers"); + outlineText = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Outline Displayed Text: " + Utils.getColouredBoolean(ToggleCommand.outlineTextToggled)); + splitFishing = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing)); + dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); + coords = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Coordinate/Angle Display: " + Utils.getColouredBoolean(ToggleCommand.coordsToggled)); // Page 2 - aotd = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Disable AOTD Ability: " + Utils.getColouredBoolean(ToggleCommand.aotdToggled)); - lividDagger = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Disable Livid Dagger Ability: " + Utils.getColouredBoolean(ToggleCommand.lividDaggerToggled)); - sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Enable Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); - petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled)); - dungeonTimer = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Display Dungeon Timers: " + Utils.getColouredBoolean(ToggleCommand.dungeonTimerToggled)); - golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); - expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled)); + gparty = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Guild Party Notifications: " + Utils.getColouredBoolean(ToggleCommand.gpartyToggled)); + goldenEnch = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Golden T10/T6/T4 Enchantments: " + Utils.getColouredBoolean(ToggleCommand.goldenToggled)); + slayerCount = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal)); + chatMaddox = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Click Chat to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled)); + spiritBearAlert = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts)); + 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 - skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled)); + sceptreMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.1), "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages)); + midasStaffMessages = new GuiButton(0, width / 2 - 100, (int) (height * 0.2), "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages)); + petColours = new GuiButton(0, width / 2 - 100, (int) (height * 0.3), "Colour Pet Backgrounds: " + Utils.getColouredBoolean(ToggleCommand.petColoursToggled)); + golemAlerts = new GuiButton(0, width / 2 - 100, (int) (height * 0.4), "Alert When Golem Spawns: " + Utils.getColouredBoolean(ToggleCommand.golemAlertToggled)); + expertiseLore = new GuiButton(0, width / 2 - 100, (int) (height * 0.5), "Expertise Kills In Lore: " + Utils.getColouredBoolean(ToggleCommand.expertiseLoreToggled)); + skill50Display = new GuiButton(0, width / 2 - 100, (int) (height * 0.6), "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled)); + lividSolver = new GuiButton(0, width / 2 - 100, (int) (height * 0.7), "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled)); if (page == 1) { this.buttonList.add(changeDisplay); this.buttonList.add(onlySlayer); + this.buttonList.add(puzzleSolvers); this.buttonList.add(outlineText); - this.buttonList.add(gparty); + this.buttonList.add(splitFishing); + this.buttonList.add(dungeonTimer); this.buttonList.add(coords); - this.buttonList.add(goldenEnch); - this.buttonList.add(slayerCount); this.buttonList.add(nextPage); - this.buttonList.add(closeGUI); } else if (page == 2) { + this.buttonList.add(gparty); + this.buttonList.add(goldenEnch); + this.buttonList.add(slayerCount); + this.buttonList.add(chatMaddox); + this.buttonList.add(spiritBearAlert); this.buttonList.add(aotd); this.buttonList.add(lividDagger); + this.buttonList.add(nextPage); + this.buttonList.add(backPage); + } else if (page == 3) { this.buttonList.add(sceptreMessages); + this.buttonList.add(midasStaffMessages); this.buttonList.add(petColours); - this.buttonList.add(dungeonTimer); this.buttonList.add(golemAlerts); this.buttonList.add(expertiseLore); - this.buttonList.add(nextPage); - this.buttonList.add(backPage); - this.buttonList.add(closeGUI); - } else if (page == 3) { this.buttonList.add(skill50Display); + this.buttonList.add(lividSolver); this.buttonList.add(backPage); - this.buttonList.add(closeGUI); } this.buttonList.add(githubLink); this.buttonList.add(discordLink); + this.buttonList.add(closeGUI); } @Override @@ -148,6 +161,8 @@ public class DankerGui extends GuiScreen { TheMod.guiToOpen = "displaygui"; } else if (button == onlySlayer) { TheMod.guiToOpen = "onlyslayergui"; + } else if (button == puzzleSolvers) { + TheMod.guiToOpen = "puzzlesolvers"; } else if (button == outlineText) { ToggleCommand.outlineTextToggled = !ToggleCommand.outlineTextToggled; ConfigHandler.writeBooleanConfig("toggles", "OutlineText", ToggleCommand.outlineTextToggled); @@ -179,7 +194,7 @@ public class DankerGui extends GuiScreen { } else if (button == sceptreMessages) { ToggleCommand.sceptreMessages = !ToggleCommand.sceptreMessages; ConfigHandler.writeBooleanConfig("toggles", "SceptreMessages", ToggleCommand.sceptreMessages); - sceptreMessages.displayString = "Enable Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages); + sceptreMessages.displayString = "Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages); } else if (button == petColours) { ToggleCommand.petColoursToggled = !ToggleCommand.petColoursToggled; ConfigHandler.writeBooleanConfig("toggles", "PetColors", ToggleCommand.petColoursToggled); @@ -200,6 +215,26 @@ public class DankerGui extends GuiScreen { ToggleCommand.skill50DisplayToggled = !ToggleCommand.skill50DisplayToggled; ConfigHandler.writeBooleanConfig("toggles", "Skill50Display", ToggleCommand.skill50DisplayToggled); skill50Display.displayString = "Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled); + } else if (button == splitFishing) { + ToggleCommand.splitFishing = !ToggleCommand.splitFishing; + ConfigHandler.writeBooleanConfig("toggles", "SplitFishing", ToggleCommand.splitFishing); + splitFishing.displayString = "Split Fishing Display: " + Utils.getColouredBoolean(ToggleCommand.splitFishing); + } else if (button == chatMaddox) { + ToggleCommand.chatMaddoxToggled = !ToggleCommand.chatMaddoxToggled; + ConfigHandler.writeBooleanConfig("toggles", "ChatMaddox", ToggleCommand.chatMaddoxToggled); + chatMaddox.displayString = "Click Chat to Open Maddox: " + Utils.getColouredBoolean(ToggleCommand.chatMaddoxToggled); + } else if (button == spiritBearAlert) { + ToggleCommand.spiritBearAlerts = !ToggleCommand.spiritBearAlerts; + ConfigHandler.writeBooleanConfig("toggles", "SpiritBearAlerts", ToggleCommand.spiritBearAlerts); + spiritBearAlert.displayString = "Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts); + } else if (button == midasStaffMessages) { + ToggleCommand.midasStaffMessages = !ToggleCommand.midasStaffMessages; + ConfigHandler.writeBooleanConfig("toggles", "MidasStaffMessages", ToggleCommand.midasStaffMessages); + midasStaffMessages.displayString = "Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages); + } else if (button == lividSolver) { + ToggleCommand.lividSolverToggled = !ToggleCommand.lividSolverToggled; + ConfigHandler.writeBooleanConfig("toggles", "LividSolver", ToggleCommand.lividSolverToggled); + lividSolver.displayString = "Find Correct Livid: " + Utils.getColouredBoolean(ToggleCommand.lividSolverToggled); } } diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java index 243bedb..9f00ed3 100644 --- a/src/main/java/me/Danker/gui/DisplayGui.java +++ b/src/main/java/me/Danker/gui/DisplayGui.java @@ -25,6 +25,7 @@ public class DisplayGui extends GuiScreen { private GuiButton fishing; private GuiButton fishingWinter; private GuiButton fishingFestival; + private GuiButton spookyFishing; private GuiButton catacombsF1; private GuiButton catacombsF2; private GuiButton catacombsF3; @@ -53,9 +54,10 @@ public class DisplayGui extends GuiScreen { zombie = new GuiButton(0, width / 2 - 190, (int) (height * 0.3), 110, 20, "Zombie"); spider = new GuiButton(0, width / 2 - 55, (int) (height * 0.3), 110, 20, "Spider"); wolf = new GuiButton(0, width / 2 + 75, (int) (height * 0.3), 110, 20, "Wolf"); - fishing = new GuiButton(0, width / 2 - 190, (int) (height * 0.4), 110, 20, "Fishing"); - fishingWinter = new GuiButton(0, width / 2 - 55, (int) (height * 0.4), 110, 20, "Fishing Winter"); - fishingFestival = new GuiButton(0, width / 2 + 75, (int) (height * 0.4), 110, 20, "Fishing Festival"); + fishing = new GuiButton(0, width / 2 - 230, (int) (height * 0.4), 100, 20, "Fishing"); + fishingWinter = new GuiButton(0, width / 2 - 110, (int) (height * 0.4), 100, 20, "Fishing Winter"); + fishingFestival = new GuiButton(0, width / 2 + 10, (int) (height * 0.4), 100, 20, "Fishing Festival"); + spookyFishing = new GuiButton(0, width / 2 + 130, (int) (height * 0.4), 100, 20, "Spooky Fishing"); catacombsF1 = new GuiButton(0, width / 2 - 145, (int) (height * 0.55), 50, 20, "F1"); catacombsF2 = new GuiButton(0, width / 2 - 85, (int) (height * 0.55), 50, 20, "F2"); catacombsF3 = new GuiButton(0, width / 2 - 25, (int) (height * 0.55), 50, 20, "F3"); @@ -72,6 +74,7 @@ public class DisplayGui extends GuiScreen { this.buttonList.add(fishing); this.buttonList.add(fishingWinter); this.buttonList.add(fishingFestival); + this.buttonList.add(spookyFishing); this.buttonList.add(catacombsF1); this.buttonList.add(catacombsF2); this.buttonList.add(catacombsF3); @@ -129,6 +132,8 @@ public class DisplayGui extends GuiScreen { setDisplay("fishing_winter", false); } else if (button == fishingFestival) { setDisplay("fishing_festival", false); + } else if (button == spookyFishing) { + setDisplay("spooky_fishing", false); } else if (button == catacombsF1) { setDisplay("catacombs_floor_one", false); } else if (button == catacombsF2) { diff --git a/src/main/java/me/Danker/gui/EditLocationsGui.java b/src/main/java/me/Danker/gui/EditLocationsGui.java index 8fbc4cb..f8b6712 100644 --- a/src/main/java/me/Danker/gui/EditLocationsGui.java +++ b/src/main/java/me/Danker/gui/EditLocationsGui.java @@ -19,6 +19,7 @@ public class EditLocationsGui extends GuiScreen { private LocationButton dungeonTimer; private LocationButton coords; private LocationButton skill50; + private LocationButton lividHP; @Override public boolean doesGuiPauseGame() { @@ -72,9 +73,11 @@ public class EditLocationsGui extends GuiScreen { dungeonTimer = new LocationButton(0, moc.dungeonTimerXY[0], moc.dungeonTimerXY[1], 113 * sc.dungeonTimerScale, 57 * sc.dungeonTimerScale, sc.dungeonTimerScale, dungeonTimerText, dungeonTimerNums, 80); coords = new LocationButton(0, moc.coordsXY[0], moc.coordsXY[1], 141 * sc.coordsScale, 12 * sc.coordsScale, sc.coordsScale, "74 / 14 / -26 (141.1 / 6.7)", null, null); skill50 = new LocationButton(0, moc.skill50XY[0], moc.skill50XY[1], 233 * sc.skill50Scale, 12 * sc.skill50Scale, sc.skill50Scale, EnumChatFormatting.AQUA + "+3.5 Farming (28,882,117.7/55,172,425) 52.34%", null, null); + lividHP = new LocationButton(0, moc.lividHpXY[0], moc.lividHpXY[1], 85 * sc.lividHpScale, 12 * sc.lividHpScale, sc.lividHpScale, EnumChatFormatting.WHITE + "﴾ Livid " + EnumChatFormatting.YELLOW + "6.9M" + EnumChatFormatting.RED + "❤ " + EnumChatFormatting.WHITE + "﴿", null, null); this.buttonList.add(coords); this.buttonList.add(dungeonTimer); + this.buttonList.add(lividHP); this.buttonList.add(display); this.buttonList.add(skill50); } @@ -111,6 +114,11 @@ public class EditLocationsGui extends GuiScreen { 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]; } this.buttonList.clear(); initGui(); @@ -131,6 +139,8 @@ public class EditLocationsGui extends GuiScreen { moving = "coords"; } else if (button == skill50) { moving = "skill50"; + } else if (button == lividHP) { + moving = "lividHP"; } } } @@ -147,6 +157,8 @@ public class EditLocationsGui extends GuiScreen { ConfigHandler.writeIntConfig("locations", "dungeonTimerY", MoveCommand.dungeonTimerXY[1]); ConfigHandler.writeIntConfig("locations", "skill50X", MoveCommand.skill50XY[0]); ConfigHandler.writeIntConfig("locations", "skill50Y", MoveCommand.skill50XY[1]); + ConfigHandler.writeIntConfig("locations", "lividHpX", MoveCommand.lividHpXY[0]); + ConfigHandler.writeIntConfig("locations", "lividHpY", MoveCommand.lividHpXY[1]); } } diff --git a/src/main/java/me/Danker/gui/PuzzleSolversGui.java b/src/main/java/me/Danker/gui/PuzzleSolversGui.java new file mode 100644 index 0000000..e2fa4ef --- /dev/null +++ b/src/main/java/me/Danker/gui/PuzzleSolversGui.java @@ -0,0 +1,75 @@ +package me.Danker.gui; + +import me.Danker.TheMod; +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 PuzzleSolversGui extends GuiScreen { + + private GuiButton goBack; + private GuiButton riddle; + private GuiButton trivia; + private GuiButton blaze; + private GuiButton creeper; + + @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"); + 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)); + + this.buttonList.add(goBack); + this.buttonList.add(riddle); + this.buttonList.add(trivia); + this.buttonList.add(blaze); + this.buttonList.add(creeper); + } + + @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) { + TheMod.guiToOpen = "dankergui1"; + } else if (button == riddle) { + ToggleCommand.threeManToggled = !ToggleCommand.threeManToggled; + ConfigHandler.writeBooleanConfig("toggles", "ThreeManPuzzle", ToggleCommand.threeManToggled); + riddle.displayString = "Riddle Solver: " + Utils.getColouredBoolean(ToggleCommand.threeManToggled); + } else if (button == trivia) { + ToggleCommand.oruoToggled = !ToggleCommand.oruoToggled; + ConfigHandler.writeBooleanConfig("toggles", "OruoPuzzle", ToggleCommand.oruoToggled); + trivia.displayString = "Trivia Solver: " + Utils.getColouredBoolean(ToggleCommand.oruoToggled); + } else if (button == blaze) { + ToggleCommand.blazeToggled = !ToggleCommand.blazeToggled; + ConfigHandler.writeBooleanConfig("toggles", "BlazePuzzle", ToggleCommand.blazeToggled); + blaze.displayString = "Blaze Solver: " + Utils.getColouredBoolean(ToggleCommand.blazeToggled); + } else if (button == creeper) { + ToggleCommand.creeperToggled = !ToggleCommand.creeperToggled; + ConfigHandler.writeBooleanConfig("toggles", "CreeperPuzzle", ToggleCommand.creeperToggled); + creeper.displayString = "Creeper Solver: " + Utils.getColouredBoolean(ToggleCommand.creeperToggled); + } + } + +} diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index b903cd3..2b6c0f7 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -2,6 +2,7 @@ package me.Danker.handlers; import java.io.File; +import me.Danker.TheMod; import me.Danker.commands.BlockSlayerCommand; import me.Danker.commands.DisplayCommand; import me.Danker.commands.LootCommand; @@ -188,6 +189,13 @@ public class ConfigHandler { 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", "MidasStaffMessages")) writeBooleanConfig("toggles", "MidasStaffMessages", true); + if (!hasKey("toggles", "LividSolver")) writeBooleanConfig("toggles", "LividSolver", false); + // Puzzle Solvers + 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", "CreeperPuzzle")) writeBooleanConfig("toggles", "CreeperPuzzle", false); if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); @@ -265,6 +273,12 @@ public class ConfigHandler { if (!hasKey("fishing", "blueShark")) writeIntConfig("fishing", "blueShark", 0); if (!hasKey("fishing", "tigerShark")) writeIntConfig("fishing", "tigerShark", 0); if (!hasKey("fishing", "greatWhiteShark")) writeIntConfig("fishing", "greatWhiteShark", 0); + // Spooky Fishing + if (!hasKey("fishing", "scarecrow")) writeIntConfig("fishing", "scarecrow", 0); + if (!hasKey("fishing", "nightmare")) writeIntConfig("fishing", "nightmare", 0); + if (!hasKey("fishing", "werewolf")) writeIntConfig("fishing", "werewolf", 0); + if (!hasKey("fishing", "phantomFisher")) writeIntConfig("fishing", "phantomFisher", 0); + if (!hasKey("fishing", "grimReaper")) writeIntConfig("fishing", "grimReaper", 0); // Dungeons if (!hasKey("catacombs", "recombobulator")) writeIntConfig("catacombs", "recombobulator", 0); @@ -319,6 +333,7 @@ public class ConfigHandler { if (!hasKey("misc", "display")) writeStringConfig("misc", "display", "off"); if (!hasKey("misc", "autoDisplay")) writeBooleanConfig("misc", "autoDisplay", false); + if (!hasKey("misc", "skill50Time")) writeIntConfig("misc", "skill50Time", 3); ScaledResolution scaled = new ScaledResolution(Minecraft.getMinecraft()); int height = scaled.getScaledHeight(); @@ -330,10 +345,13 @@ public class ConfigHandler { if (!hasKey("locations", "dungeonTimerY")) writeIntConfig("locations", "dungeonTimerY", 5); if (!hasKey("locations", "skill50X")) writeIntConfig("locations", "skill50X", 40); if (!hasKey("locations", "skill50Y")) writeIntConfig("locations", "skill50Y", 10); + if (!hasKey("locations", "lividHpX")) writeIntConfig("locations", "lividHpX", 40); + if (!hasKey("locations", "lividHpY")) writeIntConfig("locations", "lividHpY", 20); if (!hasKey("scales", "coordsScale")) writeDoubleConfig("scales", "coordsScale", 1); if (!hasKey("scales", "displayScale")) writeDoubleConfig("scales", "displayScale", 1); if (!hasKey("scales", "dungeonTimerScale")) writeDoubleConfig("scales", "dungeonTimerScale", 1); if (!hasKey("scales", "skill50Scale")) writeDoubleConfig("scales", "skill50Scale", 1); + if (!hasKey("scales", "lividHpScale")) writeDoubleConfig("scales", "lividHpScale", 1); final ToggleCommand tf = new ToggleCommand(); tf.gpartyToggled = getBoolean("toggles", "GParty"); @@ -353,6 +371,13 @@ public class ConfigHandler { tf.expertiseLoreToggled = getBoolean("toggles", "ExpertiseLore"); tf.skill50DisplayToggled = getBoolean("toggles", "Skill50Display"); tf.outlineTextToggled = getBoolean("toggles", "OutlineText"); + tf.midasStaffMessages = getBoolean("toggles", "MidasStaffMessages"); + tf.lividSolverToggled = getBoolean("toggles", "LividSolver"); + // Puzzle Solvers + tf.threeManToggled = getBoolean("toggles", "ThreeManPuzzle"); + tf.oruoToggled = getBoolean("toggles", "OruoPuzzle"); + tf.blazeToggled = getBoolean("toggles", "BlazePuzzle"); + tf.creeperToggled = getBoolean("toggles", "CreeperPuzzle"); final BlockSlayerCommand bs = new BlockSlayerCommand(); String onlySlayer = getString("toggles", "BlockSlayer"); @@ -436,6 +461,12 @@ public class ConfigHandler { lc.blueSharks = getInt("fishing", "blueShark"); lc.tigerSharks = getInt("fishing", "tigerShark"); lc.greatWhiteSharks = getInt("fishing", "greatWhiteShark"); + // Spooky Fishing + lc.scarecrows = getInt("fishing", "scarecrow"); + lc.nightmares = getInt("fishing", "nightmare"); + lc.werewolfs = getInt("fishing", "nightmare"); + lc.phantomFishers = getInt("fishing", "phantomFisher"); + lc.grimReapers = getInt("fishing", "grimReaper"); // Dungeons lc.recombobulators = getInt("catacombs", "recombobulator"); @@ -491,6 +522,7 @@ public class ConfigHandler { final DisplayCommand ds = new DisplayCommand(); ds.display = getString("misc", "display"); ds.auto = getBoolean("misc", "autoDisplay"); + TheMod.SKILL_TIME = getInt("misc", "skill50Time") * 20; final MoveCommand moc = new MoveCommand(); moc.coordsXY[0] = getInt("locations", "coordsX"); @@ -501,12 +533,15 @@ public class ConfigHandler { moc.dungeonTimerXY[1] = getInt("locations", "dungeonTimerY"); moc.skill50XY[0] = getInt("locations", "skill50X"); moc.skill50XY[1] = getInt("locations", "skill50Y"); + moc.lividHpXY[0] = getInt("locations", "lividHpX"); + moc.lividHpXY[1] = getInt("locations", "lividHpY"); final ScaleCommand sc = new ScaleCommand(); sc.coordsScale = getDouble("scales", "coordsScale"); sc.displayScale = getDouble("scales", "displayScale"); sc.dungeonTimerScale = getDouble("scales", "dungeonTimerScale"); sc.skill50Scale = getDouble("scales", "skill50Scale"); + sc.lividHpScale = getDouble("scales", "lividHpScale"); } } diff --git a/src/main/java/me/Danker/handlers/PacketHandler.java b/src/main/java/me/Danker/handlers/PacketHandler.java index 56bbc24..ed1c8b0 100644 --- a/src/main/java/me/Danker/handlers/PacketHandler.java +++ b/src/main/java/me/Danker/handlers/PacketHandler.java @@ -10,8 +10,6 @@ import net.minecraft.network.Packet; import net.minecraft.network.play.server.S04PacketEntityEquipment; public class PacketHandler extends ChannelDuplexHandler { - - public static boolean added = false; @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index ba01071..928e02f 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -1,5 +1,6 @@ package me.Danker.utils; +import java.awt.Color; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -10,20 +11,31 @@ import org.lwjgl.opengl.GL11; import me.Danker.TheMod; import me.Danker.handlers.ScoreboardHandler; import me.Danker.handlers.TextRenderer; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.network.NetworkPlayerInfo; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.scoreboard.ScoreObjective; import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StringUtils; +import net.minecraft.util.Vec3; public class Utils { public static boolean inSkyblock = false; + public static boolean inDungeons = false; static int[] skillXPPerLevel = {0, 50, 125, 200, 300, 500, 750, 1000, 1500, 2000, 3500, 5000, 7500, 10000, 15000, 20000, 30000, 50000, 75000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1100000, 1200000, 1300000, 1400000, 1500000, 1600000, 1700000, 1800000, 1900000, 2000000, 2100000, 2200000, @@ -118,6 +130,21 @@ public class Utils { } inSkyblock = false; } + + public static void checkForDungeons() { + Minecraft mc = Minecraft.getMinecraft(); + if (inSkyblock) { + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("The Catacombs")) { + inDungeons = true; + return; + } + } + } + inDungeons = false; + } public static String capitalizeString(String string) { String[] words = string.split("_"); @@ -228,4 +255,150 @@ public class Utils { return bool ? EnumChatFormatting.GREEN + "On" : EnumChatFormatting.RED + "Off"; } + public static void draw3DLine(Vec3 pos1, Vec3 pos2, int colourInt, float partialTicks) { + Entity render = Minecraft.getMinecraft().getRenderViewEntity(); + WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer(); + Color colour = new Color(colourInt); + + double realX = render.lastTickPosX + (render.posX - render.lastTickPosX) * partialTicks; + double realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks; + double realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks; + + GlStateManager.pushMatrix(); + GlStateManager.translate(-realX, -realY, -realZ); + GlStateManager.disableTexture2D(); + GlStateManager.enableBlend(); + GlStateManager.disableAlpha(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GL11.glLineWidth(2); + GlStateManager.color(colour.getRed() / 255f, colour.getGreen() / 255f, colour.getBlue()/ 255f, colour.getAlpha() / 255f); + worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION); + + worldRenderer.pos(pos1.xCoord, pos1.yCoord, pos1.zCoord).endVertex(); + worldRenderer.pos(pos2.xCoord, pos2.yCoord, pos2.zCoord).endVertex(); + Tessellator.getInstance().draw(); + + GlStateManager.translate(realX, realY, realZ); + GlStateManager.disableBlend(); + GlStateManager.enableAlpha(); + GlStateManager.enableTexture2D(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.popMatrix(); + } + + public static void draw3DString(BlockPos pos, String text, int colour, float partialTicks) { + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayer player = mc.thePlayer; + double x = (pos.getX() - player.lastTickPosX) + ((pos.getX() - player.posX) - (pos.getX() - player.lastTickPosX)) * partialTicks; + double y = (pos.getY() - player.lastTickPosY) + ((pos.getY() - player.posY) - (pos.getY() - player.lastTickPosY)) * partialTicks; + double z = (pos.getZ() - player.lastTickPosZ) + ((pos.getZ() - player.posZ) - (pos.getZ() - player.lastTickPosZ)) * partialTicks; + RenderManager renderManager = mc.getRenderManager(); + + float f = 1.6F; + float f1 = 0.016666668F * f; + int width = mc.fontRendererObj.getStringWidth(text) / 2; + GlStateManager.pushMatrix(); + GlStateManager.translate(x, y, z); + GL11.glNormal3f(0f, 1f, 0f); + GlStateManager.rotate(-renderManager.playerViewY, 0f, 1f, 0f); + GlStateManager.rotate(renderManager.playerViewX, 1f, 0f, 0f); + GlStateManager.scale(-f1, -f1, -f1); + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + mc.fontRendererObj.drawString(text, -width, 0, colour); + GlStateManager.disableBlend(); + GlStateManager.popMatrix(); + } + + // Yoinked from ForgeHax + public static void draw3DBox(AxisAlignedBB aabb, int r, int g, int b, int a, float partialTicks) { + Entity render = Minecraft.getMinecraft().getRenderViewEntity(); + WorldRenderer worldRenderer = Tessellator.getInstance().getWorldRenderer(); + + double realX = render.lastTickPosX + (render.posX - render.lastTickPosX) * partialTicks; + double realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks; + double realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks; + + GlStateManager.pushMatrix(); + GlStateManager.translate(-realX, -realY, -realZ); + GlStateManager.disableTexture2D(); + GlStateManager.enableBlend(); + GlStateManager.disableAlpha(); + GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0); + GL11.glLineWidth(2); + GlStateManager.color(r / 255f, g / 255f, b / 255f, a / 255f); + worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION); + + worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex(); + Tessellator.getInstance().draw(); + worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex(); + Tessellator.getInstance().draw(); + worldRenderer.begin(GL11.GL_LINE_STRIP, DefaultVertexFormats.POSITION); + worldRenderer.pos(aabb.minX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.minZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.maxX, aabb.maxY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.minY, aabb.maxZ).endVertex(); + worldRenderer.pos(aabb.minX, aabb.maxY, aabb.maxZ).endVertex(); + Tessellator.getInstance().draw(); + + GlStateManager.translate(realX, realY, realZ); + GlStateManager.disableBlend(); + GlStateManager.enableAlpha(); + GlStateManager.enableTexture2D(); + GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); + GlStateManager.popMatrix(); + } + + public static BlockPos getFirstBlockPosAfterVectors(Minecraft mc, Vec3 pos1, Vec3 pos2, int strength, int distance) { + double x = pos2.xCoord - pos1.xCoord; + double y = pos2.yCoord - pos1.yCoord; + double z = pos2.zCoord - pos1.zCoord; + + for (int i = strength; i < distance * strength; i++) { // Start at least 1 strength away + double newX = pos1.xCoord + ((x / strength) * i); + double newY = pos1.yCoord + ((y / strength) * i); + double newZ = pos1.zCoord + ((z / strength) * i); + + BlockPos newBlock = new BlockPos(newX, newY, newZ); + if (mc.theWorld.getBlockState(newBlock).getBlock() != Blocks.air) { + return newBlock; + } + } + + return null; + } + + public static BlockPos getNearbyBlock(Minecraft mc, BlockPos pos, Block... blockTypes) { + if (pos == null) return null; + BlockPos pos1 = new BlockPos(pos.getX() - 2, pos.getY() - 3, pos.getZ() - 2); + BlockPos pos2 = new BlockPos(pos.getX() + 2, pos.getY() + 3, pos.getZ() + 2); + + BlockPos closestBlock = null; + double closestBlockDistance = 99; + Iterable<BlockPos> blocks = BlockPos.getAllInBox(pos1, pos2); + + for (BlockPos block : blocks) { + for (Block blockType : blockTypes) { + if (mc.theWorld.getBlockState(block).getBlock() == blockType && block.distanceSq(pos) < closestBlockDistance) { + closestBlock = block; + closestBlockDistance = block.distanceSq(pos); + } + } + } + + return closestBlock; + } + } |