diff options
author | bowser0000 <bowser0000@gmail.com> | 2022-04-22 00:32:25 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2022-04-22 00:32:25 -0400 |
commit | 0aef9021be5143adb5be5e624675d79868aa9738 (patch) | |
tree | 042828f06e7338b2c3ff9531df98ed61808ffad3 /src/main/java/me/Danker | |
parent | 3ea4a9b5d7d686a9f4eb1d699b2c8c6f6432e60f (diff) | |
download | SkyblockMod-0aef9021be5143adb5be5e624675d79868aa9738.tar.gz SkyblockMod-0aef9021be5143adb5be5e624675d79868aa9738.tar.bz2 SkyblockMod-0aef9021be5143adb5be5e624675d79868aa9738.zip |
Add lava fishing tracker
Diffstat (limited to 'src/main/java/me/Danker')
9 files changed, 347 insertions, 238 deletions
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 174258d..21ada93 100644 --- a/src/main/java/me/Danker/commands/DisplayCommand.java +++ b/src/main/java/me/Danker/commands/DisplayCommand.java @@ -21,7 +21,7 @@ public class DisplayCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/ch/session/f(1-7)/mm]"; + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/ch/lava/session/f(1-7)/mm]"; } public static String usage(ICommandSender arg0) { @@ -38,7 +38,7 @@ public class DisplayCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "enderman", "blaze", "fishing", "catacombs", "mythological", "ghost", "auto", "off"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { - return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "ch", "session"); + return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "ch", "lava", "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", "f7", "floor7", "mm", "master"); } else if (args.length > 1) { @@ -56,10 +56,8 @@ public class DisplayCommand extends CommandBase { return; } - boolean showSession = false; - - if (arg1[arg1.length - 1].equalsIgnoreCase("session")) showSession = true; - + boolean showSession = arg1[arg1.length - 1].equalsIgnoreCase("session"); + switch (arg1[0].toLowerCase()) { case "wolf": if (showSession) { @@ -122,9 +120,16 @@ public class DisplayCommand extends CommandBase { break; case "ch": if (showSession) { + LootDisplay.display = "fishing_ch_session"; + } else { LootDisplay.display = "fishing_ch"; + } + break; + case "lava": + if (showSession) { + LootDisplay.display = "fishing_lava_session"; } else { - LootDisplay.display = "fishing_ch_session"; + LootDisplay.display = "fishing_lava"; } break; default: @@ -230,7 +235,7 @@ public class DisplayCommand extends CommandBase { } else { LootDisplay.display = "ghost"; } - + break; case "auto": LootDisplay.auto = true; player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Display set to " + DankersSkyblockMod.SECONDARY_COLOUR + "auto" + DankersSkyblockMod.MAIN_COLOUR + ".")); diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java index bdd3281..f51e01f 100644 --- a/src/main/java/me/Danker/commands/ImportFishingCommand.java +++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java @@ -77,221 +77,50 @@ public class ImportFishingCommand extends CommandBase { } FishingTracker.seaCreatures = 0; - FishingTracker.squids = 0; - if (statsObject.has("kills_pond_squid")) { - FishingTracker.squids = statsObject.get("kills_pond_squid").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.squids; - - FishingTracker.seaWalkers = 0; - if (statsObject.has("kills_sea_walker")) { - FishingTracker.seaWalkers = statsObject.get("kills_sea_walker").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.seaWalkers; - - FishingTracker.nightSquids = 0; - if (statsObject.has("kills_night_squid")) { - FishingTracker.nightSquids = statsObject.get("kills_night_squid").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.nightSquids; - - FishingTracker.seaGuardians = 0; - if (statsObject.has("kills_sea_guardian")) { - FishingTracker.seaGuardians = statsObject.get("kills_sea_guardian").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.seaGuardians; - - FishingTracker.seaWitches = 0; - if (statsObject.has("kills_sea_witch")) { - FishingTracker.seaWitches = statsObject.get("kills_sea_witch").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.seaWitches; - - FishingTracker.seaArchers = 0; - if (statsObject.has("kills_sea_archer")) { - FishingTracker.seaArchers = statsObject.get("kills_sea_archer").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.seaArchers; - - FishingTracker.monsterOfTheDeeps = 0; - if (statsObject.has("kills_zombie_deep")) { - if (statsObject.has("kills_chicken_deep")) { - FishingTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt() + statsObject.get("kills_chicken_deep").getAsInt(); - } else { - FishingTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt(); - } - } else if (statsObject.has("kills_chicken_deep")) { - FishingTracker.monsterOfTheDeeps = statsObject.get("kills_chicken_deep").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.monsterOfTheDeeps; - - FishingTracker.catfishes = 0; - if (statsObject.has("kills_catfish")) { - FishingTracker.catfishes = statsObject.get("kills_catfish").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.catfishes; - - FishingTracker.carrotKings = 0; - if (statsObject.has("kills_carrot_king")) { - FishingTracker.carrotKings = statsObject.get("kills_carrot_king").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.carrotKings; - - FishingTracker.seaLeeches = 0; - if (statsObject.has("kills_sea_leech")) { - FishingTracker.seaLeeches = statsObject.get("kills_sea_leech").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.seaLeeches; - - FishingTracker.guardianDefenders = 0; - if (statsObject.has("kills_guardian_defender")) { - FishingTracker.guardianDefenders = statsObject.get("kills_guardian_defender").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.guardianDefenders; - - FishingTracker.deepSeaProtectors = 0; - if (statsObject.has("kills_deep_sea_protector")) { - FishingTracker.deepSeaProtectors = statsObject.get("kills_deep_sea_protector").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.deepSeaProtectors; - - FishingTracker.hydras = 0; - if (statsObject.has("kills_water_hydra")) { - // Hydra splits - FishingTracker.hydras = statsObject.get("kills_water_hydra").getAsInt() / 2; - } - FishingTracker.seaCreatures += FishingTracker.hydras; - - FishingTracker.seaEmperors = 0; - if (statsObject.has("kills_skeleton_emperor")) { - if (statsObject.has("kills_guardian_emperor")) { - FishingTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt() + statsObject.get("kills_guardian_emperor").getAsInt(); - } else { - FishingTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt(); - } - } else if (statsObject.has("kills_guardian_emperor")) { - FishingTracker.seaEmperors = statsObject.get("kills_guardian_emperor").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.seaEmperors; - - FishingTracker.fishingMilestone = 0; - if (statsObject.has("pet_milestone_sea_creatures_killed")) { - FishingTracker.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt(); - } - - FishingTracker.frozenSteves = 0; - if (statsObject.has("kills_frozen_steve")) { - FishingTracker.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.frozenSteves; - - FishingTracker.frostyTheSnowmans = 0; - if (statsObject.has("kills_frosty_the_snowman")) { - FishingTracker.frostyTheSnowmans = statsObject.get("kills_frosty_the_snowman").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.frostyTheSnowmans; - - FishingTracker.grinches = 0; - if (statsObject.has("kills_grinch")) { - FishingTracker.grinches = statsObject.get("kills_grinch").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.grinches; - - FishingTracker.yetis = 0; - if (statsObject.has("kills_yeti")) { - FishingTracker.yetis = statsObject.get("kills_yeti").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.yetis; - - FishingTracker.nurseSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - FishingTracker.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.nurseSharks; - - FishingTracker.blueSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - FishingTracker.blueSharks = statsObject.get("kills_blue_shark").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.blueSharks; - - FishingTracker.tigerSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - FishingTracker.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.tigerSharks; - - FishingTracker.greatWhiteSharks = 0; - if (statsObject.has("kills_nurse_shark")) { - FishingTracker.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.greatWhiteSharks; - - FishingTracker.scarecrows = 0; - if (statsObject.has("kills_scarecrow")) { - FishingTracker.scarecrows = statsObject.get("kills_scarecrow").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.scarecrows; - - FishingTracker.nightmares = 0; - if (statsObject.has("kills_nightmare")) { - FishingTracker.nightmares = statsObject.get("kills_nightmare").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.nightmares; - - FishingTracker.werewolfs = 0; - if (statsObject.has("kills_werewolf")) { - FishingTracker.werewolfs = statsObject.get("kills_werewolf").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.werewolfs; - - FishingTracker.phantomFishers = 0; - if (statsObject.has("kills_phantom_fisherman")) { - FishingTracker.phantomFishers = statsObject.get("kills_phantom_fisherman").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.phantomFishers; - - FishingTracker.grimReapers = 0; - if (statsObject.has("kills_grim_reaper")) { - FishingTracker.grimReapers = statsObject.get("kills_grim_reaper").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.grimReapers; - - FishingTracker.waterWorms = 0; - if (statsObject.has("kills_water_worm")) { - FishingTracker.waterWorms = statsObject.get("kills_water_worm").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.waterWorms; - - FishingTracker.poisonedWaterWorms = 0; - if (statsObject.has("kills_poisoned_water_worm")) { - FishingTracker.poisonedWaterWorms = statsObject.get("kills_poisoned_water_worm").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.poisonedWaterWorms; - FishingTracker.flamingWorms = 0; - if (statsObject.has("kills_flaming_worm")) { - FishingTracker.flamingWorms = statsObject.get("kills_flaming_worm").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.flamingWorms; - - FishingTracker.lavaBlazes = 0; - if (statsObject.has("kills_lava_blaze")) { - FishingTracker.lavaBlazes = statsObject.get("kills_lava_blaze").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.lavaBlazes; - - FishingTracker.lavaPigmen = 0; - if (statsObject.has("kills_lava_pigman")) { - FishingTracker.lavaPigmen = statsObject.get("kills_lava_pigman").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.lavaPigmen; - - FishingTracker.zombieMiners = 0; - if (statsObject.has("kills_zombie_miner")) { - FishingTracker.zombieMiners = statsObject.get("kills_zombie_miner").getAsInt(); - } - FishingTracker.seaCreatures += FishingTracker.zombieMiners; + FishingTracker.squids = getSCFromApi(statsObject, "kills_pond_squid"); + FishingTracker.seaWalkers = getSCFromApi(statsObject, "kills_sea_walker"); + FishingTracker.nightSquids = getSCFromApi(statsObject, "kills_night_squid"); + FishingTracker.seaGuardians = getSCFromApi(statsObject, "kills_sea_guardian"); + FishingTracker.seaWitches = getSCFromApi(statsObject, "kills_sea_witch"); + FishingTracker.seaArchers = getSCFromApi(statsObject, "kills_sea_archer"); + FishingTracker.monsterOfTheDeeps = getSCFromApi(statsObject, "kills_zombie_deep") + getSCFromApi(statsObject, "kills_chicken_deep"); + FishingTracker.catfishes = getSCFromApi(statsObject, "kills_catfish"); + FishingTracker.carrotKings = getSCFromApi(statsObject, "kills_carrot_king"); + FishingTracker.seaLeeches = getSCFromApi(statsObject, "kills_sea_leech"); + FishingTracker.guardianDefenders = getSCFromApi(statsObject, "kills_guardian_defender"); + FishingTracker.deepSeaProtectors = getSCFromApi(statsObject, "kills_deep_sea_protector"); + FishingTracker.hydras = getSCFromApi(statsObject, "kills_water_hydra") / 2; + FishingTracker.seaEmperors = getSCFromApi(statsObject, "kills_skeleton_emperor") + getSCFromApi(statsObject, "kills_guardian_emperor"); + FishingTracker.fishingMilestone = getSCFromApi(statsObject, "pet_milestone_sea_creatures_killed"); + FishingTracker.frozenSteves = getSCFromApi(statsObject, "kills_frozen_steve"); + FishingTracker.frostyTheSnowmans = getSCFromApi(statsObject, "kills_frosty_the_snowman"); + FishingTracker.grinches = getSCFromApi(statsObject, "kills_grinch"); + FishingTracker.yetis = getSCFromApi(statsObject, "kills_yeti"); + FishingTracker.nurseSharks = getSCFromApi(statsObject, "kills_nurse_shark"); + FishingTracker.blueSharks = getSCFromApi(statsObject, "kills_blue_shark"); + FishingTracker.tigerSharks = getSCFromApi(statsObject, "kills_tiger_shark"); + FishingTracker.greatWhiteSharks = getSCFromApi(statsObject, "kills_great_white_shark"); + FishingTracker.scarecrows = getSCFromApi(statsObject, "kills_scarecrow"); + FishingTracker.nightmares = getSCFromApi(statsObject, "kills_nightmare"); + FishingTracker.werewolfs = getSCFromApi(statsObject, "kills_werewolf"); + FishingTracker.phantomFishers = getSCFromApi(statsObject, "kills_phantom_fisherman"); + FishingTracker.grimReapers = getSCFromApi(statsObject, "kills_grim_reaper"); + FishingTracker.waterWorms = getSCFromApi(statsObject, "kills_water_worm"); + FishingTracker.poisonedWaterWorms = getSCFromApi(statsObject, "kills_poisoned_water_worm"); + FishingTracker.flamingWorms = getSCFromApi(statsObject, "kills_flaming_worm"); + FishingTracker.lavaBlazes = getSCFromApi(statsObject, "kills_lava_blaze"); + FishingTracker.lavaPigmen = getSCFromApi(statsObject, "kills_lava_pigman"); + FishingTracker.zombieMiners = getSCFromApi(statsObject, "kills_zombie_miner"); + FishingTracker.magmaSlugs = getSCFromApi(statsObject, "kills_magma_slug"); + FishingTracker.moogmas = getSCFromApi(statsObject, "kills_moogma"); + FishingTracker.lavaLeeches = getSCFromApi(statsObject, "kills_lava_leech"); + FishingTracker.pyroclasticWorms = getSCFromApi(statsObject, "kills_pyroclastic_worm"); + FishingTracker.lavaFlames = getSCFromApi(statsObject, "kills_lava_flame"); + FishingTracker.fireEels = getSCFromApi(statsObject, "kills_fire_eel"); + FishingTracker.tauruses = getSCFromApi(statsObject, "kills_taurus"); + FishingTracker.thunders = getSCFromApi(statsObject, "kills_thunder"); + FishingTracker.lordJawbuses = getSCFromApi(statsObject, "kills_lord_jawbus"); System.out.println("Writing to config..."); ConfigHandler.writeIntConfig("fishing", "goodCatch", FishingTracker.goodCatches); @@ -331,9 +160,25 @@ public class ImportFishingCommand extends CommandBase { ConfigHandler.writeIntConfig("fishing", "lavaBlaze", FishingTracker.lavaBlazes); ConfigHandler.writeIntConfig("fishing", "lavaPigman", FishingTracker.lavaPigmen); ConfigHandler.writeIntConfig("fishing", "zombieMiner", FishingTracker.zombieMiners); + ConfigHandler.writeIntConfig("fishing", "magmaSlug", FishingTracker.magmaSlugs); + ConfigHandler.writeIntConfig("fishing", "moogma", FishingTracker.moogmas); + ConfigHandler.writeIntConfig("fishing", "lavaLeech", FishingTracker.lavaLeeches); + ConfigHandler.writeIntConfig("fishing", "pyroclasticWorm", FishingTracker.pyroclasticWorms); + ConfigHandler.writeIntConfig("fishing", "lavaFlame", FishingTracker.lavaFlames); + ConfigHandler.writeIntConfig("fishing", "fireEel", FishingTracker.fireEels); + ConfigHandler.writeIntConfig("fishing", "taurus", FishingTracker.tauruses); + ConfigHandler.writeIntConfig("fishing", "thunder", FishingTracker.thunders); + ConfigHandler.writeIntConfig("fishing", "lordJawbus", FishingTracker.lordJawbuses); player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Fishing stats imported.")); }).start(); } + static int getSCFromApi(JsonObject obj, String key) { + int sc = 0; + if (obj.has(key)) sc = obj.get(key).getAsInt(); + FishingTracker.seaCreatures += sc; + return sc; + } + } diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index 5d91573..3be46a4 100644 --- a/src/main/java/me/Danker/commands/LootCommand.java +++ b/src/main/java/me/Danker/commands/LootCommand.java @@ -24,7 +24,7 @@ public class LootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze/fishing/catacombs/mythological> [winter/festival/spooky/ch/f(1-7)/mm/session]"; + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/blaze/fishing/catacombs/mythological> [winter/festival/spooky/ch/lava/f(1-7)/mm/session]"; } public static String usage(ICommandSender arg0) { @@ -41,7 +41,7 @@ public class LootCommand extends CommandBase { if (args.length == 1) { return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "enderman", "blaze", "fishing", "catacombs", "mythological"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { - return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "ch", "session"); + return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "ch", "lava", "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", "f7", "floor7", "mm", "master"); } else if (args.length > 1) { @@ -511,6 +511,7 @@ public class LootCommand extends CommandBase { EnumChatFormatting.GOLD + " Tiger Sharks: " + nf.format(FishingTracker.tigerSharks) + "\n" + EnumChatFormatting.WHITE + " Great White Sharks: " + nf.format(FishingTracker.greatWhiteSharks) + "\n" + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + return; } else if (arg1[1].equalsIgnoreCase("spooky")) { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + @@ -532,6 +533,7 @@ public class LootCommand extends CommandBase { EnumChatFormatting.GOLD + " Phantom Fishers: " + nf.format(FishingTracker.phantomFishers) + "\n" + EnumChatFormatting.GOLD + " Grim Reapers: " + nf.format(FishingTracker.grimReapers) + "\n" + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); + return; } else if (arg1[1].equalsIgnoreCase("ch")) { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + @@ -556,9 +558,64 @@ public class LootCommand extends CommandBase { EnumChatFormatting.LIGHT_PURPLE + " Lava Pigmen: " + nf.format(FishingTracker.lavaPigmen) + "\n" + EnumChatFormatting.GOLD + " Zombie Miners: " + nf.format(FishingTracker.zombieMiners) + "\n" + EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------")); - } + return; + } else if (arg1[1].equalsIgnoreCase("lava")) { + if (showSession) { + if (FishingTracker.jawbusTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(FishingTracker.jawbusTimeSession, timeNow); + } + if (FishingTracker.jawbusSCsSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(FishingTracker.jawbusSCsSession); + } - return; + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Lava Fishing Summary (Current Session):\n" + + EnumChatFormatting.DARK_RED + " Magma Slugs: " + nf.format(FishingTracker.magmaSlugsSession) + "\n" + + EnumChatFormatting.RED + " Moogmas: " + nf.format(FishingTracker.moogmasSession) + "\n" + + EnumChatFormatting.RED + " Lava Leeches: " + nf.format(FishingTracker.lavaLeechesSession) + "\n" + + EnumChatFormatting.RED + " Pyroclastic Worms: " + nf.format(FishingTracker.pyroclasticWormsSession) + "\n" + + EnumChatFormatting.DARK_RED + " Lava Flames: " + nf.format(FishingTracker.lavaFlamesSession) + "\n" + + EnumChatFormatting.RED + " Fire Eels: " + nf.format(FishingTracker.fireEelsSession) + "\n" + + EnumChatFormatting.GOLD + " Tauruses: " + nf.format(FishingTracker.taurusesSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Thunders: " + nf.format(FishingTracker.thundersSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lord Jawbuses: " + nf.format(FishingTracker.lordJawbusesSession) + "\n" + + EnumChatFormatting.AQUA + " Time Since Lord Jawbus: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Creatures Since Lord Jawbus: " + bossesBetween + "\n" + + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + return; + } + + if (FishingTracker.jawbusTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(FishingTracker.jawbusTime, timeNow); + } + if (FishingTracker.jawbusSCs == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(FishingTracker.jawbusSCs); + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.AQUA + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Lava Fishing Summary:\n" + + EnumChatFormatting.DARK_RED + " Magma Slugs: " + nf.format(FishingTracker.magmaSlugs) + "\n" + + EnumChatFormatting.RED + " Moogmas: " + nf.format(FishingTracker.moogmas) + "\n" + + EnumChatFormatting.RED + " Lava Leeches: " + nf.format(FishingTracker.lavaLeeches) + "\n" + + EnumChatFormatting.RED + " Pyroclastic Worms: " + nf.format(FishingTracker.pyroclasticWorms) + "\n" + + EnumChatFormatting.DARK_RED + " Lava Flames: " + nf.format(FishingTracker.lavaFlames) + "\n" + + EnumChatFormatting.RED + " Fire Eels: " + nf.format(FishingTracker.fireEels) + "\n" + + EnumChatFormatting.GOLD + " Tauruses: " + nf.format(FishingTracker.tauruses) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Thunders: " + nf.format(FishingTracker.thunders) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Lord Jawbuses: " + nf.format(FishingTracker.lordJawbuses) + "\n" + + EnumChatFormatting.AQUA + " Time Since Lord Jawbus: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Creatures Since Lord Jawbus: " + bossesBetween + "\n" + + EnumChatFormatting.AQUA + EnumChatFormatting.BOLD + " -------------------")); + return; + } } if (showSession) { diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index d3294b2..c17c2ae 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -277,6 +277,17 @@ public class ResetLootCommand extends CommandBase { FishingTracker.lavaBlazesSession = 0; FishingTracker.lavaPigmenSession = 0; FishingTracker.zombieMinersSession = 0; + FishingTracker.magmaSlugsSession = 0; + FishingTracker.moogmasSession = 0; + FishingTracker.lavaLeechesSession = 0; + FishingTracker.pyroclasticWormsSession = 0; + FishingTracker.lavaFlamesSession = 0; + FishingTracker.fireEelsSession = 0; + FishingTracker.taurusesSession = 0; + FishingTracker.thundersSession = 0; + FishingTracker.lordJawbusesSession = 0; + FishingTracker.jawbusTimeSession = 0; + FishingTracker.jawbusSCsSession = 0; ConfigHandler.deleteCategory("fishing"); ConfigHandler.reloadConfig(); } diff --git a/src/main/java/me/Danker/features/AutoDisplay.java b/src/main/java/me/Danker/features/AutoDisplay.java index 63b66d5..7f86035 100644 --- a/src/main/java/me/Danker/features/AutoDisplay.java +++ b/src/main/java/me/Danker/features/AutoDisplay.java @@ -95,7 +95,11 @@ public class AutoDisplay { List<String> lore = hotbarItem.getTooltip(player, mc.gameSettings.advancedItemTooltips); for (int j = lore.size() - 1; j >= 0; j--) { // reverse if (lore.get(j).contains("FISHING ROD")) { - LootDisplay.display = "fishing"; + if (Utils.tabLocation.equals("Crimson Isle")) { + LootDisplay.display = "fishing_lava"; + } else { + LootDisplay.display = "fishing"; + } found = true; break; } diff --git a/src/main/java/me/Danker/features/loot/FishingTracker.java b/src/main/java/me/Danker/features/loot/FishingTracker.java index cf329aa..95a9040 100644 --- a/src/main/java/me/Danker/features/loot/FishingTracker.java +++ b/src/main/java/me/Danker/features/loot/FishingTracker.java @@ -54,6 +54,18 @@ public class FishingTracker { public static int lavaBlazes; public static int lavaPigmen; public static int zombieMiners; + // Lava fishing + public static int magmaSlugs; + public static int moogmas; + public static int lavaLeeches; + public static int pyroclasticWorms; + public static int lavaFlames; + public static int fireEels; + public static int tauruses; + public static int thunders; + public static int lordJawbuses; + public static double jawbusTime; + public static int jawbusSCs; // Fishing public static int seaCreaturesSession = 0; @@ -101,6 +113,18 @@ public class FishingTracker { public static int lavaBlazesSession = 0; public static int lavaPigmenSession = 0; public static int zombieMinersSession = 0; + // Lava fishing + public static int magmaSlugsSession = 0; + public static int moogmasSession = 0; + public static int lavaLeechesSession = 0; + public static int pyroclasticWormsSession = 0; + public static int lavaFlamesSession = 0; + public static int fireEelsSession = 0; + public static int taurusesSession = 0; + public static int thundersSession = 0; + public static int lordJawbusesSession = 0; + public static double jawbusTimeSession = 0; + public static int jawbusSCsSession = 0; @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { @@ -296,16 +320,61 @@ public class FishingTracker { zombieMinersSession++; ConfigHandler.writeIntConfig("fishing", "zombieMiner", zombieMiners); increaseSeaCreatures(); + } else if (message.contains("From Beneath the lava appears a Magma Slug")) { + magmaSlugs++; + magmaSlugsSession++; + ConfigHandler.writeIntConfig("fishing", "magmaSlug", magmaSlugs); + increaseSeaCreatures(); + } else if (message.contains("You hear a faint Moo from the lava... A Moogma appears")) { + moogmas++; + moogmasSession++; + ConfigHandler.writeIntConfig("fishing", "moogma", moogmas); + increaseSeaCreatures(); + } else if (message.contains("A small but fearsome Lava Leech emerges")) { + lavaLeeches++; + lavaLeechesSession++; + ConfigHandler.writeIntConfig("fishing", "lavaLeech", lavaLeeches); + increaseSeaCreatures(); + } else if (message.contains("You feel the heat radiating as a Pyroclastic Worm surfaces")) { + pyroclasticWorms++; + pyroclasticWormsSession++; + ConfigHandler.writeIntConfig("fishing", "pyroclasticWorm", pyroclasticWorms); + increaseSeaCreatures(); + } else if (message.contains("A Lava Flame flies out from beneath the lava")) { + lavaFlames++; + lavaFlamesSession++; + ConfigHandler.writeIntConfig("fishing", "lavaFlame", lavaFlames); + increaseSeaCreatures(); + } else if (message.contains("A Fire Eel slithers out from the depths")) { + fireEels++; + fireEelsSession++; + ConfigHandler.writeIntConfig("fishing", "fireEel", fireEels); + increaseSeaCreatures(); + } else if (message.contains("Taurus and his steed emerge")) { + tauruses++; + taurusesSession++; + ConfigHandler.writeIntConfig("fishing", "taurus", tauruses); + increaseSeaCreatures(); + } else if (message.contains("You hear a massive rumble as Thunder emerges")) { + thunders++; + thundersSession++; + ConfigHandler.writeIntConfig("fishing", "thunder", thunders); + increaseSeaCreatures(); + } else if (message.contains("You have angered a legendary creature... Lord Jawbus has arrived")) { + lordJawbuses++; + jawbusTime = System.currentTimeMillis() / 1000; + jawbusSCs = 0; + lordJawbusesSession++; + jawbusTimeSession = System.currentTimeMillis() / 1000; + jawbusSCsSession = 0; + ConfigHandler.writeIntConfig("fishing", "lordJawbus", lordJawbuses); + ConfigHandler.writeDoubleConfig("fishing", "jawbusTime", jawbusTime); + ConfigHandler.writeIntConfig("fishing", "jawbusSC", jawbusSCs); + increaseSeaCreatures(); } } public void increaseSeaCreatures() { - if (empSCs != -1) { - empSCs++; - } - if (empSCsSession != -1) { - empSCsSession++; - } // Only increment Yetis when in Jerry's Workshop if (Utils.isInScoreboard("Jerry's Workshop") || Utils.isInScoreboard("Jerry Pond")) { if (yetiSCs != -1) { @@ -314,6 +383,20 @@ public class FishingTracker { if (yetiSCsSession != -1) { yetiSCsSession++; } + } else if (Utils.tabLocation.equals("Crimson Isle")) { + if (jawbusSCs != -1) { + jawbusSCs++; + } + if (jawbusSCsSession != -1) { + jawbusSCsSession++; + } + } else { + if (empSCs != -1) { + empSCs++; + } + if (empSCsSession != -1) { + empSCsSession++; + } } seaCreatures++; @@ -324,6 +407,7 @@ public class FishingTracker { ConfigHandler.writeIntConfig("fishing", "milestone", fishingMilestone); ConfigHandler.writeIntConfig("fishing", "empSC", empSCs); ConfigHandler.writeIntConfig("fishing", "yetiSC", yetiSCs); + ConfigHandler.writeIntConfig("fishing", "jawbusSC", jawbusSCs); } } diff --git a/src/main/java/me/Danker/features/loot/LootDisplay.java b/src/main/java/me/Danker/features/loot/LootDisplay.java index 9436ec6..e1ddcb0 100644 --- a/src/main/java/me/Danker/features/loot/LootDisplay.java +++ b/src/main/java/me/Danker/features/loot/LootDisplay.java @@ -848,6 +848,92 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.lavaPigmenSession) + "\n" + EnumChatFormatting.GOLD + nf.format(FishingTracker.zombieMinersSession); break; + case "fishing_lava": + if (FishingTracker.jawbusTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(FishingTracker.jawbusTime, timeNow); + } + if (FishingTracker.jawbusSCs == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(FishingTracker.jawbusSCs); + } + + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.DARK_RED + "Magma Slugs:\n" + + EnumChatFormatting.RED + "Moogmas:\n" + + EnumChatFormatting.RED + "Lava Leeches:\n" + + EnumChatFormatting.RED + "Pyroclastic Worms:\n" + + EnumChatFormatting.DARK_RED + "Lava Flames:\n" + + EnumChatFormatting.RED + "Fire Eels:\n" + + EnumChatFormatting.GOLD + "Tauruses:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Thunders:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Lord Jawbuses:\n" + + EnumChatFormatting.AQUA + "Time Since Jawbus:\n" + + EnumChatFormatting.AQUA + "SC Since Jawbus:"; + countText = EnumChatFormatting.AQUA + nf.format(FishingTracker.seaCreatures) + "\n" + + EnumChatFormatting.AQUA + nf.format(FishingTracker.fishingMilestone) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.goodCatches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.greatCatches) + "\n" + + EnumChatFormatting.DARK_RED + nf.format(FishingTracker.magmaSlugs) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.moogmas) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.lavaLeeches) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.pyroclasticWorms) + "\n" + + EnumChatFormatting.DARK_RED + nf.format(FishingTracker.lavaFlames) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.fireEels) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.tauruses) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(FishingTracker.thunders) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(FishingTracker.lordJawbuses) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "fishing_lava_session": + if (FishingTracker.jawbusTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(FishingTracker.jawbusTimeSession, timeNow); + } + if (FishingTracker.jawbusSCsSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(FishingTracker.jawbusSCsSession); + } + + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.DARK_RED + "Magma Slugs:\n" + + EnumChatFormatting.RED + "Moogmas:\n" + + EnumChatFormatting.RED + "Lava Leeches:\n" + + EnumChatFormatting.RED + "Pyroclastic Worms:\n" + + EnumChatFormatting.DARK_RED + "Lava Flames:\n" + + EnumChatFormatting.RED + "Fire Eels:\n" + + EnumChatFormatting.GOLD + "Tauruses:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Thunders:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Lord Jawbuses:\n" + + EnumChatFormatting.AQUA + "Time Since Jawbus:\n" + + EnumChatFormatting.AQUA + "SC Since Jawbus:"; + countText = EnumChatFormatting.AQUA + nf.format(FishingTracker.seaCreaturesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(FishingTracker.fishingMilestoneSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.goodCatchesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.greatCatchesSession) + "\n" + + EnumChatFormatting.DARK_RED + nf.format(FishingTracker.magmaSlugsSession) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.moogmasSession) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.lavaLeechesSession) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.pyroclasticWormsSession) + "\n" + + EnumChatFormatting.DARK_RED + nf.format(FishingTracker.lavaFlamesSession) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.fireEelsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.taurusesSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(FishingTracker.thundersSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(FishingTracker.lordJawbusesSession) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; case "mythological": dropsText = EnumChatFormatting.GOLD + "Coins:\n" + EnumChatFormatting.WHITE + "Griffin Feathers:\n" + diff --git a/src/main/java/me/Danker/gui/DisplayGui.java b/src/main/java/me/Danker/gui/DisplayGui.java index 073b161..b8be3d6 100644 --- a/src/main/java/me/Danker/gui/DisplayGui.java +++ b/src/main/java/me/Danker/gui/DisplayGui.java @@ -27,6 +27,7 @@ public class DisplayGui extends GuiScreen { private GuiButton fishingFestival; private GuiButton fishingSpooky; private GuiButton fishingCH; + private GuiButton fishingLava; private GuiButton catacombsF1; private GuiButton catacombsF2; private GuiButton catacombsF3; @@ -60,11 +61,12 @@ public class DisplayGui extends GuiScreen { wolf = new GuiButton(0, width / 2 - 50, (int) (height * 0.35), 100, 20, "Wolf"); enderman = new GuiButton(0, width / 2 + 60, (int) (height * 0.35), 100, 20, "Enderman"); blaze = new GuiButton(0, width / 2 + 170, (int) (height * 0.35), 100, 20, "Blaze"); - fishing = new GuiButton(0, width / 2 - 270, (int) (height * 0.5), 100, 20, "Fishing"); - fishingWinter = new GuiButton(0, width / 2 - 160, (int) (height * 0.5), 100, 20, "Fishing Winter"); - fishingFestival = new GuiButton(0, width / 2 - 50, (int) (height * 0.5), 100, 20, "Fishing Festival"); - fishingSpooky = new GuiButton(0, width / 2 + 60, (int) (height * 0.5), 100, 20, "Fishing Spooky"); - fishingCH = new GuiButton(0, width / 2 + 170, (int) (height * 0.5), 100, 20, "CH Fishing"); + fishing = new GuiButton(0, width / 2 - 295, (int) (height * 0.5), 90, 20, "Fishing"); + fishingWinter = new GuiButton(0, width / 2 - 195, (int) (height * 0.5), 90, 20, "Fishing Winter"); + fishingFestival = new GuiButton(0, width / 2 - 95, (int) (height * 0.5), 90, 20, "Fishing Festival"); + fishingSpooky = new GuiButton(0, width / 2 + 5, (int) (height * 0.5), 90, 20, "Fishing Spooky"); + fishingCH = new GuiButton(0, width / 2 + 105, (int) (height * 0.5), 90, 20, "CH Fishing"); + fishingLava = new GuiButton(0, width / 2 + 205, (int) (height * 0.5), 90, 20, "Lava Fishing"); catacombsF1 = new GuiButton(0, width / 2 - 235, (int) (height * 0.65), 50, 20, "F1"); catacombsF2 = new GuiButton(0, width / 2 - 175, (int) (height * 0.65), 50, 20, "F2"); catacombsF3 = new GuiButton(0, width / 2 - 115, (int) (height * 0.65), 50, 20, "F3"); @@ -89,6 +91,7 @@ public class DisplayGui extends GuiScreen { this.buttonList.add(fishingFestival); this.buttonList.add(fishingSpooky); this.buttonList.add(fishingCH); + this.buttonList.add(fishingLava); this.buttonList.add(catacombsF1); this.buttonList.add(catacombsF2); this.buttonList.add(catacombsF3); @@ -148,6 +151,8 @@ public class DisplayGui extends GuiScreen { setDisplay("fishing_spooky"); } else if (button == fishingCH) { setDisplay("fishing_ch"); + } else if (button == fishingLava) { + setDisplay("fishing_lava"); } else if (button == mythological) { setDisplay("mythological"); } else if (button == catacombsF1) { diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index a4d7ca9..1267b9b 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -456,6 +456,18 @@ public class ConfigHandler { FishingTracker.lavaBlazes = initInt("fishing", "lavaBlaze", 0); FishingTracker.lavaPigmen = initInt("fishing", "lavaPigman", 0); FishingTracker.zombieMiners = initInt("fishing", "zombieMiner", 0); + // Lava Fishing + FishingTracker.magmaSlugs = initInt("fishing", "magmaSlug", 0); + FishingTracker.moogmas = initInt("fishing", "moogma", 0); + FishingTracker.lavaLeeches = initInt("fishing", "lavaLeech", 0); + FishingTracker.pyroclasticWorms = initInt("fishing", "pyroclasticWorm", 0); + FishingTracker.lavaFlames = initInt("fishing", "lavaFlame", 0); + FishingTracker.fireEels = initInt("fishing", "fireEel", 0); + FishingTracker.tauruses = initInt("fishing", "taurus", 0); + FishingTracker.thunders = initInt("fishing", "thunder", 0); + FishingTracker.lordJawbuses = initInt("fishing", "lordJawbus", 0); + FishingTracker.jawbusTime = initDouble("fishing", "jawbusTime", -1); + FishingTracker.jawbusSCs = initInt("fishing", "jawbusSC", -1); // Mythological MythologicalTracker.mythCoins = initDouble("mythological", "coins", 0); |