diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-06-17 00:07:21 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-06-17 00:07:21 -0400 |
commit | 9e5039be5c1f874a6622301daca2b6780dec02ca (patch) | |
tree | 61c85e917bfe28195154a52a963d3723d395d141 /src/main/java/me/Danker/commands | |
parent | d52c64ca20fa8df90f0e4496a954328335803725 (diff) | |
download | SkyblockMod-9e5039be5c1f874a6622301daca2b6780dec02ca.tar.gz SkyblockMod-9e5039be5c1f874a6622301daca2b6780dec02ca.tar.bz2 SkyblockMod-9e5039be5c1f874a6622301daca2b6780dec02ca.zip |
Add enderman slayer tracker
Also add support for counting 20% drops in chat and tier 5 rev dropping viscera
Diffstat (limited to 'src/main/java/me/Danker/commands')
-rw-r--r-- | src/main/java/me/Danker/commands/DisplayCommand.java | 11 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/LootCommand.java | 92 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ResetLootCommand.java | 36 |
3 files changed, 133 insertions, 6 deletions
diff --git a/src/main/java/me/Danker/commands/DisplayCommand.java b/src/main/java/me/Danker/commands/DisplayCommand.java index 990e9d1..e248888 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/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/session/f(1-7)]"; + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/fishing/catacombs/mythological/ghost/auto/off> [winter/festival/spooky/session/f(1-7)]"; } public static String usage(ICommandSender arg0) { @@ -36,7 +36,7 @@ public class DisplayCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological", "ghost", "auto", "off"); + return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "enderman", "fishing", "catacombs", "mythological", "ghost", "auto", "off"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { @@ -82,6 +82,13 @@ public class DisplayCommand extends CommandBase { LootDisplay.display = "zombie"; } break; + case "enderman": + if (showSession) { + LootDisplay.display = "enderman_session"; + } else { + LootDisplay.display = "enderman"; + } + break; case "fishing": if (arg1.length > 1) { switch (arg1[1].toLowerCase()) { diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index 51347a3..d0b4272 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/fishing/catacombs/mythological> [winter/festival/spooky/f(1-7)/session]"; + return "/" + getCommandName() + " <zombie/spider/wolf/enderman/fishing/catacombs/mythological> [winter/festival/spooky/f(1-7)/session]"; } public static String usage(ICommandSender arg0) { @@ -39,7 +39,7 @@ public class LootCommand extends CommandBase { @Override public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos) { if (args.length == 1) { - return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "fishing", "catacombs", "mythological"); + return getListOfStringsMatchingLastWord(args, "wolf", "spider", "zombie", "enderman", "fishing", "catacombs", "mythological"); } else if (args.length == 2 && args[0].equalsIgnoreCase("fishing")) { return getListOfStringsMatchingLastWord(args, "winter", "festival", "spooky", "session"); } else if (args.length == 2 && args[0].equalsIgnoreCase("catacombs")) { @@ -223,6 +223,7 @@ public class LootCommand extends CommandBase { EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Zombie Loot Summary (Current Session):\n" + EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(LootTracker.zombieRevsSession) + "\n" + EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(LootTracker.zombieRevFleshSession) + "\n" + + EnumChatFormatting.GREEN + " Revenant Viscera: " + nf.format(LootTracker.zombieRevVisceraSession) + "\n" + EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" + EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " +LootTracker.zombiePestilencesSession + "\n" + EnumChatFormatting.WHITE + " Smite VI Books: " + LootTracker.zombieBooksSession + "\n" + @@ -259,6 +260,7 @@ public class LootCommand extends CommandBase { EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Zombie Loot Summary:\n" + EnumChatFormatting.GOLD + " Revs Killed: " + nf.format(LootTracker.zombieRevs) + "\n" + EnumChatFormatting.GREEN + " Revenant Flesh: " + nf.format(LootTracker.zombieRevFlesh) + "\n" + + EnumChatFormatting.GREEN + " Revenant Viscera: " + nf.format(LootTracker.zombieRevViscera) + "\n" + EnumChatFormatting.BLUE + " Foul Flesh: " + drop20 + "\n" + EnumChatFormatting.DARK_GREEN + " Pestilence Runes: " + LootTracker.zombiePestilences + "\n" + EnumChatFormatting.WHITE + " Smite VI Books: " + LootTracker.zombieBooks + "\n" + @@ -273,6 +275,92 @@ public class LootCommand extends CommandBase { EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + EnumChatFormatting.GREEN + EnumChatFormatting.BOLD + " -------------------")); break; + case "enderman": + if (showSession) { + if (LootTracker.endermanTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootTracker.endermanTimeSession, timeNow); + } + if (LootTracker.endermanBossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootTracker.endermanBossesSession); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootTracker.endermanTAPSession); + } else { + drop20 = nf.format(LootTracker.endermanTAPDropsSession) + " times"; + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Enderman Loot Summary (Current Session):\n" + + EnumChatFormatting.GOLD + " Voidglooms Killed: " + nf.format(LootTracker.endermanVoidgloomsSession) + "\n" + + EnumChatFormatting.DARK_GRAY + " Null Spheres: " + nf.format(LootTracker.endermanNullSpheresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Arrow Poison: " + drop20 + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Endersnake Runes: " + LootTracker.endermanEndersnakesSession + "\n" + + EnumChatFormatting.DARK_GREEN + " Summoning Eyes: " + LootTracker.endermanSummoningEyesSession + "\n" + + EnumChatFormatting.AQUA + " Mana Steal Books: " + LootTracker.endermanManaBooksSession + "\n" + + EnumChatFormatting.BLUE + " Transmission Tuners: " + LootTracker.endermanTunersSession + "\n" + + EnumChatFormatting.YELLOW + " Null Atoms: " + LootTracker.endermanAtomsSession + "\n" + + EnumChatFormatting.AQUA + " Espresso Machines: " + LootTracker.endermanEspressoMachinesSession + "\n" + + EnumChatFormatting.WHITE + " Smarty Pants Books: " + LootTracker.endermanSmartyBooksSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " End Runes: " + LootTracker.endermanEndRunesSession + "\n" + + EnumChatFormatting.RED + " Blood Chalices: " + LootTracker.endermanChalicesSession + "\n" + + EnumChatFormatting.RED + " Sinful Dice: " + LootTracker.endermanDiceSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Artifact Upgrader: " + LootTracker.endermanArtifactsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + " Enderman Skins: " + LootTracker.endermanSkinsSession + "\n" + + EnumChatFormatting.GRAY + " Enchant Runes: " + LootTracker.endermanEnchantRunesSession + "\n" + + EnumChatFormatting.GOLD + " Etherwarp Mergers: " + LootTracker.endermanMergersSession + "\n" + + EnumChatFormatting.GOLD + " Judgement Cores: " + LootTracker.endermanCoresSession + "\n" + + EnumChatFormatting.RED + " Ender Slayer VII Books: " + LootTracker.endermanEnderBooksSession + "\n" + + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + " -------------------")); + return; + } + + if (LootTracker.endermanTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(LootTracker.endermanTime, timeNow); + } + if (LootTracker.endermanBosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(LootTracker.endermanBosses); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(LootTracker.endermanTAP); + } else { + drop20 = nf.format(LootTracker.endermanTAPDrops) + " times"; + } + + player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + "" + EnumChatFormatting.BOLD + "-------------------\n" + + EnumChatFormatting.DARK_GREEN + EnumChatFormatting.BOLD + " Enderman Loot Summary:\n" + + EnumChatFormatting.GOLD + " Voidglooms Killed: " + nf.format(LootTracker.endermanVoidglooms) + "\n" + + EnumChatFormatting.DARK_GRAY + " Null Spheres: " + nf.format(LootTracker.endermanNullSpheres) + "\n" + + EnumChatFormatting.DARK_PURPLE + " Arrow Poison: " + drop20 + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " Endersnake Runes: " + LootTracker.endermanEndersnakes + "\n" + + EnumChatFormatting.DARK_GREEN + " Summoning Eyes: " + LootTracker.endermanSummoningEyes + "\n" + + EnumChatFormatting.AQUA + " Mana Steal Books: " + LootTracker.endermanManaBooks + "\n" + + EnumChatFormatting.BLUE + " Transmission Tuners: " + LootTracker.endermanTuners + "\n" + + EnumChatFormatting.YELLOW + " Null Atoms: " + LootTracker.endermanAtoms + "\n" + + EnumChatFormatting.AQUA + " Espresso Machines: " + LootTracker.endermanEspressoMachines + "\n" + + EnumChatFormatting.WHITE + " Smarty Pants Books: " + LootTracker.endermanSmartyBooks + "\n" + + EnumChatFormatting.LIGHT_PURPLE + " End Runes: " + LootTracker.endermanEndRunes + "\n" + + EnumChatFormatting.RED + " Blood Chalices: " + LootTracker.endermanChalices + "\n" + + EnumChatFormatting.RED + " Sinful Dice: " + LootTracker.endermanDice + "\n" + + EnumChatFormatting.DARK_PURPLE + " Artifact Upgrader: " + LootTracker.endermanArtifacts + "\n" + + EnumChatFormatting.DARK_PURPLE + " Enderman Skins: " + LootTracker.endermanSkins + "\n" + + EnumChatFormatting.GRAY + " Enchant Runes: " + LootTracker.endermanEnchantRunes + "\n" + + EnumChatFormatting.GOLD + " Etherwarp Mergers: " + LootTracker.endermanMergers + "\n" + + EnumChatFormatting.GOLD + " Judgement Cores: " + LootTracker.endermanCores + "\n" + + EnumChatFormatting.RED + " Ender Slayer VII Books: " + LootTracker.endermanEnderBooks + "\n" + + EnumChatFormatting.AQUA + " Time Since RNG: " + timeBetween + "\n" + + EnumChatFormatting.AQUA + " Bosses Since RNG: " + bossesBetween + "\n" + + EnumChatFormatting.DARK_PURPLE + EnumChatFormatting.BOLD + " -------------------")); + break; case "fishing": if (arg1.length > 1) { if (arg1[1].equalsIgnoreCase("winter")) { diff --git a/src/main/java/me/Danker/commands/ResetLootCommand.java b/src/main/java/me/Danker/commands/ResetLootCommand.java index eac4c88..e13b1a5 100644 --- a/src/main/java/me/Danker/commands/ResetLootCommand.java +++ b/src/main/java/me/Danker/commands/ResetLootCommand.java @@ -25,7 +25,7 @@ public class ResetLootCommand extends CommandBase { @Override public String getCommandUsage(ICommandSender arg0) { - return "/" + getCommandName() + "<zombie/spider/wolf/fishing/mythological/catacombs/confirm/cancel>"; + return "/" + getCommandName() + "<zombie/spider/wolf/enderman/fishing/mythological/catacombs/confirm/cancel>"; } public static String usage(ICommandSender arg0) { @@ -44,7 +44,7 @@ public class ResetLootCommand extends CommandBase { if (confirmReset) { return getListOfStringsMatchingLastWord(args, "confirm", "cancel"); } else { - return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "fishing", "mythological", "catacombs"); + return getListOfStringsMatchingLastWord(args, "zombie", "spider", "wolf", "enderman", "fishing", "mythological", "catacombs"); } } @@ -72,6 +72,9 @@ public class ResetLootCommand extends CommandBase { case "wolf": resetWolf(); break; + case "enderman": + resetEnderman(); + break; case "fishing": resetFishing(); break; @@ -98,6 +101,7 @@ public class ResetLootCommand extends CommandBase { case "zombie": case "spider": case "wolf": + case "enderman": case "fishing": case "mythological": case "catacombs": @@ -120,6 +124,7 @@ public class ResetLootCommand extends CommandBase { static void resetZombie() { LootTracker.zombieRevsSession = 0; LootTracker.zombieRevFleshSession = 0; + LootTracker.zombieRevVisceraSession = 0; LootTracker.zombieFoulFleshSession = 0; LootTracker.zombieFoulFleshDropsSession = 0; LootTracker.zombiePestilencesSession = 0; @@ -168,6 +173,33 @@ public class ResetLootCommand extends CommandBase { ConfigHandler.deleteCategory("wolf"); ConfigHandler.reloadConfig(); } + + static void resetEnderman() { + LootTracker.endermanVoidgloomsSession = 0; + LootTracker.endermanNullSpheresSession = 0; + LootTracker.endermanTAPSession = 0; + LootTracker.endermanTAPDropsSession = 0; + LootTracker.endermanEndersnakesSession = 0; + LootTracker.endermanSummoningEyesSession = 0; + LootTracker.endermanManaBooksSession = 0; + LootTracker.endermanTunersSession = 0; + LootTracker.endermanAtomsSession = 0; + LootTracker.endermanEspressoMachinesSession = 0; + LootTracker.endermanSmartyBooksSession = 0; + LootTracker.endermanEndRunesSession = 0; + LootTracker.endermanChalicesSession = 0; + LootTracker.endermanDiceSession = 0; + LootTracker.endermanArtifactsSession = 0; + LootTracker.endermanSkinsSession = 0; + LootTracker.endermanMergersSession = 0; + LootTracker.endermanCoresSession = 0; + LootTracker.endermanEnchantRunesSession = 0; + LootTracker.endermanEnderBooksSession = 0; + LootTracker.endermanTimeSession = -1; + LootTracker.endermanBossesSession = -1; + ConfigHandler.deleteCategory("enderman"); + ConfigHandler.reloadConfig(); + } static void resetFishing() { LootTracker.seaCreaturesSession = 0; |