diff options
Diffstat (limited to 'src/main/java/me/Danker/features')
61 files changed, 5147 insertions, 1805 deletions
diff --git a/src/main/java/me/Danker/features/AbilityCooldowns.java b/src/main/java/me/Danker/features/AbilityCooldowns.java new file mode 100644 index 0000000..e98660e --- /dev/null +++ b/src/main/java/me/Danker/features/AbilityCooldowns.java @@ -0,0 +1,129 @@ +package me.Danker.features; + +import me.Danker.commands.MoveCommand; +import me.Danker.commands.ScaleCommand; +import me.Danker.commands.ToggleCommand; +import me.Danker.events.RenderOverlayEvent; +import me.Danker.handlers.TextRenderer; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + +import java.util.ArrayList; +import java.util.List; + +public class AbilityCooldowns { + + static List<Ability> cooldowns = new ArrayList<>(); + static double mageReduction = 0D; + + @SubscribeEvent(priority = EventPriority.LOW) + public void onChat(ClientChatReceivedEvent event) { + if (!Utils.inSkyblock || !ToggleCommand.abilityCooldowns) return; + + if (event.type == 2) { + String[] actionBarSections = StringUtils.stripControlCodes(event.message.getUnformattedText()).split(" {3,}"); + + for (String section : actionBarSections) { + if (section.charAt(0) == '-' && section.contains("(") && section.charAt(section.length() - 1) == ')') { + String ability = section.substring(section.indexOf("(") + 1, section.length() - 1); + + for (Ability cooldown : cooldowns) { + if (cooldown.ability.equals(ability)) return; + } + + cooldowns.add(new Ability(ability, Utils.getCooldownFromAbility(ability) * (1D - mageReduction))); + } + } + } else { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (Utils.inDungeons && message.startsWith("[Mage] Cooldown Reduction ")) { + mageReduction = Integer.parseInt(message.substring(message.indexOf(">") + 2, message.length() - 1)) / 100D; + } + } + } + + @SubscribeEvent + public void renderPlayerInfo(RenderOverlayEvent event) { + if (ToggleCommand.abilityCooldowns && Utils.inSkyblock) { + StringBuilder sb = new StringBuilder(); + + for (int i = cooldowns.size() - 1; i >= 0; i--) { + Ability ability = cooldowns.get(i); + + if (ability.getCooldown() <= 0) { + cooldowns.remove(i); + continue; + } + + sb.insert(0, ability.getTimer() + "\n"); + } + + new TextRenderer(Minecraft.getMinecraft(), sb.toString(), MoveCommand.abilityCooldownsXY[0], MoveCommand.abilityCooldownsXY[1], ScaleCommand.abilityCooldownsScale); + } + } + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + if (event.phase != TickEvent.Phase.START) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + if (mc.currentScreen instanceof GuiChest) { + if (player == null) return; + ContainerChest chest = (ContainerChest) player.openContainer; + List<Slot> invSlots = ((GuiChest) mc.currentScreen).inventorySlots.inventorySlots; + String chestName = chest.getLowerChestInventory().getDisplayName().getUnformattedText().trim(); + + if (ToggleCommand.abilityCooldowns && Utils.inDungeons && chestName.startsWith("Catacombs - ")) { + ItemStack mage = invSlots.get(30).getStack(); + if (mage == null || mage.getDisplayName() == null) return; + if (mage.isItemEnchanted()) { + String display = mage.getDisplayName(); + mageReduction = Utils.getCooldownReductionFromLevel(Integer.parseInt(display.substring(display.indexOf(" ") + 1, display.indexOf("]")))); + } else { + mageReduction = 0D; + } + } + } + } + + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + cooldowns.clear(); + mageReduction = 0D; + } + + public static class Ability { + + public final String ability; + private final long cooldown; + + public Ability(String ability, double cooldown) { + this.ability = ability; + this.cooldown = (long) (System.currentTimeMillis() + cooldown * 1000L); + } + + public String getTimer() { + return EnumChatFormatting.GREEN + ability + ": " + EnumChatFormatting.YELLOW + getCooldown() + "s"; + } + + public double getCooldown() { + return (cooldown - System.currentTimeMillis()) / 1000D; + } + + } + +} diff --git a/src/main/java/me/Danker/features/Alerts.java b/src/main/java/me/Danker/features/Alerts.java new file mode 100644 index 0000000..aab99b3 --- /dev/null +++ b/src/main/java/me/Danker/features/Alerts.java @@ -0,0 +1,119 @@ +package me.Danker.features; + +import com.google.gson.GsonBuilder; +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.awt.*; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class Alerts { + + public static List<Alert> alerts = new ArrayList<>(); + public static String configFile; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + if (!ToggleCommand.alerts || event.type == 2) return; + + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + for (Alert alert : alerts) { + if (!alert.toggled) continue; + + boolean location; + switch (alert.location) { + case "Skyblock": + location = Utils.inSkyblock; + break; + case "Dungeons": + location = Utils.inDungeons; + break; + default: + location = true; + } + if (!location) continue; + + boolean trigger; + switch (alert.mode) { + case "Starts With": + trigger = message.startsWith(alert.message); + break; + case "Contains": + trigger = message.contains(alert.message); + break; + case "Ends With": + trigger = message.endsWith(alert.message); + break; + default: + continue; + } + + if (trigger) { + Utils.createTitle(EnumChatFormatting.RED + alert.alert.replace("&", "§"), 2); + + if (alert.desktop) { + try { + final SystemTray tray = SystemTray.getSystemTray(); + final Image image = Toolkit.getDefaultToolkit().createImage("icon.png"); + final TrayIcon trayIcon = new TrayIcon(image, "Alert"); + trayIcon.setImageAutoSize(true); + trayIcon.setToolTip("Alert"); + tray.add(trayIcon); + trayIcon.displayMessage(StringUtils.stripControlCodes(alert.alert), message, TrayIcon.MessageType.INFO); + tray.remove(trayIcon); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + return; + } + } + } + + public static void saveToFile() { + try (FileWriter writer = new FileWriter(configFile)) { + new GsonBuilder().create().toJson(alerts, writer); + writer.flush(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + + public static class Alert { + + public String mode; + public String location; + public String message; + public String alert; + public boolean desktop; + public boolean toggled; + + public Alert(String mode, String location, String message, String alert, boolean desktop, boolean toggled) { + this.mode = mode; + this.location = location; + this.message = message; + this.alert = alert; + this.desktop = desktop; + this.toggled = toggled; + } + + public void toggle() { + toggled = !toggled; + } + + public void toggleDesktop() { + desktop = !desktop; + } + + } + +} diff --git a/src/main/java/me/Danker/features/ArachneESP.java b/src/main/java/me/Danker/features/ArachneESP.java index c78c385..807cfb1 100644 --- a/src/main/java/me/Danker/features/ArachneESP.java +++ b/src/main/java/me/Danker/features/ArachneESP.java @@ -1,7 +1,7 @@ package me.Danker.features; import me.Danker.commands.ToggleCommand; -import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; @@ -30,19 +30,10 @@ public class ArachneESP { arachne = null; } - public boolean inSpidersDen(List<String> scoreboard) { - for (String s : scoreboard) { - if (ScoreboardHandler.cleanSB(s).contains("Spiders Den")) { - return true; - } - } - return false; - } - @SubscribeEvent public void onChat(ClientChatReceivedEvent event) { if (!Utils.inSkyblock) return; - if (!inSpidersDen(ScoreboardHandler.getSidebarLines())) return; + if (!Utils.tabLocation.equals("Spider's Den")) return; String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); if (message.contains("Something is awakening")){ arachneActive = true; @@ -66,7 +57,7 @@ public class ArachneESP { if (arachne != null) { if (arachneActive && ToggleCommand.highlightArachne) { AxisAlignedBB aabb = new AxisAlignedBB(arachne.posX - 0.75, arachne.posY - 1, arachne.posZ - 0.75, arachne.posX + 0.75, arachne.posY, arachne.posZ + 0.75); - Utils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); + RenderUtils.draw3DBox(aabb, ARACHANE_COLOUR, event.partialTicks); } } } diff --git a/src/main/java/me/Danker/features/AutoAcceptReparty.java b/src/main/java/me/Danker/features/AutoAcceptReparty.java new file mode 100644 index 0000000..b2e563d --- /dev/null +++ b/src/main/java/me/Danker/features/AutoAcceptReparty.java @@ -0,0 +1,36 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import net.minecraft.client.Minecraft; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class AutoAcceptReparty { + + String partyLeader = null; + long lastDisband = 0; + + @SubscribeEvent(receiveCanceled = true) + public void onChat(ClientChatReceivedEvent event) { + + if (ToggleCommand.autoAcceptReparty) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (message.contains(":")) return; + + String[] split = message.split("\\s"); + + if (message.contains("has disbanded the party!")) { + lastDisband = System.currentTimeMillis() / 1000; + partyLeader = split[0].contains("[") ? split[1] : split[0]; + } else if (message.contains("has invited you to join their party!")) { + String inviter = split[1].contains("[") ? split[2] : split[1]; + if (inviter.equals(partyLeader) && System.currentTimeMillis() / 1000 - lastDisband <= 120) { + Minecraft.getMinecraft().thePlayer.sendChatMessage("/party accept " + partyLeader); + } + } + } + } + +} diff --git a/src/main/java/me/Danker/features/AutoDisplay.java b/src/main/java/me/Danker/features/AutoDisplay.java index 182c0b4..7f86035 100644 --- a/src/main/java/me/Danker/features/AutoDisplay.java +++ b/src/main/java/me/Danker/features/AutoDisplay.java @@ -4,8 +4,10 @@ import me.Danker.DankersSkyblockMod; import me.Danker.features.loot.LootDisplay; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -37,24 +39,47 @@ public class AutoDisplay { } else if (sCleaned.contains("Revenant Horror")) { LootDisplay.display = "zombie"; found = true; + } else if (sCleaned.contains("Voidgloom Seraph")) { + LootDisplay.display = "enderman"; + found = true; + } else if (sCleaned.contains("Inferno Demonlord")) { + LootDisplay.display = "blaze"; + found = true; } else if (sCleaned.contains("The Mist")){ LootDisplay.display = "ghost"; found = true; - } else if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - LootDisplay.display = "catacombs_floor_one"; - } else if (sCleaned.contains("F2")) { - LootDisplay.display = "catacombs_floor_two"; - } else if (sCleaned.contains("F3")) { - LootDisplay.display = "catacombs_floor_three"; - } else if (sCleaned.contains("F4")) { - LootDisplay.display = "catacombs_floor_four"; - } else if (sCleaned.contains("F5")) { - LootDisplay.display = "catacombs_floor_five"; - } else if (sCleaned.contains("F6")) { - LootDisplay.display = "catacombs_floor_six"; - } else if (sCleaned.contains("F7")) { - LootDisplay.display = "catacombs_floor_seven"; + } else if (Utils.inDungeons) { + switch (Utils.currentFloor) { + case F1: + LootDisplay.display = "catacombs_floor_one"; + break; + case F2: + LootDisplay.display = "catacombs_floor_two"; + break; + case F3: + LootDisplay.display = "catacombs_floor_three"; + break; + case F4: + LootDisplay.display = "catacombs_floor_four"; + break; + case F5: + LootDisplay.display = "catacombs_floor_five"; + break; + case F6: + LootDisplay.display = "catacombs_floor_six"; + break; + case F7: + LootDisplay.display = "catacombs_floor_seven"; + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + LootDisplay.display = "catacombs_master"; + break; } found = true; } @@ -65,6 +90,20 @@ public class AutoDisplay { if (hotbarItem.getDisplayName().contains("Ancestral Spade")) { LootDisplay.display = "mythological"; found = true; + break; + } else if (hotbarItem.getItem() == Items.fishing_rod) { + 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")) { + if (Utils.tabLocation.equals("Crimson Isle")) { + LootDisplay.display = "fishing_lava"; + } else { + LootDisplay.display = "fishing"; + } + found = true; + break; + } + } } } if (!found) LootDisplay.display = "off"; diff --git a/src/main/java/me/Danker/features/AutoJoinSkyblock.java b/src/main/java/me/Danker/features/AutoJoinSkyblock.java new file mode 100644 index 0000000..91d6039 --- /dev/null +++ b/src/main/java/me/Danker/features/AutoJoinSkyblock.java @@ -0,0 +1,41 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.network.FMLNetworkEvent; + +public class AutoJoinSkyblock { + + static boolean joinedServer = false; + + @SubscribeEvent + public void onConnect(FMLNetworkEvent.ClientConnectedToServerEvent event) { + if (ToggleCommand.autoJoinSkyblock && !joinedServer) { + joinedServer = true; + new Thread(() -> { + EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; + + try { + while (player == null) { + Thread.sleep(100); + player = Minecraft.getMinecraft().thePlayer; + } + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + if (Utils.isOnHypixel()) player.sendChatMessage("/play sb"); + }).start(); + } + } + + @SubscribeEvent + public void onDisconnect(FMLNetworkEvent.ClientDisconnectionFromServerEvent event) { + joinedServer = false; + } + +} diff --git a/src/main/java/me/Danker/features/AutoSwapToPickBlock.java b/src/main/java/me/Danker/features/AutoSwapToPickBlock.java index ccabbce..9a4c839 100644 --- a/src/main/java/me/Danker/features/AutoSwapToPickBlock.java +++ b/src/main/java/me/Danker/features/AutoSwapToPickBlock.java @@ -1,6 +1,7 @@ package me.Danker.features; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.client.settings.GameSettings; @@ -17,6 +18,8 @@ public class AutoSwapToPickBlock { @SubscribeEvent public void onGuiOpen(GuiOpenEvent event) { + if (!ToggleCommand.swapToPickBlockToggled || !Utils.inSkyblock) return; + Minecraft mc = Minecraft.getMinecraft(); GameSettings gameSettings = mc.gameSettings; if (event.gui instanceof GuiChest) { @@ -25,18 +28,16 @@ public class AutoSwapToPickBlock { IInventory inventory = ((ContainerChest) containerChest).getLowerChestInventory(); String inventoryName = inventory.getDisplayName().getUnformattedText(); - if (ToggleCommand.swapToPickBlockToggled) { - if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Navigate the maze!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Harp -")) { - if (!pickBlockBindSwapped) { - pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode(); - gameSettings.keyBindPickBlock.setKeyCode(-100); - pickBlockBindSwapped = true; - } - } else { - if (pickBlockBindSwapped) { - gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); - pickBlockBindSwapped = false; - } + if (inventoryName.startsWith("Chronomatron (") || inventoryName.startsWith("Superpairs (") || inventoryName.startsWith("Ultrasequencer (") || inventoryName.startsWith("What starts with:") || inventoryName.startsWith("Select all the") || inventoryName.startsWith("Change all to same color!") || inventoryName.startsWith("Correct all the panes!") || inventoryName.startsWith("Click in order!") || inventoryName.startsWith("Click the button on time!") || inventoryName.startsWith("Harp -")) { + if (!pickBlockBindSwapped) { + pickBlockBind = gameSettings.keyBindPickBlock.getKeyCode(); + gameSettings.keyBindPickBlock.setKeyCode(-100); + pickBlockBindSwapped = true; + } + } else { + if (pickBlockBindSwapped) { + gameSettings.keyBindPickBlock.setKeyCode(pickBlockBind); + pickBlockBindSwapped = false; } } } diff --git a/src/main/java/me/Danker/features/BlockPlacingFlowers.java b/src/main/java/me/Danker/features/BlockPlacingFlowers.java new file mode 100644 index 0000000..580c010 --- /dev/null +++ b/src/main/java/me/Danker/features/BlockPlacingFlowers.java @@ -0,0 +1,45 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.util.ArrayList; +import java.util.Arrays; + +public class BlockPlacingFlowers { + + ArrayList<Block> flowerPlaceable = new ArrayList<>(Arrays.asList( + Blocks.grass, + Blocks.dirt, + Blocks.flower_pot, + Blocks.tallgrass, + Blocks.double_plant + )); + + @SubscribeEvent + public void onInteract(PlayerInteractEvent event) { + if (!Utils.inSkyblock || Minecraft.getMinecraft().thePlayer != event.entityPlayer) return; + ItemStack item = event.entityPlayer.getHeldItem(); + if (item == null) return; + + if (event.action == PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK) { + Block block = Minecraft.getMinecraft().theWorld.getBlockState(event.pos).getBlock(); + + if (flowerPlaceable.contains(block)) { + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Flower of Truth")) { + event.setCanceled(true); + } + if (ToggleCommand.flowerWeaponsToggled && item.getDisplayName().contains("Spirit Sceptre")) { + event.setCanceled(true); + } + } + } + } + +} diff --git a/src/main/java/me/Danker/features/BlockWrongSlayer.java b/src/main/java/me/Danker/features/BlockWrongSlayer.java new file mode 100644 index 0000000..4e19053 --- /dev/null +++ b/src/main/java/me/Danker/features/BlockWrongSlayer.java @@ -0,0 +1,42 @@ +package me.Danker.features; + +import me.Danker.DankersSkyblockMod; +import me.Danker.events.ChestSlotClickedEvent; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ChatComponentText; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class BlockWrongSlayer { + + public static String onlySlayerName = ""; + public static String onlySlayerNumber = ""; + + @SubscribeEvent + public void onSlotClick(ChestSlotClickedEvent event) { + String inventoryName = event.inventoryName; + ItemStack item = event.item; + if (!onlySlayerName.equals("") && item != null) { + if (inventoryName.equals("Slayer")) { + if (!item.getDisplayName().contains("Revenant Horror") && !item.getDisplayName().contains("Tarantula Broodfather") && !item.getDisplayName().contains("Sven Packmaster")) + return; + if (!item.getDisplayName().contains(onlySlayerName)) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from starting this quest (Set to " + onlySlayerName + " " + onlySlayerNumber + ")")); + Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, (float) 0.5); + event.setCanceled(true); + } + } else if (inventoryName.equals("Revenant Horror") || inventoryName.equals("Tarantula Broodfather") || inventoryName.equals("Sven Packmaster") || inventoryName.equals("Voidgloom Seraph")) { + if (item.getDisplayName().contains("Revenant Horror") || item.getDisplayName().contains("Tarantula Broodfather") || item.getDisplayName().contains("Sven Packmaster") || item.getDisplayName().contains("Voidgloom Seraph")) { + // Only check number as they passed the above check + String slayerNumber = item.getDisplayName().substring(item.getDisplayName().lastIndexOf(" ") + 1); + if (!slayerNumber.equals(onlySlayerNumber)) { + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Danker's Skyblock Mod has stopped you from starting this quest (Set to " + onlySlayerName + " " + onlySlayerNumber + ")")); + Minecraft.getMinecraft().thePlayer.playSound("note.bass", 1, (float) 0.5); + event.setCanceled(true); + } + } + } + } + } + +} diff --git a/src/main/java/me/Danker/features/BonzoMaskTimer.java b/src/main/java/me/Danker/features/BonzoMaskTimer.java index e038786..5bec1ba 100644 --- a/src/main/java/me/Danker/features/BonzoMaskTimer.java +++ b/src/main/java/me/Danker/features/BonzoMaskTimer.java @@ -3,7 +3,7 @@ package me.Danker.features; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -35,6 +35,7 @@ public class BonzoMaskTimer { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); if (!Utils.inDungeons) return; + if (message.contains(":")) return; if (ToggleCommand.bonzoTimerToggled && message.contains("Bonzo's Mask") && message.contains("saved your life!")) { double usedTime = System.currentTimeMillis() / 1000; @@ -56,7 +57,7 @@ public class BonzoMaskTimer { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons) { Minecraft mc = Minecraft.getMinecraft(); ItemStack helmetSlot = mc.thePlayer.getCurrentArmor(3); diff --git a/src/main/java/me/Danker/features/CakeTimer.java b/src/main/java/me/Danker/features/CakeTimer.java index ba6eb3d..480ff07 100644 --- a/src/main/java/me/Danker/features/CakeTimer.java +++ b/src/main/java/me/Danker/features/CakeTimer.java @@ -3,7 +3,7 @@ package me.Danker.features; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; @@ -36,7 +36,7 @@ public class CakeTimer { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.cakeTimerToggled && Utils.inSkyblock) { Minecraft mc = Minecraft.getMinecraft(); double scale = ScaleCommand.cakeTimerScale; diff --git a/src/main/java/me/Danker/features/ColouredNames.java b/src/main/java/me/Danker/features/ColouredNames.java new file mode 100644 index 0000000..aad1ab1 --- /dev/null +++ b/src/main/java/me/Danker/features/ColouredNames.java @@ -0,0 +1,178 @@ +package me.Danker.features; + +import me.Danker.DankersSkyblockMod; +import me.Danker.commands.ToggleCommand; +import me.Danker.events.PacketReadEvent; +import me.Danker.utils.Utils; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityArmorStand; +import net.minecraft.network.play.server.S45PacketTitle; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.client.event.RenderLivingEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.event.entity.player.PlayerEvent; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.relauncher.ReflectionHelper; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class ColouredNames { + + public static List<String> users = new ArrayList<>(); + public static Map<String, String> nametags = new HashMap<>(); + public static final EnumChatFormatting[] RAINBOW_COLOURS = new EnumChatFormatting[]{EnumChatFormatting.RED, EnumChatFormatting.GOLD, EnumChatFormatting.YELLOW, EnumChatFormatting.GREEN, EnumChatFormatting.AQUA, EnumChatFormatting.BLUE, EnumChatFormatting.DARK_PURPLE}; + + static Field messageField = ReflectionHelper.findField(S45PacketTitle.class, "message", "field_179810_b", "b"); + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + if (!ToggleCommand.customColouredNames || !Utils.inSkyblock || event.type != 0) return; + + for (String user : users) { + if (event.message.getFormattedText().contains(user)) { + event.message = replaceChat(event.message, user); + } + } + } + + @SubscribeEvent + public void onTooltip(ItemTooltipEvent event) { + if (!ToggleCommand.customColouredNames || !Utils.inSkyblock) return; + + for (String user : users) { + for (int i = 0; i < event.toolTip.size(); i++) { + if (event.toolTip.get(i).contains(user)) { + event.toolTip.set(i, replaceName(event.toolTip.get(i), user, getColourFromName(user))); + } + } + } + } + + @SubscribeEvent + public void onRenderNametag(PlayerEvent.NameFormat event) { + if (!ToggleCommand.customColouredNames || !Utils.inSkyblock) return; + + if (users.contains(event.username)) { + event.displayname = replaceName(event.displayname, event.username, getColourFromName(event.username)); + } + } + + @SubscribeEvent(priority = EventPriority.LOW) + public void onRenderLiving(RenderLivingEvent.Specials.Pre<EntityLivingBase> event) { + if (!ToggleCommand.customColouredNames || !Utils.inSkyblock) return; + + Entity entity = event.entity; + if (entity instanceof EntityArmorStand && !entity.isDead && entity.hasCustomName()) { + String name = entity.getCustomNameTag(); + if (name.charAt(name.length() - 1) == '❤') return; + + String id = entity.getUniqueID().toString(); + String nametag = nametags.get(id); + + if (name.equals(nametag)) { + entity.setCustomNameTag(nametag); + } else { + for (String user : users) { + if (name.contains(user)) { + name = replaceName(name, user, getColourFromName(user)); + } + } + + nametags.put(id, name); + entity.setCustomNameTag(name); + } + } + } + + @SubscribeEvent + public void onPacketRead(PacketReadEvent event) { + if (!ToggleCommand.customColouredNames || !Utils.inSkyblock) return; + + if (event.packet instanceof S45PacketTitle) { + S45PacketTitle packet = (S45PacketTitle) event.packet; + + if (packet.getMessage() == null) return; + + String message = packet.getMessage().getUnformattedText(); + for (String user : users) { + if (message.contains(user)) { + try { + messageField.setAccessible(true); + messageField.set(packet, replaceChat(packet.getMessage(), user)); + event.packet = packet; + } catch (IllegalAccessException ex) { + ex.printStackTrace(); + } + break; + } + } + } + } + + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + nametags.clear(); + } + + // https://github.com/SteveKunG/SkyBlockcatia/blob/1.8.9/src/main/java/com/stevekung/skyblockcatia/utils/SupporterUtils.java#L53 + public static String replaceName(String text, String name, String colour) { + String namePattern = "(?:(?:\\u00a7[0-9a-fbr])\\B(?:" + name + ")\\b)|(?:\\u00a7[rb]" + name + "\\u00a7r)|\\b" + name + "\\b"; + Matcher prevColourMat = Pattern.compile("(?:.*(?:(?<colour>\\u00a7[0-9a-fbr])" + name + ")\\b.*)").matcher(text); + + if (prevColourMat.matches()) { + if (colour.equals("§z")) { + StringBuilder rainbowName = new StringBuilder(); + for (int i = 0; i < name.length(); i++) { + rainbowName.append(RAINBOW_COLOURS[i % 7]).append(name.charAt(i)); + } + return text.replaceAll(namePattern, rainbowName + prevColourMat.group("colour")); + } + return text.replaceAll(namePattern, colour + name + prevColourMat.group("colour")); + } + + if (colour.equals("§z")) { + StringBuilder rainbowName = new StringBuilder(); + for (int i = 0; i < name.length(); i++) { + rainbowName.append(RAINBOW_COLOURS[i % 7]).append(name.charAt(i)); + } + return text.replaceAll(namePattern, rainbowName.toString() + EnumChatFormatting.WHITE); + } + return text.replaceAll(namePattern, colour + name + EnumChatFormatting.WHITE); + } + + // https://github.com/Moulberry/Hychat/blob/master/src/main/java/io/github/moulberry/hychat/util/TextProcessing.java#L23 + public static IChatComponent replaceChat(IChatComponent component, String user) { + IChatComponent newComponent; + ChatComponentText text = (ChatComponentText) component; + + newComponent = new ChatComponentText(replaceName(text.getUnformattedTextForChat(), user, getColourFromName(user))); + newComponent.setChatStyle(text.getChatStyle().createShallowCopy()); + + for (IChatComponent sibling : text.getSiblings()) { + newComponent.appendSibling(replaceChat(sibling, user)); + } + + return newComponent; + } + + public static String getColourFromName(String name) { + try { + return "§" + DankersSkyblockMod.data.get("colourednames").getAsJsonObject().get(name).getAsString(); + } catch (NullPointerException ex) { + return EnumChatFormatting.WHITE.toString(); + } + } + +} diff --git a/src/main/java/me/Danker/features/CrystalHollowWaypoints.java b/src/main/java/me/Danker/features/CrystalHollowWaypoints.java new file mode 100644 index 0000000..f367877 --- /dev/null +++ b/src/main/java/me/Danker/features/CrystalHollowWaypoints.java @@ -0,0 +1,204 @@ +package me.Danker.features; + +import me.Danker.DankersSkyblockMod; +import me.Danker.commands.CrystalHollowWaypointCommand; +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.RenderUtils; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.item.EntityArmorStand; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.event.ClickEvent; +import net.minecraft.util.*; +import net.minecraft.world.World; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + +import java.util.ArrayList; +import java.util.List; + +public class CrystalHollowWaypoints { + + public static List<Waypoint> waypoints = new ArrayList<>(); + + static boolean khazad = false; + static boolean fairy = false; + static boolean temple = false; + static boolean guardian = false; + static boolean divan = false; + static boolean corleone = false; + static boolean king = false; + static boolean queen = false; + static boolean city = false; + static boolean nucleus = false; + static boolean shop = false; + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + if (event.phase != TickEvent.Phase.START) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayer player = mc.thePlayer; + World world = mc.theWorld; + + if (DankersSkyblockMod.tickAmount % 20 == 0) { + if (ToggleCommand.crystalAutoWaypoints && Utils.tabLocation.equals("Crystal Hollows") && world != null) { + boolean found = false; + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + + if (!nucleus) { + nucleus = true; + waypoints.add(new Waypoint("Crystal Nucleus", new BlockPos(512, 110, 512))); + } + + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (!khazad && sCleaned.contains("Khazad-d")) { + khazad = found = true; + waypoints.add(new Waypoint("Khazad-dûm", player.getPosition())); + } else if (!fairy && sCleaned.contains("Fairy Grotto")) { + fairy = found = true; + waypoints.add(new Waypoint("Fairy Grotto", player.getPosition())); + } else if (!temple && sCleaned.contains("Jungle Temple")) { + temple = found = true; + waypoints.add(new Waypoint("Jungle Temple", player.getPosition())); + } else if (!divan && sCleaned.contains("Mines of Divan")) { + divan = found = true; + waypoints.add(new Waypoint("Mines of Divan", player.getPosition())); + } else if (!queen && sCleaned.contains("Goblin Queen's Den")) { + queen = found = true; + waypoints.add(new Waypoint("Goblin Queen's Den", player.getPosition())); + } else if (!city && sCleaned.contains("Lost Precursor City")) { + city = found = true; + waypoints.add(new Waypoint("Lost Precursor City", player.getPosition())); + } + + if (found) break; + } + + if (!found) { + AxisAlignedBB scan = new AxisAlignedBB(player.getPosition().add(-15, -15, -15), player.getPosition().add(15, 15, 15)); + List<EntityArmorStand> entities = world.getEntitiesWithinAABB(EntityArmorStand.class, scan); + + for (EntityArmorStand entity : entities) { + if (entity.hasCustomName()) { + if (!king && entity.getCustomNameTag().endsWith("King Yolkar")) { + king = found = true; + waypoints.add(new Waypoint("King Yolkar", entity.getPosition())); + } else if (!corleone && entity.getCustomNameTag().contains("Boss Corleone")) { + corleone = found = true; + waypoints.add(new Waypoint("Boss Corleone", entity.getPosition())); + } else if (!guardian && entity.getCustomNameTag().contains("Key Guardian")) { + guardian = found = true; + waypoints.add(new Waypoint("Key Guardian", entity.getPosition())); + } else if (!shop && entity.getCustomNameTag().contains("Odawa")) { + shop = found = true; + waypoints.add(new Waypoint("Odawa", entity.getPosition())); + } + } + } + } + + if (found && ToggleCommand.crystalHollowWaypoints) { + Waypoint latest = waypoints.get(waypoints.size() - 1); + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Added " + latest.location + " @ " + latest.getPos())); + } + } + } + } + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + + if (player == null) return; + + /* examples + $SBECHWP:Mines of Divan@-673,117,426 + $SBECHWP:Khazad-dûm@-292,63,281\nFairy Grotto@-216,110,400\njungle temple@-525,110,395\nJungle Temple@-493,101,425\nMines of Divan@-673,117,426 + */ + if (ToggleCommand.crystalHollowWaypoints && Utils.tabLocation.equals("Crystal Hollows")) { + if (!message.contains(player.getName()) && (message.contains(": $DSMCHWP:") || message.contains(": $SBECHWP:"))) { + String waypoints = message.substring(message.lastIndexOf(":") + 1); + + if (ToggleCommand.crystalAutoPlayerWaypoints) { + CrystalHollowWaypointCommand.addWaypoints(waypoints, true); + return; + } + + ChatComponentText add = new ChatComponentText(EnumChatFormatting.GREEN + "" + EnumChatFormatting.BOLD + " [ADD]\n"); + add.setChatStyle(add.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/dsmaddcrystalhollowwaypoints " + waypoints))); + + new Thread(() -> { + try { + Thread.sleep(10); + } catch (InterruptedException ex) { + ex.printStackTrace(); + } + player.addChatMessage(new ChatComponentText("\n" + DankersSkyblockMod.MAIN_COLOUR + "DSM/SBE Crystal Hollows waypoints found. Click to add.\n").appendSibling(add)); + }).start(); + } + } + } + + @SubscribeEvent + public void onWorldRender(RenderWorldLastEvent event) { + if (ToggleCommand.crystalHollowWaypoints && Utils.tabLocation.equals("Crystal Hollows")) { + for (Waypoint waypoint : waypoints) { + if (waypoint.toggled) RenderUtils.draw3DWaypointString(waypoint, event.partialTicks); + } + } + } + + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + waypoints.clear(); + khazad = false; + fairy = false; + temple = false; + guardian = false; + divan = false; + corleone = false; + king = false; + queen = false; + city = false; + nucleus = false; + shop = false; + } + + public static class Waypoint { + + public String location; + public BlockPos pos; + public boolean toggled; + + public Waypoint(String location, BlockPos pos) { + this.location = location; + this.pos = pos; + this.toggled = true; + } + + public String getFormattedWaypoint() { + return location + "@-" + pos.getX() + "," + pos.getY() + "," + pos.getZ(); + } + + public String getDistance(EntityPlayer player) { + return Math.round(player.getDistance(pos.getX(), pos.getY(), pos.getZ())) + "m"; + } + + public String getPos() { + return pos.getX() + ", " + pos.getY() + ", " + pos.getZ(); + } + + public void toggle() { + toggled = !toggled; + } + + } + +} diff --git a/src/main/java/me/Danker/features/CustomMusic.java b/src/main/java/me/Danker/features/CustomMusic.java index 342727b..a31e40a 100644 --- a/src/main/java/me/Danker/features/CustomMusic.java +++ b/src/main/java/me/Danker/features/CustomMusic.java @@ -20,19 +20,44 @@ import net.minecraftforge.fml.common.gameevent.TickEvent; import javax.sound.sampled.*; import java.io.File; import java.io.IOException; +import java.util.ArrayList; import java.util.List; +import java.util.Random; public class CustomMusic { static boolean cancelNotes; - static boolean prevInDungeonBossRoom = false; - public static boolean inDungeonBossRoom = false; public static Song dungeonboss; public static int dungeonbossVolume; public static Song bloodroom; public static int bloodroomVolume; public static Song dungeon; public static int dungeonVolume; + public static Song hub; + public static int hubVolume; + public static Song island; + public static int islandVolume; + public static Song dungeonHub; + public static int dungeonHubVolume; + public static Song farmingIslands; + public static int farmingIslandsVolume; + public static Song goldMine; + public static int goldMineVolume; + public static Song deepCaverns; + public static int deepCavernsVolume; + public static Song dwarvenMines; + public static int dwarvenMinesVolume; + public static Song crystalHollows; + public static int crystalHollowsVolume; + public static Song spidersDen; + public static int spidersDenVolume; + public static Song crimsonIsle; + public static int crimsonIsleVolume; + public static Song end; + public static int endVolume; + public static Song park; + public static int parkVolume; + @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { @@ -40,42 +65,77 @@ public class CustomMusic { } @SubscribeEvent(priority = EventPriority.LOW) - public void onTick(TickEvent.ClientTickEvent event) { + public void onTick(TickEvent.ClientTickEvent event) throws UnsupportedAudioFileException, LineUnavailableException, IOException { if (event.phase != TickEvent.Phase.START) return; Minecraft mc = Minecraft.getMinecraft(); EntityPlayerSP player = mc.thePlayer; World world = mc.theWorld; if (DankersSkyblockMod.tickAmount % 10 == 0) { - if (ToggleCommand.dungeonBossMusic && Utils.inDungeons && world != null && player != null) { - prevInDungeonBossRoom = inDungeonBossRoom; - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - if (scoreboard.size() > 2) { - String firstLine = ScoreboardHandler.cleanSB(scoreboard.get(scoreboard.size() - 1)); - String secondLine = ScoreboardHandler.cleanSB(scoreboard.get(scoreboard.size() - 2)); - if (firstLine.contains("30,30") || // F1 - firstLine.contains("30,125") || // F2 - firstLine.contains("30,225") || // F3 - secondLine.contains("- Healthy") || // F3 - firstLine.contains("30,344") || // F4 - firstLine.contains("livid") || // F5 - firstLine.contains("sadan") || // F6 - firstLine.contains("necron")) { // F7 - - inDungeonBossRoom = true; - if (!prevInDungeonBossRoom) { - dungeonboss.start(); + if (world != null && player != null) { + if (Utils.inDungeons) { + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + if (scoreboard.size() > 2) { + String firstLine = ScoreboardHandler.cleanSB(scoreboard.get(scoreboard.size() - 1)); + String secondLine = ScoreboardHandler.cleanSB(scoreboard.get(scoreboard.size() - 2)); + if (firstLine.contains("30,30") || // F1 + firstLine.contains("30,125") || // F2 + firstLine.contains("30,225") || // F3 + secondLine.contains("- Healthy") || // F3 + firstLine.contains("30,344") || // F4 + firstLine.contains("livid") || // F5 + firstLine.contains("sadan") || // F6 + firstLine.contains("necron")) { // F7 + + if (ToggleCommand.dungeonBossMusic) dungeonboss.start(); + } } } else { - inDungeonBossRoom = false; - } + switch (Utils.tabLocation) { + case "Hub": + if (ToggleCommand.hubMusic) hub.start(); + break; + case "Private Island": + if (ToggleCommand.islandMusic) island.start(); + break; + case "Dungeon Hub": + if (ToggleCommand.dungeonHubMusic) dungeonHub.start(); + break; + case "The Farming Islands": + if (ToggleCommand.farmingIslandsMusic) farmingIslands.start(); + break; + case "Gold Mine": + if (ToggleCommand.goldMineMusic) goldMine.start(); + break; + case "Deep Caverns": + if (ToggleCommand.deepCavernsMusic) deepCaverns.start(); + break; + case "Dwarven Mines": + if (ToggleCommand.dwarvenMinesMusic) dwarvenMines.start(); + break; + case "Crystal Hollows": + if (ToggleCommand.crystalHollowsMusic) crystalHollows.start(); + break; + case "Spider's Den": + if (ToggleCommand.spidersDenMusic) spidersDen.start(); + break; + case "Crimson Isle": + if (ToggleCommand.crimsonIsleMusic) crimsonIsle.start(); + break; + case "The End": + if (ToggleCommand.endMusic) end.start(); + break; + case "The Park": + if (ToggleCommand.parkMusic) park.start(); + break; + } } } } } @SubscribeEvent(receiveCanceled = true) - public void onChat(ClientChatReceivedEvent event) { + public void onChat(ClientChatReceivedEvent event) throws UnsupportedAudioFileException, LineUnavailableException, IOException { String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); if (ToggleCommand.dungeonMusic && Utils.inDungeons) { @@ -91,8 +151,9 @@ public class CustomMusic { dungeonboss.stop(); bloodroom.stop(); dungeon.stop(); - } else if (ToggleCommand.bloodRoomMusic && message.contains("The BLOOD DOOR has been opened!")) { - bloodroom.start(); + } else if (message.contains("The BLOOD DOOR has been opened!")) { + dungeon.stop(); + if (ToggleCommand.bloodRoomMusic) bloodroom.start(); } } } @@ -104,76 +165,121 @@ public class CustomMusic { } } - public static void init(String configDirectory) throws IOException, LineUnavailableException, UnsupportedAudioFileException { + public static void init(String configDirectory) { if (configDirectory == null) return; File directory = new File(configDirectory + "/dsmmusic"); if (!directory.exists()) directory.mkdir(); reset(); - File dungeonBossFile = new File(directory + "/dungeonboss.wav"); - System.out.println("dungeonboss.wav exists?: " + dungeonBossFile.exists()); - dungeonboss = new Song(dungeonBossFile, dungeonbossVolume); - - File bloodRoomFile = new File(directory + "/bloodroom.wav"); - System.out.println("bloodroom.wav exists?: " + bloodRoomFile.exists()); - bloodroom = new Song(bloodRoomFile, bloodroomVolume); - - File dungeonFile = new File(directory + "/dungeon.wav"); - System.out.println("dungeon.wav exists?: " + dungeonFile.exists()); - dungeon = new Song(dungeonFile, dungeonVolume); + dungeonboss = new Song(directory, "dungeonboss", dungeonbossVolume); + bloodroom = new Song(directory, "bloodroom", bloodroomVolume); + dungeon = new Song(directory, "dungeon", dungeonVolume); + hub = new Song(directory, "hub", hubVolume); + island = new Song(directory, "island", hubVolume); + dungeonHub = new Song(directory, "dungeonhub", dungeonHubVolume); + farmingIslands = new Song(directory, "farmingislands", farmingIslandsVolume); + goldMine = new Song(directory, "goldmine", goldMineVolume); + deepCaverns = new Song(directory, "deepcaverns", deepCavernsVolume); + dwarvenMines = new Song(directory, "dwarvenmines", dwarvenMinesVolume); + crystalHollows = new Song(directory, "crystalhollows", crystalHollowsVolume); + spidersDen = new Song(directory, "spidersden", spidersDenVolume); + crimsonIsle = new Song(directory, "crimsonisle", crimsonIsleVolume); + end = new Song(directory, "end", endVolume); + park = new Song(directory, "park", parkVolume); } public static void reset() { if (dungeonboss != null) dungeonboss.stop(); if (bloodroom != null) bloodroom.stop(); if (dungeon != null) dungeon.stop(); + if (hub != null) hub.stop(); + if (island != null) island.stop(); + if (dungeonHub != null) dungeonHub.stop(); + if (farmingIslands != null) farmingIslands.stop(); + if (goldMine != null) goldMine.stop(); + if (deepCaverns != null) deepCaverns.stop(); + if (dwarvenMines != null) dwarvenMines.stop(); + if (crystalHollows != null) crystalHollows.stop(); + if (spidersDen != null) spidersDen.stop(); + if (crimsonIsle != null) crimsonIsle.stop(); + if (end != null) end.stop(); + if (park != null) park.stop(); } public static class Song { public Clip music; + private final List<File> playlist = new ArrayList<>(); + private int volume; - public Song(File file, int volume) throws IOException, UnsupportedAudioFileException, LineUnavailableException { - if (file.exists()) { - music = AudioSystem.getClip(); - AudioInputStream ais = AudioSystem.getAudioInputStream(file); - music.open(ais); - - setVolume(volume); + public Song(File directory, String songName, int volume) { + File[] files = directory.listFiles(); + if (files != null) { + for (File file : files) { + if (!file.isDirectory() && file.getName().matches(songName + "\\d*(?:\\.wav)?\\.wav")) { // .wav.wav moment + playlist.add(file); + System.out.println("Added " + file.getName() + " to " + songName + " playlist."); + } + } } + + this.volume = volume; } - public void start() { - reset(); - if (music != null) { - cancelNotes = true; - music.setMicrosecondPosition(0); - music.start(); - music.loop(Clip.LOOP_CONTINUOUSLY); + public void start() throws UnsupportedAudioFileException, LineUnavailableException, IOException { + + try { + if (music == null) music = AudioSystem.getClip(); + if (!music.isRunning()) { + reset(); + shuffle(); + setVolume(volume); + cancelNotes = true; + music.setMicrosecondPosition(0); + music.start(); + } + } catch (UnsupportedAudioFileException ex) { + ex.printStackTrace(); + + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + if (player != null) { + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Attempted to play non .wav file. Please use a .wav converter instead of renaming the file.")); + } } } public void stop() { cancelNotes = false; - if (music != null) music.stop(); + if (music != null) { + music.stop(); + if (music.isOpen()) music.close(); + } + } + + public void shuffle() throws LineUnavailableException, UnsupportedAudioFileException, IOException { + if (playlist.size() > 0) { + File file = playlist.get(new Random().nextInt(playlist.size())); + music = AudioSystem.getClip(); + AudioInputStream ais = AudioSystem.getAudioInputStream(file); + music.open(ais); + } } public boolean setVolume(int volume) { - EntityPlayer player = Minecraft.getMinecraft().thePlayer; - if (music == null) return false; + this.volume = volume; + if (playlist.size() < 1) return false; if (volume <= 0 || volume > 100) { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; if (player != null) player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "Volume can only be set between 0% and 100%.")); return false; } float decibels = (float) (20 * Math.log(volume / 100.0)); FloatControl control = (FloatControl) music.getControl(FloatControl.Type.MASTER_GAIN); - if (decibels <= control.getMinimum() || decibels >= control.getMaximum()) { - return false; - } - + if (decibels <= control.getMinimum() || decibels >= control.getMaximum()) return false; control.setValue(decibels); + return true; } diff --git a/src/main/java/me/Danker/features/DungeonScore.java b/src/main/java/me/Danker/features/DungeonScore.java new file mode 100644 index 0000000..588db8a --- /dev/null +++ b/src/main/java/me/Danker/features/DungeonScore.java @@ -0,0 +1,200 @@ +package me.Danker.features; + +import me.Danker.DankersSkyblockMod; +import me.Danker.commands.MoveCommand; +import me.Danker.commands.ScaleCommand; +import me.Danker.commands.ToggleCommand; +import me.Danker.events.RenderOverlayEvent; +import me.Danker.handlers.TextRenderer; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.network.NetworkPlayerInfo; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + +import java.util.Collection; + +public class DungeonScore { + + int failedPuzzles; + int deaths; + int skillScore; + String secrets; + int exploreScore; + int timeScore; + int bonusScore; + + @SubscribeEvent(receiveCanceled = true) + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!ToggleCommand.dungeonScore || !Utils.inDungeons) return; + + if (message.contains("PUZZLE FAIL! ") || message.contains("chose the wrong answer! I shall never forget this moment")) { + failedPuzzles++; + } + + if (message.contains(":")) return; + + if (message.contains(" and became a ghost.")) { + deaths++; + } + } + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + if (event.phase != TickEvent.Phase.START) return; + + if (!ToggleCommand.dungeonScore || !Utils.inDungeons) return; + + if (DankersSkyblockMod.tickAmount % 20 == 0) { + int missingPuzzles = 0; + double openedRooms = 0; + double completedRooms = 0; + double roomScore = 0; + double secretScore = 0; + + if (Minecraft.getMinecraft().getNetHandler() == null) return; + Collection<NetworkPlayerInfo> players = Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap(); + for (NetworkPlayerInfo player : players) { + if (player == null || player.getDisplayName() == null) continue; + String display = player.getDisplayName().getUnformattedText(); + + if (display.startsWith(" Opened Rooms: ")) { + openedRooms = Double.parseDouble(display.replaceAll("[^\\d]", "")); + } else if (display.startsWith(" Completed Rooms: ")) { + completedRooms = Double.parseDouble(display.replaceAll("[^\\d]", "")); + } else if (display.startsWith(" Secrets Found: ") && display.endsWith("%")) { + secrets = player.getDisplayName().getFormattedText(); + + double secretCount = Double.parseDouble(display.replaceAll("[^\\d.]", "")); + + switch (Utils.currentFloor) { + case F1: + secretScore = secretCount / 30D; + break; + case F2: + secretScore = secretCount / 40D; + break; + case F3: + secretScore = secretCount / 50D; + break; + case F4: + secretScore = secretCount / 60D; + break; + case F5: + secretScore = secretCount / 70D; + break; + case F6: + secretScore = secretCount / 85D; + break; + default: + secretScore = secretCount / 100D; + } + } else if (display.startsWith("Time Elapsed: ")) { + String timeText = display.substring(display.indexOf(":") + 2).replaceAll("\\s", ""); + int minutes = Integer.parseInt(timeText.substring(0, timeText.indexOf("m"))); + int seconds = Integer.parseInt(timeText.substring(timeText.indexOf("m") + 1, timeText.indexOf("s"))); + int time = minutes * 60 + seconds; + + if (Utils.currentFloor == Utils.DungeonFloor.F2) time -= 120; + + int base; + switch (Utils.currentFloor) { + case F1: + case F2: + case F3: + case F5: + base = 600; + break; + case F4: + case F6: + case F7: + base = 720; + break; + default: + base = 480; + } + + if (time <= base) { + timeScore = 100; + } else if (time <= base + 100) { + timeScore = (int) Math.ceil(100 - 0.1 * (time - base)); + } else if (time <= base + 500) { + timeScore = (int) Math.ceil(90 - 0.05 * (time - base - 100)); + } else if (time < base + 2600) { + timeScore = (int) Math.ceil(70 - (1/30D) * (time - base - 1100)); + } else { + timeScore = 0; + } + } else if (display.startsWith(" Crypts: ")) { + bonusScore = MathHelper.clamp_int(Integer.parseInt(display.replaceAll("[^\\d]", "")), 0, 5); + } else if (display.contains("[✦]")) { + missingPuzzles++; + } + } + + if (openedRooms != 0) { + roomScore = completedRooms / openedRooms; + } + + skillScore = MathHelper.clamp_int(100 - 14 * (failedPuzzles + missingPuzzles) - 2 * deaths, 0, 100); + exploreScore = (int) (60 * roomScore + 40 * MathHelper.clamp_double(secretScore, 0, 1)); + } + } + + @SubscribeEvent + public void renderPlayerInfo(RenderOverlayEvent event) { + if (ToggleCommand.dungeonScore && Utils.inDungeons) { + Minecraft mc = Minecraft.getMinecraft(); + + int totalScore = skillScore + exploreScore + timeScore + bonusScore; + String total; + if (totalScore >= 300) { + total = EnumChatFormatting.GOLD + "S+"; + } else if (totalScore >= 270) { + total = EnumChatFormatting.GOLD + "S"; + } else if (totalScore >= 230) { + total = EnumChatFormatting.DARK_PURPLE + "A"; + } else if (totalScore >= 160) { + total = EnumChatFormatting.GREEN + "B"; + } else if (totalScore >= 100) { + total = EnumChatFormatting.BLUE + "C"; + } else { + total = EnumChatFormatting.RED + "D"; + } + + String scoreText = secrets + "\n" + + EnumChatFormatting.GOLD + "Skill:\n" + + EnumChatFormatting.GOLD + "Explore:\n" + + EnumChatFormatting.GOLD + "Speed:\n" + + EnumChatFormatting.GOLD + "Bonus:\n" + + EnumChatFormatting.GOLD + "Total:"; + String score = "\n" + + EnumChatFormatting.GOLD + skillScore + "\n" + + EnumChatFormatting.GOLD + exploreScore + "\n" + + EnumChatFormatting.GOLD + timeScore + "\n" + + EnumChatFormatting.GOLD + bonusScore + "\n" + + EnumChatFormatting.GOLD + totalScore + EnumChatFormatting.GRAY + " (" + total + EnumChatFormatting.GRAY + ")"; + new TextRenderer(mc, scoreText, MoveCommand.dungeonScoreXY[0], MoveCommand.dungeonScoreXY[1], ScaleCommand.dungeonScoreScale); + new TextRenderer(mc, score, MoveCommand.dungeonScoreXY[0] + 80, MoveCommand.dungeonScoreXY[1], ScaleCommand.dungeonScoreScale); + } + } + + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + failedPuzzles = 0; + deaths = 0; + skillScore = 100; + secrets = ""; + exploreScore = 0; + timeScore = 100; + bonusScore = 0; + } + +} diff --git a/src/main/java/me/Danker/features/DungeonTimer.java b/src/main/java/me/Danker/features/DungeonTimer.java index 394f2de..9d363db 100644 --- a/src/main/java/me/Danker/features/DungeonTimer.java +++ b/src/main/java/me/Danker/features/DungeonTimer.java @@ -3,7 +3,7 @@ package me.Danker.features; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -56,7 +56,7 @@ public class DungeonTimer { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.dungeonTimerToggled && Utils.inDungeons) { Minecraft mc = Minecraft.getMinecraft(); String dungeonTimerText = EnumChatFormatting.GRAY + "Wither Doors:\n" + diff --git a/src/main/java/me/Danker/features/EndOfFarmAlert.java b/src/main/java/me/Danker/features/EndOfFarmAlert.java new file mode 100644 index 0000000..ecbf3ee --- /dev/null +++ b/src/main/java/me/Danker/features/EndOfFarmAlert.java @@ -0,0 +1,40 @@ +package me.Danker.features; + +import me.Danker.DankersSkyblockMod; +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + +public class EndOfFarmAlert { + + static boolean alerted = false; + public static double min = -78.5; + public static double max = 79.5; + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + if (event.phase != TickEvent.Phase.START) return; + + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + if (DankersSkyblockMod.tickAmount % 10 == 0) { + if (ToggleCommand.endOfFarmAlert && Utils.isInScoreboard("Your Island")) { + double x = player.posX; + double z = player.posZ; + + if (x <= min || x >= max || z <= min || z >= max) { + if (!alerted) { + alerted = true; + Utils.createTitle(EnumChatFormatting.RED + "END OF FARM", 1); + } + } else { + alerted = false; + } + } + } + } + +} diff --git a/src/main/java/me/Danker/features/GemstonesLore.java b/src/main/java/me/Danker/features/GemstonesLore.java new file mode 100644 index 0000000..c633c58 --- /dev/null +++ b/src/main/java/me/Danker/features/GemstonesLore.java @@ -0,0 +1,77 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.EnumChatFormatting; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +public class GemstonesLore { + + static Map<String, EnumChatFormatting> gemstoneColours = new HashMap<>(); + + public static void init() { + gemstoneColours.put("Amber", EnumChatFormatting.GOLD); + gemstoneColours.put("Sapphire", EnumChatFormatting.AQUA); + gemstoneColours.put("Jasper", EnumChatFormatting.LIGHT_PURPLE); + gemstoneColours.put("Amethyst", EnumChatFormatting.DARK_PURPLE); + gemstoneColours.put("Topaz", EnumChatFormatting.YELLOW); + gemstoneColours.put("Jade", EnumChatFormatting.GREEN); + gemstoneColours.put("Ruby", EnumChatFormatting.RED); + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onTooltip(ItemTooltipEvent event) { + if (!Utils.inSkyblock) return; + if (event.toolTip == null) return; + + ItemStack item = event.itemStack; + if (ToggleCommand.gemstoneLore) { + if (item.hasTagCompound()) { + NBTTagCompound tags = item.getSubCompound("ExtraAttributes", false); + if (tags != null) { + if (tags.hasKey("gems")) { + NBTTagCompound gems = tags.getCompoundTag("gems"); + Set<String> set = gems.getKeySet(); + + if (set.size() == 0) return; + + int index = Minecraft.getMinecraft().gameSettings.advancedItemTooltips ? 4 : 2; + + event.toolTip.add(event.toolTip.size() - index, ""); + event.toolTip.add(event.toolTip.size() - index, "Gemstones Applied:"); + + for (String gem : set) { + char last = gem.charAt(gem.length() - 1); + if (!Character.isDigit(last)) continue; + + String gemstone = " " + Utils.capitalizeString(gems.getString(gem)) + " "; + if (gem.startsWith("UNIVERSAL_") || gem.startsWith("MINING_") || gem.startsWith("COMBAT_") || gem.startsWith("DEFENSIVE_")) { + gemstone += Utils.capitalizeString(gems.getString(gem + "_gem")); + } else { + gemstone += Utils.capitalizeString(gem.substring(0, gem.indexOf("_"))); + } + + for (String colour : gemstoneColours.keySet()) { + if (gemstone.contains(colour)) { + gemstone = gemstoneColours.get(colour) + gemstone; + } + } + + event.toolTip.add(event.toolTip.size() - index, gemstone); + } + } + } + } + } + } + +} diff --git a/src/main/java/me/Danker/features/GiantHPDisplay.java b/src/main/java/me/Danker/features/GiantHPDisplay.java index 07378dd..4af31ae 100644 --- a/src/main/java/me/Danker/features/GiantHPDisplay.java +++ b/src/main/java/me/Danker/features/GiantHPDisplay.java @@ -1,8 +1,10 @@ package me.Danker.features; import me.Danker.DankersSkyblockMod; +import me.Danker.commands.MoveCommand; +import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.ScoreboardHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; @@ -56,7 +58,7 @@ public class GiantHPDisplay { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.giantHP && Utils.inDungeons && giants.size() > 0) { StringBuilder sb = new StringBuilder(); @@ -64,7 +66,7 @@ public class GiantHPDisplay { if (!giant.isDead) sb.append(Utils.removeBold(giant.getDisplayName().getFormattedText())).append("\n"); } - new TextRenderer(Minecraft.getMinecraft(), sb.toString(), 100, 100, 1); + new TextRenderer(Minecraft.getMinecraft(), sb.toString(), MoveCommand.giantHPXY[0], MoveCommand.giantHPXY[1], ScaleCommand.giantHPScale); } } diff --git a/src/main/java/me/Danker/features/GolemSpawningAlert.java b/src/main/java/me/Danker/features/GolemSpawningAlert.java index de5cb89..87af663 100644 --- a/src/main/java/me/Danker/features/GolemSpawningAlert.java +++ b/src/main/java/me/Danker/features/GolemSpawningAlert.java @@ -3,7 +3,7 @@ package me.Danker.features; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -37,7 +37,7 @@ public class GolemSpawningAlert { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.golemAlertToggled && Utils.inSkyblock && golemTime > System.currentTimeMillis() / 1000) { Minecraft mc = Minecraft.getMinecraft(); double scale = ScaleCommand.golemTimerScale; diff --git a/src/main/java/me/Danker/features/HidePlayerArmour.java b/src/main/java/me/Danker/features/HidePlayerArmour.java new file mode 100644 index 0000000..8cc47d0 --- /dev/null +++ b/src/main/java/me/Danker/features/HidePlayerArmour.java @@ -0,0 +1,51 @@ +package me.Danker.features; + +import me.Danker.commands.ToggleCommand; +import me.Danker.utils.Utils; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.event.RenderLivingEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.util.ArrayList; +import java.util.List; + +public class HidePlayerArmour { + + List<ItemStack> armour = new ArrayList<>(); + + @SubscribeEvent + public void onRenderLivingPre(RenderLivingEvent.Pre<EntityLivingBase> event) { + if (ToggleCommand.hideArmour && Utils.inSkyblock) { + if (event.entity instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.entity; + + for (int i = 0; i < player.inventory.armorInventory.length; i++) { + if (player.inventory.armorInventory[i] != null) { + armour.add(player.inventory.armorInventory[i].copy()); + player.inventory.armorInventory[i] = null; + } else { + armour.add(null); + } + } + } + } + } + + @SubscribeEvent + public void onRenderLivingPost(RenderLivingEvent.Post<EntityLivingBase> event) { + if (ToggleCommand.hideArmour && Utils.inSkyblock) { + if (event.entity instanceof EntityPlayer) { + EntityPlayer player = (EntityPlayer) event.entity; + + for (int i = 0; i < player.inventory.armorInventory.length; i++) { + player.inventory.armorInventory[i] = armour.get(i); + } + + armour.clear(); + } + } + } + +} diff --git a/src/main/java/me/Danker/features/HighlightSkeletonMasters.java b/src/main/java/me/Danker/features/HighlightSkeletonMasters.java index f97699c..72259db 100644 --- a/src/main/java/me/Danker/features/HighlightSkeletonMasters.java +++ b/src/main/java/me/Danker/features/HighlightSkeletonMasters.java @@ -1,6 +1,7 @@ package me.Danker.features; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -33,7 +34,7 @@ public class HighlightSkeletonMasters { if (ToggleCommand.highlightSkeletonMasters) { for (Entity skeletonMaster : skeletonMasters) { if (!skeletonMaster.isDead) - Utils.draw3DBox(skeletonMaster.getEntityBoundingBox(), SKELETON_MASTER_COLOUR, event.partialTicks); + RenderUtils.draw3DBox(skeletonMaster.getEntityBoundingBox(), SKELETON_MASTER_COLOUR, event.partialTicks); } skeletonMasters.clear(); } diff --git a/src/main/java/me/Danker/features/NecronNotifications.java b/src/main/java/me/Danker/features/NecronNotifications.java index d35996c..323e7f8 100644 --- a/src/main/java/me/Danker/features/NecronNotifications.java +++ b/src/main/java/me/Danker/features/NecronNotifications.java @@ -24,55 +24,58 @@ public class NecronNotifications { if (!Utils.inDungeons) return; - if (ToggleCommand.necronNotificationsToggled && message.contains("[BOSS] Necron:")) { + if (ToggleCommand.necronNotificationsToggled) { Minecraft mc = Minecraft.getMinecraft(); World world = mc.theWorld; - if (message.contains("You tricked me!") || message.contains("That beam, it hurts! IT HURTS!!")) { - Utils.createTitle(EnumChatFormatting.RED + "NECRON STUCK!", 2); - } else if (message.contains("STOP USING MY FACTORY AGAINST ME!") || message.contains("OOF") || message.contains("ANOTHER TRAP!! YOUR TRICKS ARE FUTILE!") || message.contains("SERIOUSLY? AGAIN?!") || message.contains("STOP!!!!!")) { - List<EntityArmorStand> necronLabels = world.getEntities(EntityArmorStand.class, (entity -> { - if (!entity.hasCustomName()) return false; - if (!entity.getCustomNameTag().contains("Necron")) return false; - return true; - })); - if (necronLabels.size() == 0) { - Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); - } else { - EntityArmorStand necron = necronLabels.get(0); - double x = necron.posX; - double z = necron.posZ; - BlockPos blockPos = new BlockPos(x, 168, z); + if (message.startsWith("[BOSS] Maxor:")) { + if (message.contains("THAT BEAM! IT HURTS! IT HURTS!!") || message.contains("YOU TRICKED ME!")) { + Utils.createTitle(EnumChatFormatting.RED + "MAXOR STUCK!", 2); + } + } else if (message.startsWith("[BOSS] Storm:")) { + if (message.contains("Ouch, that hurt!") || message.contains("Oof")) { + List<EntityArmorStand> stormLabels = world.getEntities(EntityArmorStand.class, (entity -> { + if (!entity.hasCustomName()) return false; + return entity.getCustomNameTag().contains("Storm"); + })); + if (stormLabels.size() == 0) { + Utils.createTitle(EnumChatFormatting.WHITE + "STORM STUNNED!", 2); + } else { + EntityArmorStand storm = stormLabels.get(0); + double x = storm.posX; + double z = storm.posZ; - IBlockState blockState = world.getBlockState(blockPos); - Block block = blockState.getBlock(); + BlockPos blockPos = new BlockPos(x, 168, z); - if (block != Blocks.stained_hardened_clay) { - Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); - } else { - switch (block.getDamageValue(world, blockPos)) { - case 4: - Utils.createTitle(EnumChatFormatting.YELLOW + "YELLOW PILLAR!", 2); - break; - case 5: - Utils.createTitle(EnumChatFormatting.DARK_GREEN + "GREEN PILLAR!", 2); - break; - case 11: - Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "PURPLE PILLAR!", 2); - break; - default: - Utils.createTitle(EnumChatFormatting.WHITE + "NECRON STUNNED!", 2); + IBlockState blockState = world.getBlockState(blockPos); + Block block = blockState.getBlock(); + + if (block != Blocks.stained_hardened_clay) { + Utils.createTitle(EnumChatFormatting.WHITE + "STORM STUNNED!", 2); + } else { + switch (block.getDamageValue(world, blockPos)) { + case 4: + Utils.createTitle(EnumChatFormatting.YELLOW + "YELLOW PILLAR!", 2); + break; + case 5: + Utils.createTitle(EnumChatFormatting.DARK_GREEN + "GREEN PILLAR!", 2); + break; + case 11: + Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "PURPLE PILLAR!", 2); + break; + default: + Utils.createTitle(EnumChatFormatting.WHITE + "STORM STUNNED!", 2); + } } - } + } + } else if (message.contains("I should have known that I stood no chance.")) { + Utils.createTitle(EnumChatFormatting.RED + "RED PILLAR!", 2); } - } else if (message.contains("I'VE HAD ENOUGH! YOU'RE NOT HITTING ME WITH ANY MORE PILLARS!")) { - Utils.createTitle(EnumChatFormatting.RED + "RED PILLAR!", 2); - } else if (message.contains("ARGH!")) { + } else if (message.startsWith("[BOSS] Necron:") && message.contains("ARGH!")) { Utils.createTitle(EnumChatFormatting.RED + "EXPLOSION OVER!", 2); } } - } } diff --git a/src/main/java/me/Danker/features/NoF3Coords.java b/src/main/java/me/Danker/features/NoF3Coords.java index 4f362e6..7dc304c 100644 --- a/src/main/java/me/Danker/features/NoF3Coords.java +++ b/src/main/java/me/Danker/features/NoF3Coords.java @@ -3,7 +3,7 @@ package me.Danker.features; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; @@ -14,7 +14,7 @@ public class NoF3Coords { public static String COORDS_COLOUR; @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { Minecraft mc = Minecraft.getMinecraft(); if (ToggleCommand.coordsToggled) { diff --git a/src/main/java/me/Danker/features/PetColours.java b/src/main/java/me/Danker/features/PetColours.java index 5889b12..7192f07 100644 --- a/src/main/java/me/Danker/features/PetColours.java +++ b/src/main/java/me/Danker/features/PetColours.java @@ -2,7 +2,7 @@ package me.Danker.features; import me.Danker.commands.ToggleCommand; import me.Danker.events.GuiChestBackgroundDrawnEvent; -import me.Danker.utils.Utils; +import me.Danker.utils.RenderUtils; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.util.StringUtils; @@ -37,30 +37,30 @@ public class PetColours { continue; int colour; int petLevel = Integer.parseInt(item.getDisplayName().substring(item.getDisplayName().indexOf(" ") + 1, item.getDisplayName().indexOf("]"))); - if (petLevel == 100) { + if (petLevel == 100 || petLevel == 200) { colour = PET_100; - } else if (petLevel >= 90) { + } else if ((petLevel < 100 && petLevel >= 90) || petLevel >= 190) { colour = PET_90_TO_99; - } else if (petLevel >= 80) { + } else if ((petLevel < 100 && petLevel >= 80) || petLevel >= 180) { colour = PET_80_TO_89; - } else if (petLevel >= 70) { + } else if ((petLevel < 100 && petLevel >= 70) || petLevel >= 170) { colour = PET_70_TO_79; - } else if (petLevel >= 60) { + } else if ((petLevel < 100 && petLevel >= 60) || petLevel >= 160) { colour = PET_60_TO_69; - } else if (petLevel >= 50) { + } else if ((petLevel < 100 && petLevel >= 50) || petLevel >= 150) { colour = PET_50_TO_59; - } else if (petLevel >= 40) { + } else if ((petLevel < 100 && petLevel >= 40) || petLevel >= 140) { colour = PET_40_TO_49; - } else if (petLevel >= 30) { + } else if ((petLevel < 100 && petLevel >= 30) || petLevel >= 130) { colour = PET_30_TO_39; - } else if (petLevel >= 20) { + } else if ((petLevel < 100 && petLevel >= 20) || petLevel >= 120) { colour = PET_20_TO_29; - } else if (petLevel >= 10) { + } else if ((petLevel < 100 && petLevel >= 10) || petLevel >= 110) { colour = PET_10_TO_19; } else { colour = PET_1_TO_9; } - Utils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, colour + 0xBF000000); + RenderUtils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, colour + 0xBF000000); } } } diff --git a/src/main/java/me/Danker/features/Skill50Display.java b/src/main/java/me/Danker/features/Skill50Display.java index 3b73cf9..7025ac5 100644 --- a/src/main/java/me/Danker/features/Skill50Display.java +++ b/src/main/java/me/Danker/features/Skill50Display.java @@ -1,12 +1,14 @@ package me.Danker.features; +import me.Danker.DankersSkyblockMod; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -30,8 +32,8 @@ public class Skill50Display { String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); for (String section : actionBarSections) { - if (section.contains("+") && section.contains("/") && section.contains("(")) { - if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) { + if (ToggleCommand.skill50DisplayToggled && section.contains("+") && section.contains("(") && section.contains(")") && !section.contains("Runecrafting")) { + if (section.contains("/")) { String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); int limit; @@ -43,13 +45,56 @@ public class Skill50Display { limit = 50; totalXp = 55172425; } - int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit); + + int nextLevelXp; + String nextLevelXpString = section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""); + if (nextLevelXpString.contains("k")) { + nextLevelXp = (int) (Double.parseDouble(nextLevelXpString.substring(0, nextLevelXpString.indexOf("k"))) * 1000); + } else { + nextLevelXp = Integer.parseInt(nextLevelXpString); + } + + int previousXp = Utils.getPastXpEarned(nextLevelXp, limit); double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D; NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); skillTimer = SKILL_TIME; showSkill = true; skillText = SKILL_50_COLOUR + xpGained + " (" + nf.format(currentXp + previousXp) + "/" + nf.format(totalXp) + ") " + percentage + "%"; + } else { + if (!Utils.skillsInitialized()) { + return; + } + + String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1); + double percentage = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("%"))); + int level = 1; + if (section.contains("Farming")) { + level = DankersSkyblockMod.farmingLevel; + } else if (section.contains("Mining")) { + level = DankersSkyblockMod.miningLevel; + } else if (section.contains("Combat")) { + level = DankersSkyblockMod.combatLevel; + } else if (section.contains("Foraging")) { + level = DankersSkyblockMod.foragingLevel; + } else if (section.contains("Fishing")) { + level = DankersSkyblockMod.fishingLevel; + } else if (section.contains("Enchanting")) { + level = DankersSkyblockMod.enchantingLevel; + } else if (section.contains("Alchemy")) { + level = DankersSkyblockMod.alchemyLevel; + } else if (section.contains("Carpentry")) { + level = DankersSkyblockMod.carpentryLevel; + } + + double currentXp = Utils.getTotalXpEarned(level, percentage); + int totalXp = section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining") || section.contains("Combat") ? 111672425 : 55172425; + double percentageTo50 = Math.floor((currentXp / totalXp) * 10000D) / 100D; + + NumberFormat nf = NumberFormat.getNumberInstance(Locale.US); + skillTimer = SKILL_TIME; + showSkill = true; + skillText = SKILL_50_COLOUR + xpGained + " (" + nf.format(currentXp) + "/" + nf.format(totalXp) + ") " + percentageTo50 + "%"; } } } @@ -68,7 +113,12 @@ public class Skill50Display { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { + if (!Utils.skillsInitialized() && Utils.inSkyblock) { + new TextRenderer(Minecraft.getMinecraft(), EnumChatFormatting.RED + "Please open the skill menu to use skill features. (/skills)", MoveCommand.skill50XY[0], MoveCommand.skill50XY[0], ScaleCommand.skill50Scale); + return; + } + if (showSkill) { new TextRenderer(Minecraft.getMinecraft(), skillText, MoveCommand.skill50XY[0], MoveCommand.skill50XY[1], ScaleCommand.skill50Scale); } diff --git a/src/main/java/me/Danker/features/SkillTracker.java b/src/main/java/me/Danker/features/SkillTracker.java index 60eb632..1c1005f 100644 --- a/src/main/java/me/Danker/features/SkillTracker.java +++ b/src/main/java/me/Danker/features/SkillTracker.java @@ -4,7 +4,7 @@ import me.Danker.DankersSkyblockMod; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -52,86 +52,127 @@ public class SkillTracker { String[] actionBarSections = event.message.getUnformattedText().split(" {3,}"); for (String section : actionBarSections) { - if (section.contains("+") && section.contains("/") && section.contains("(")) { - if (!section.contains("Runecrafting") && !section.contains("Carpentry")) { - if (ToggleCommand.autoSkillTrackerToggled && System.currentTimeMillis() / 1000 - timeSinceGained <= 2) { - if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { - skillStopwatch.resume(); - } else if (!skillStopwatch.isStarted()) { - skillStopwatch.start(); - } + if (section.contains("+") && section.contains("(") && section.contains(")") && !section.contains("Runecrafting") && !section.contains("Carpentry")) { + if (ToggleCommand.autoSkillTrackerToggled && System.currentTimeMillis() / 1000 - timeSinceGained <= 2) { + if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) { + skillStopwatch.resume(); + } else if (!skillStopwatch.isStarted()) { + skillStopwatch.start(); } - timeSinceGained = System.currentTimeMillis() / 1000; + } + timeSinceGained = System.currentTimeMillis() / 1000; + + String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" ")); + double totalXP; + if (section.contains("/")) { int limit = section.contains("Farming") || section.contains("Enchanting") || section.contains("Mining") || section.contains("Combat") ? 60 : 50; double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", "")); - int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")); + + int xpToLevelUp; + String nextLevelXpString = section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""); + if (nextLevelXpString.contains("k")) { + xpToLevelUp = (int) (Double.parseDouble(nextLevelXpString.substring(0, nextLevelXpString.indexOf("k"))) * 1000); + } else { + xpToLevelUp = Integer.parseInt(nextLevelXpString); + } + xpLeft = xpToLevelUp - currentXP; int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit); - double totalXP = currentXP + previousXP; - - String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" ")); - switch (skill) { - case "Farming": - lastSkill = "Farming"; - if (farmingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) farmingXPGained += totalXP - farmingXP; - } - farmingXP = totalXP; - break; - case "Mining": - lastSkill = "Mining"; - if (miningXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) miningXPGained += totalXP - miningXP; - } - miningXP = totalXP; - break; - case "Combat": - lastSkill = "Combat"; - if (combatXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) combatXPGained += totalXP - combatXP; - } - combatXP = totalXP; - break; - case "Foraging": - lastSkill = "Foraging"; - if (foragingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) foragingXPGained += totalXP - foragingXP; - } - foragingXP = totalXP; - break; - case "Fishing": - lastSkill = "Fishing"; - if (fishingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) fishingXPGained += totalXP - fishingXP; - } - fishingXP = totalXP; - break; - case "Enchanting": - lastSkill = "Enchanting"; - if (enchantingXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) enchantingXPGained += totalXP - enchantingXP; - } - enchantingXP = totalXP; - break; - case "Alchemy": - lastSkill = "Alchemy"; - if (alchemyXP != 0) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) alchemyXPGained += totalXP - alchemyXP; - } - alchemyXP = totalXP; - break; - default: - System.err.println("Unknown skill."); + totalXP = currentXP + previousXP; + } else { + if (!Utils.skillsInitialized()) { + return; } + + int level = 1; + if (section.contains("Farming")) { + level = DankersSkyblockMod.farmingLevel; + } else if (section.contains("Mining")) { + level = DankersSkyblockMod.miningLevel; + } else if (section.contains("Combat")) { + level = DankersSkyblockMod.combatLevel; + } else if (section.contains("Foraging")) { + level = DankersSkyblockMod.foragingLevel; + } else if (section.contains("Fishing")) { + level = DankersSkyblockMod.fishingLevel; + } else if (section.contains("Enchanting")) { + level = DankersSkyblockMod.enchantingLevel; + } else if (section.contains("Alchemy")) { + level = DankersSkyblockMod.alchemyLevel; + } else if (section.contains("Carpentry")) { + level = DankersSkyblockMod.carpentryLevel; + } + + totalXP = Utils.getTotalXpEarned(level, Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("%")))); + xpLeft = Utils.getTotalXpEarned(level + 1, 0) - totalXP; + } + + switch (skill) { + case "Farming": + lastSkill = "Farming"; + if (farmingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) farmingXPGained += totalXP - farmingXP; + } + farmingXP = totalXP; + break; + case "Mining": + lastSkill = "Mining"; + if (miningXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) miningXPGained += totalXP - miningXP; + } + miningXP = totalXP; + break; + case "Combat": + lastSkill = "Combat"; + if (combatXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) combatXPGained += totalXP - combatXP; + } + combatXP = totalXP; + break; + case "Foraging": + lastSkill = "Foraging"; + if (foragingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) foragingXPGained += totalXP - foragingXP; + } + foragingXP = totalXP; + break; + case "Fishing": + lastSkill = "Fishing"; + if (fishingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) fishingXPGained += totalXP - fishingXP; + } + fishingXP = totalXP; + break; + case "Enchanting": + lastSkill = "Enchanting"; + if (enchantingXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) enchantingXPGained += totalXP - enchantingXP; + } + enchantingXP = totalXP; + break; + case "Alchemy": + lastSkill = "Alchemy"; + if (alchemyXP != 0) { + if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) alchemyXPGained += totalXP - alchemyXP; + } + alchemyXP = totalXP; + break; + default: + System.err.println("Unknown skill."); } } } } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (showSkillTracker && Utils.inSkyblock) { + if (!Utils.skillsInitialized()) { + new TextRenderer(Minecraft.getMinecraft(), EnumChatFormatting.RED + "Please open the skill menu to use skill features. (/skills)", MoveCommand.skillTrackerXY[0], MoveCommand.skillTrackerXY[0], ScaleCommand.skillTrackerScale); + return; + } + int xpPerHour; double xpToShow = 0; switch (lastSkill) { @@ -196,12 +237,8 @@ public class SkillTracker { @SubscribeEvent public void onGuiOpen(GuiOpenEvent event) { - if (event.gui instanceof GuiChest) { - if (ToggleCommand.autoSkillTrackerToggled) { - if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) { - skillStopwatch.suspend(); - } - } + if (event.gui instanceof GuiChest && ToggleCommand.autoSkillTrackerToggled && skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) { + skillStopwatch.suspend(); } } diff --git a/src/main/java/me/Danker/features/SlayerESP.java b/src/main/java/me/Danker/features/SlayerESP.java index 522e696..b179979 100644 --- a/src/main/java/me/Danker/features/SlayerESP.java +++ b/src/main/java/me/Danker/features/SlayerESP.java @@ -3,6 +3,7 @@ package me.Danker.features; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; @@ -26,6 +27,7 @@ public class SlayerESP { static Entity zombie = null; static Entity spider = null; static Entity wolf = null; + static Entity enderman = null; static boolean slayerActive = false; static boolean slayerStarted = false; public static int SLAYER_COLOUR; @@ -35,6 +37,7 @@ public class SlayerESP { zombie = null; spider = null; wolf = null; + enderman = null; } @SubscribeEvent @@ -45,7 +48,7 @@ public class SlayerESP { World world = Minecraft.getMinecraft().theWorld; if (world == null) return; if (!slayerStarted) return; - if (zombie != null || spider != null || wolf != null) { + if (zombie != null || spider != null || wolf != null || enderman != null) { return; } slayerActive = true; @@ -66,8 +69,10 @@ public class SlayerESP { } else if (e.getName().contains("Sven Packmaster")) { wolf = e; return; + } else if (e.getName().contains("Voidgloom Seraph")) { + enderman = e; + return; } - } break; } @@ -88,6 +93,7 @@ public class SlayerESP { zombie = null; spider = null; wolf = null; + enderman = null; } } @@ -100,17 +106,22 @@ public class SlayerESP { if (slayerActive && ToggleCommand.highlightSlayers) { if (zombie != null) { AxisAlignedBB aabb = new AxisAlignedBB(zombie.posX - 0.5, zombie.posY - 2, zombie.posZ - 0.5, zombie.posX + 0.5, zombie.posY, zombie.posZ + 0.5); - Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); + RenderUtils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); return; } if (spider != null) { AxisAlignedBB aabb = new AxisAlignedBB(spider.posX - 0.75, spider.posY - 1, spider.posZ - 0.75, spider.posX + 0.75, spider.posY, spider.posZ + 0.75); - Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); + RenderUtils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); return; } if (wolf != null) { AxisAlignedBB aabb = new AxisAlignedBB(wolf.posX - 0.5, wolf.posY - 1, wolf.posZ - 0.5, wolf.posX + 0.5, wolf.posY, wolf.posZ + 0.5); - Utils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); + RenderUtils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); + return; + } + if (enderman != null) { + AxisAlignedBB aabb = new AxisAlignedBB(enderman.posX - 0.5, enderman.posY - 3, enderman.posZ - 0.5, enderman.posX + 0.5, enderman.posY, enderman.posZ + 0.5); + RenderUtils.draw3DBox(aabb, SLAYER_COLOUR, event.partialTicks); return; } } diff --git a/src/main/java/me/Danker/features/SpiritBootsFix.java b/src/main/java/me/Danker/features/SpiritBootsFix.java new file mode 100644 index 0000000..8530f17 --- /dev/null +++ b/src/main/java/me/Danker/features/SpiritBootsFix.java @@ -0,0 +1,32 @@ +package me.Danker.features; + +import me.Danker.events.PacketReadEvent; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.network.play.server.S04PacketEntityEquipment; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.relauncher.ReflectionHelper; + +import java.lang.reflect.Field; + +public class SpiritBootsFix { + + static Field slot = ReflectionHelper.findField(S04PacketEntityEquipment.class, "equipmentSlot", "field_149392_b", "b"); + + @SubscribeEvent + public void onPacketRead(PacketReadEvent event) throws IllegalAccessException { + if (Utils.inSkyblock && event.packet instanceof S04PacketEntityEquipment) { + EntityPlayer player = Minecraft.getMinecraft().thePlayer; + S04PacketEntityEquipment packet = (S04PacketEntityEquipment) event.packet; + + if (player == null || packet == null) return; + if (packet.getEntityID() == player.getEntityId()) { + slot.setAccessible(true); + slot.setInt(packet, slot.getInt(packet) + 1); + event.packet = packet; + } + } + } + +} diff --git a/src/main/java/me/Danker/features/TetherDisplay.java b/src/main/java/me/Danker/features/TetherDisplay.java index 363b90f..1af3a0f 100644 --- a/src/main/java/me/Danker/features/TetherDisplay.java +++ b/src/main/java/me/Danker/features/TetherDisplay.java @@ -4,7 +4,7 @@ import me.Danker.DankersSkyblockMod; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -45,7 +45,7 @@ public class TetherDisplay { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.teammatesInRadius && Utils.inDungeons) { String teammates; if (playersInRadius.size() > 0) { diff --git a/src/main/java/me/Danker/features/UpdateChecker.java b/src/main/java/me/Danker/features/UpdateChecker.java index 747fe91..7fe75b0 100644 --- a/src/main/java/me/Danker/features/UpdateChecker.java +++ b/src/main/java/me/Danker/features/UpdateChecker.java @@ -26,7 +26,7 @@ public class UpdateChecker { EntityPlayer player = Minecraft.getMinecraft().thePlayer; System.out.println("Checking for updates..."); - JsonObject latestRelease = APIHandler.getResponse("https://api.github.com/repos/bowser0000/SkyblockMod/releases/latest"); + JsonObject latestRelease = APIHandler.getResponse("https://api.github.com/repos/bowser0000/SkyblockMod/releases/latest", false); String latestTag = latestRelease.get("tag_name").getAsString(); DefaultArtifactVersion currentVersion = new DefaultArtifactVersion(DankersSkyblockMod.VERSION); diff --git a/src/main/java/me/Danker/features/loot/BlazeTracker.java b/src/main/java/me/Danker/features/loot/BlazeTracker.java new file mode 100644 index 0000000..896f65f --- /dev/null +++ b/src/main/java/me/Danker/features/loot/BlazeTracker.java @@ -0,0 +1,184 @@ +package me.Danker.features.loot; + +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class BlazeTracker { + + public static int demonlords; + public static int derelictAshes; + public static int lavatearRunes; + public static int splashPotions; + public static int magmaArrows; + public static int manaDisintegrators; + public static int scorchedBooks; + public static int kelvinInverters; + public static int blazeRodDistillates; + public static int glowstoneDistillates; + public static int magmaCreamDistillates; + public static int netherWartDistillates; + public static int gabagoolDistillates; + public static int scorchedPowerCrystals; + public static int fireAspectBooks; + public static int fieryBurstRunes; + public static int opalGems; + public static int archfiendDice; + public static int duplexBooks; + public static int highClassArchfiendDice; + public static int engineeringPlans; + public static int subzeroInverters; + public static double time; + public static int bosses; + + public static int demonlordsSession = 0; + public static int derelictAshesSession = 0; + public static int lavatearRunesSession = 0; + public static int splashPotionsSession = 0; + public static int magmaArrowsSession = 0; + public static int manaDisintegratorsSession = 0; + public static int scorchedBooksSession = 0; + public static int kelvinInvertersSession = 0; + public static int blazeRodDistillatesSession = 0; + public static int glowstoneDistillatesSession = 0; + public static int magmaCreamDistillatesSession = 0; + public static int netherWartDistillatesSession = 0; + public static int gabagoolDistillatesSession = 0; + public static int scorchedPowerCrystalsSession = 0; + public static int fireAspectBooksSession = 0; + public static int fieryBurstRunesSession = 0; + public static int opalGemsSession = 0; + public static int archfiendDiceSession = 0; + public static int duplexBooksSession = 0; + public static int highClassArchfiendDiceSession = 0; + public static int engineeringPlansSession = 0; + public static int subzeroInvertersSession = 0; + public static double timeSession = 0; + public static int bossesSession = 0; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + boolean rng = false; + + if (message.contains(" Blaze Slayer LVL ")) { + demonlords++; + demonlordsSession++; + if (bosses != -1) { + bosses++; + } + if (bossesSession != -1) { + bossesSession++; + } + ConfigHandler.writeIntConfig("blaze", "demonlords", demonlords); + ConfigHandler.writeIntConfig("blaze", "bossRNG", bosses); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Lavatears Rune I)")) { + lavatearRunes++; + lavatearRunesSession++; + ConfigHandler.writeIntConfig("blaze", "lavatearRunes", lavatearRunes); + } else if (message.contains("VERY RARE DROP! (Wisp's Ice-Flavored Water I Splash Potion)")) { + splashPotions++; + splashPotionsSession++; + ConfigHandler.writeIntConfig("blaze", "splashPotions", splashPotions); + } else if (message.contains("RARE DROP! (Bundle of Magma Arrows)")) { + magmaArrows++; + magmaArrowsSession++; + ConfigHandler.writeIntConfig("blaze", "magmaArrows", magmaArrows); + } else if (message.contains("VERY RARE DROP! (Mana Disintegrator)")) { + manaDisintegrators++; + manaDisintegratorsSession++; + ConfigHandler.writeIntConfig("blaze", "manaDisintegrators", manaDisintegrators); + } else if (message.contains("VERY RARE DROP! (Scorched Books)")) { + scorchedBooks++; + scorchedBooksSession++; + ConfigHandler.writeIntConfig("blaze", "scorchedBooks", scorchedBooks); + } else if (message.contains("VERY RARE DROP! (Kelvin Inverter)")) { + kelvinInverters++; + kelvinInvertersSession++; + ConfigHandler.writeIntConfig("blaze", "kelvinInverters", kelvinInverters); + } else if (message.contains("VERY RARE DROP! (Blaze Rod Distillate)")) { + blazeRodDistillates++; + blazeRodDistillatesSession++; + ConfigHandler.writeIntConfig("blaze", "blazeRodDistillates", blazeRodDistillates); + } else if (message.contains("VERY RARE DROP! (Glowstone Distillate)")) { + glowstoneDistillates++; + glowstoneDistillatesSession++; + ConfigHandler.writeIntConfig("blaze", "glowstoneDistillates", glowstoneDistillates); + } else if (message.contains("VERY RARE DROP! (Magma Cream Distillate)")) { + magmaCreamDistillates++; + magmaCreamDistillatesSession++; + ConfigHandler.writeIntConfig("blaze", "magmaCreamDistillates", magmaCreamDistillates); + } else if (message.contains("VERY RARE DROP! (Nether Wart Distillate)")) { + netherWartDistillates++; + netherWartDistillatesSession++; + ConfigHandler.writeIntConfig("blaze", "netherWartDistillates", netherWartDistillates); + } else if (message.contains("VERY RARE DROP! (Gabagool Distillate)")) { + gabagoolDistillates++; + gabagoolDistillatesSession++; + ConfigHandler.writeIntConfig("blaze", "gabagoolDistillates", gabagoolDistillates); + } else if (message.contains("VERY RARE DROP! (Scorched Power Crystal)")) { + scorchedPowerCrystals++; + scorchedPowerCrystalsSession++; + ConfigHandler.writeIntConfig("blaze", "scorchedPowerCrystals", scorchedPowerCrystals); + } else if (message.contains("VERY RARE DROP! (Fire Aspect III)")) { + fireAspectBooks++; + fireAspectBooksSession++; + ConfigHandler.writeIntConfig("blaze", "fireAspectBooks", fireAspectBooks); + } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Fiery Burst Rune I)")) { + rng = true; + fieryBurstRunes++; + fieryBurstRunesSession++; + ConfigHandler.writeIntConfig("blaze", "fieryBurstRunes", fieryBurstRunes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "FIERY BURST RUNE!", 5); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Flawed Opal Gemstone)")) { + opalGems++; + opalGemsSession++; + ConfigHandler.writeIntConfig("blaze", "opalGems", opalGems); + } else if (message.contains("VERY RARE DROP! (Archfiend Dice)")) { + archfiendDice++; + archfiendDiceSession++; + ConfigHandler.writeIntConfig("blaze", "archfiendDice", archfiendDice); + } else if (message.contains("VERY RARE DROP! (Duplex I)")) { + duplexBooks++; + duplexBooksSession++; + ConfigHandler.writeIntConfig("blaze", "duplexBooks", duplexBooks); + } else if (message.contains("CRAZY RARE DROP! (High Class Archfiend Dice)")) { + rng = true; + highClassArchfiendDice++; + highClassArchfiendDiceSession++; + ConfigHandler.writeIntConfig("blaze", "highClassArchfiendDice", highClassArchfiendDice); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "HIGH CLASS ARCHFIEND DICE!", 5); + } else if (message.contains("CRAZY RARE DROP! (Wilson's Engineering Plans)")) { + rng = true; + engineeringPlans++; + engineeringPlansSession++; + ConfigHandler.writeIntConfig("blaze", "engineeringPlans", engineeringPlans); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "ENGINEERING PLANS!", 5); + } else if (message.contains("CRAZY RARE DROP! (Subzero Inverter)")) { + rng = true; + subzeroInverters++; + subzeroInvertersSession++; + ConfigHandler.writeIntConfig("blaze", "subzeroInverters", subzeroInverters); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SUBZERO INVERTER!", 5); + } + + if (rng) { + time = System.currentTimeMillis() / 1000; + bosses = 0; + timeSession = System.currentTimeMillis() / 1000; + bossesSession = 0; + ConfigHandler.writeDoubleConfig("blaze", "timeRNG", time); + ConfigHandler.writeIntConfig("blaze", "bossRNG", 0); + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/CatacombsTracker.java b/src/main/java/me/Danker/features/loot/CatacombsTracker.java new file mode 100644 index 0000000..772b65c --- /dev/null +++ b/src/main/java/me/Danker/features/loot/CatacombsTracker.java @@ -0,0 +1,725 @@ +package me.Danker.features.loot; + +import me.Danker.events.ChestSlotClickedEvent; +import me.Danker.handlers.ConfigHandler; +import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.util.List; + +public class CatacombsTracker { + + // Catacombs Dungeons + public static int recombobulators; + public static int fumingPotatoBooks; + // F1 + public static int f1SPlus; + public static int bonzoStaffs; + public static double f1CoinsSpent; + public static double f1TimeSpent; + // F2 + public static int f2SPlus; + public static int scarfStudies; + public static int adaptiveSwords; + public static double f2CoinsSpent; + public static double f2TimeSpent; + // F3 + public static int f3SPlus; + public static int adaptiveHelms; + public static int adaptiveChests; + public static int adaptiveLegs; + public static int adaptiveBoots; + public static double f3CoinsSpent; + public static double f3TimeSpent; + // F4 + public static int f4SPlus; + public static int spiritWings; + public static int spiritBones; + public static int spiritBoots; + public static int spiritSwords; + public static int spiritBows; + public static int epicSpiritPets; + public static int legSpiritPets; + public static double f4CoinsSpent; + public static double f4TimeSpent; + // F5 + public static int f5SPlus; + public static int warpedStones; + public static int shadowAssHelms; + public static int shadowAssChests; + public static int shadowAssLegs; + public static int shadowAssBoots; + public static int lastBreaths; + public static int lividDaggers; + public static int shadowFurys; + public static double f5CoinsSpent; + public static double f5TimeSpent; + // F6 + public static int f6SPlus; + public static int ancientRoses; + public static int precursorEyes; + public static int giantsSwords; + public static int necroLordHelms; + public static int necroLordChests; + public static int necroLordLegs; + public static int necroLordBoots; + public static int necroSwords; + public static int f6Rerolls; + public static double f6CoinsSpent; + public static double f6TimeSpent; + // F7 + public static int f7SPlus; + public static int witherBloods; + public static int witherCloaks; + public static int implosions; + public static int witherShields; + public static int shadowWarps; + public static int necronsHandles; + public static int autoRecombs; + public static int witherHelms; + public static int witherChests; + public static int witherLegs; + public static int witherBoots; + public static int f7Rerolls; + public static double f7CoinsSpent; + public static double f7TimeSpent; + // MM + public static int m1S; + public static int m1SPlus; + public static int m2S; + public static int m2SPlus; + public static int m3S; + public static int m3SPlus; + public static int m4S; + public static int m4SPlus; + public static int m5S; + public static int m5SPlus; + public static int m6S; + public static int m6SPlus; + public static int m7S; + public static int m7SPlus; + public static int firstStars; + public static int secondStars; + public static int thirdStars; + public static int fourthStars; + public static int fifthStars; + public static int necronDyes; + public static int darkClaymores; + public static int masterRerolls; + public static double masterCoinsSpent; + public static double masterTimeSpent; + + // Catacombs Dungeons + public static int recombobulatorsSession = 0; + public static int fumingPotatoBooksSession = 0; + // F1 + public static int f1SPlusSession = 0; + public static int bonzoStaffsSession = 0; + public static double f1CoinsSpentSession = 0; + public static double f1TimeSpentSession = 0; + // F2 + public static int f2SPlusSession = 0; + public static int scarfStudiesSession = 0; + public static int adaptiveSwordsSession = 0; + public static double f2CoinsSpentSession = 0; + public static double f2TimeSpentSession = 0; + // F3 + public static int f3SPlusSession = 0; + public static int adaptiveHelmsSession = 0; + public static int adaptiveChestsSession = 0; + public static int adaptiveLegsSession = 0; + public static int adaptiveBootsSession = 0; + public static double f3CoinsSpentSession = 0; + public static double f3TimeSpentSession = 0; + // F4 + public static int f4SPlusSession = 0; + public static int spiritWingsSession = 0; + public static int spiritBonesSession = 0; + public static int spiritBootsSession = 0; + public static int spiritSwordsSession = 0; + public static int spiritBowsSession = 0; + public static int epicSpiritPetsSession = 0; + public static int legSpiritPetsSession = 0; + public static double f4CoinsSpentSession = 0; + public static double f4TimeSpentSession = 0; + // F5 + public static int f5SPlusSession = 0; + public static int warpedStonesSession = 0; + public static int shadowAssHelmsSession = 0; + public static int shadowAssChestsSession = 0; + public static int shadowAssLegsSession = 0; + public static int shadowAssBootsSession = 0; + public static int lastBreathsSession = 0; + public static int lividDaggersSession = 0; + public static int shadowFurysSession = 0; + public static double f5CoinsSpentSession = 0; + public static double f5TimeSpentSession = 0; + // F6 + public static int f6SPlusSession = 0; + public static int ancientRosesSession = 0; + public static int precursorEyesSession = 0; + public static int giantsSwordsSession = 0; + public static int necroLordHelmsSession = 0; + public static int necroLordChestsSession = 0; + public static int necroLordLegsSession = 0; + public static int necroLordBootsSession = 0; + public static int necroSwordsSession = 0; + public static int f6RerollsSession = 0; + public static double f6CoinsSpentSession = 0; + public static double f6TimeSpentSession = 0; + // F7 + public static int f7SPlusSession = 0; + public static int witherBloodsSession = 0; + public static int witherCloaksSession = 0; + public static int implosionsSession = 0; + public static int witherShieldsSession = 0; + public static int shadowWarpsSession = 0; + public static int necronsHandlesSession = 0; + public static int autoRecombsSession = 0; + public static int witherHelmsSession = 0; + public static int witherChestsSession = 0; + public static int witherLegsSession = 0; + public static int witherBootsSession = 0; + public static int f7RerollsSession = 0; + public static double f7CoinsSpentSession = 0; + public static double f7TimeSpentSession = 0; + // MM + public static int m1SSession = 0; + public static int m1SPlusSession = 0; + public static int m2SSession = 0; + public static int m2SPlusSession = 0; + public static int m3SSession = 0; + public static int m3SPlusSession = 0; + public static int m4SSession = 0; + public static int m4SPlusSession = 0; + public static int m5SSession = 0; + public static int m5SPlusSession = 0; + public static int m6SSession = 0; + public static int m6SPlusSession = 0; + public static int m7SSession = 0; + public static int m7SPlusSession = 0; + public static int firstStarsSession = 0; + public static int secondStarsSession = 0; + public static int thirdStarsSession = 0; + public static int fourthStarsSession = 0; + public static int fifthStarsSession = 0; + public static int necronDyesSession = 0; + public static int darkClaymoresSession = 0; + public static int masterRerollsSession = 0; + public static double masterCoinsSpentSession = 0; + public static double masterTimeSpentSession = 0; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inDungeons) return; + if (event.type == 2) return; + + if (message.contains(" Team Score: ")) { + if (message.contains("(S+)")) { + switch (Utils.currentFloor) { + case F1: + f1SPlus++; + f1SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorOneSPlus", f1SPlus); + break; + case F2: + f2SPlus++; + f2SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorTwoSPlus", f2SPlus); + break; + case F3: + f3SPlus++; + f3SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorThreeSPlus", f3SPlus); + break; + case F4: + f4SPlus++; + f4SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorFourSPlus", f4SPlus); + break; + case F5: + f5SPlus++; + f5SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorFiveSPlus", f5SPlus); + break; + case F6: + f6SPlus++; + f6SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorSixSPlus", f6SPlus); + break; + case F7: + f7SPlus++; + f7SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorSevenSPlus", f7SPlus); + break; + case M1: + m1S++; + m1SPlus++; + m1SSession++; + m1SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterOneS", m1S); + ConfigHandler.writeIntConfig("catacombs", "masterOneSPlus", m1SPlus); + break; + case M2: + m2S++; + m2SPlus++; + m2SSession++; + m2SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterTwoS", m2S); + ConfigHandler.writeIntConfig("catacombs", "masterTwoSPlus", m2SPlus); + break; + case M3: + m3S++; + m3SPlus++; + m3SSession++; + m3SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterThreeS", m3S); + ConfigHandler.writeIntConfig("catacombs", "masterThreeSPlus", m3SPlus); + break; + case M4: + m4S++; + m4SPlus++; + m4SSession++; + m4SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFourS", m4S); + ConfigHandler.writeIntConfig("catacombs", "masterFourSPlus", m4SPlus); + break; + case M5: + m5S++; + m5SPlus++; + m5SSession++; + m5SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFiveS", m5S); + ConfigHandler.writeIntConfig("catacombs", "masterFiveSPlus", m5SPlus); + break; + case M6: + m6S++; + m6SPlus++; + m6SSession++; + m6SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSixS", m6S); + ConfigHandler.writeIntConfig("catacombs", "masterSixSPlus", m6SPlus); + break; + case M7: + m7S++; + m7SPlus++; + m7SSession++; + m7SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSevenS", m7S); + ConfigHandler.writeIntConfig("catacombs", "masterSevenSPlus", m7SPlus); + break; + } + } else if (message.contains("(S)")) { + switch (Utils.currentFloor) { + case M1: + m1S++; + m1SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterOneS", m1S); + break; + case M2: + m2S++; + m2SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterTwoS", m2S); + break; + case M3: + m3S++; + m3SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterThreeS", m3S); + break; + case M4: + m4S++; + m4SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFourS", m4S); + break; + case M5: + m5S++; + m5SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFiveS", m5S); + break; + case M6: + m6S++; + m6SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSixS", m6S); + break; + case M7: + m7S++; + m7SSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSevenS", m7S); + break; + } + } + } + + if (message.contains(":")) return; + + if (message.contains(" ")) { + if (message.contains("Recombobulator 3000")) { + recombobulators++; + recombobulatorsSession++; + ConfigHandler.writeIntConfig("catacombs", "recombobulator", recombobulators); + } else if (message.contains("Fuming Potato Book")) { + fumingPotatoBooks++; + fumingPotatoBooksSession++; + ConfigHandler.writeIntConfig("catacombs", "fumingBooks", fumingPotatoBooks); + } else if (message.contains("Bonzo's Staff")) { // F1 + bonzoStaffs++; + bonzoStaffsSession++; + ConfigHandler.writeIntConfig("catacombs", "bonzoStaff", bonzoStaffs); + } else if (message.contains("Scarf's Studies")) { // F2 + scarfStudies++; + scarfStudiesSession++; + ConfigHandler.writeIntConfig("catacombs", "scarfStudies", scarfStudies); + } else if (message.contains("Adaptive Helmet")) { // F3 + adaptiveHelms++; + adaptiveHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveHelm", adaptiveHelms); + } else if (message.contains("Adaptive Chestplate")) { + adaptiveChests++; + adaptiveChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveChest", adaptiveChests); + } else if (message.contains("Adaptive Leggings")) { + adaptiveLegs++; + adaptiveLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveLegging", adaptiveLegs); + } else if (message.contains("Adaptive Boots")) { + adaptiveBoots++; + adaptiveBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveBoot", adaptiveBoots); + } else if (message.contains("Adaptive Blade")) { + adaptiveSwords++; + adaptiveSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "adaptiveSword", adaptiveSwords); + } else if (message.contains("Spirit Wing")) { // F4 + spiritWings++; + spiritWingsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritWing", spiritWings); + } else if (message.contains("Spirit Bone")) { + spiritBones++; + spiritBonesSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritBone", spiritBones); + } else if (message.contains("Spirit Boots")) { + spiritBoots++; + spiritBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritBoot", spiritBoots); + } else if (message.contains("[Lvl 1] Spirit")) { + String formattedMessage = event.message.getFormattedText(); + // Unicode colour code messes up here, just gonna remove the symbols + if (formattedMessage.contains("5Spirit")) { + epicSpiritPets++; + epicSpiritPetsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritPetEpic", epicSpiritPets); + } else if (formattedMessage.contains("6Spirit")) { + legSpiritPets++; + legSpiritPetsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", legSpiritPets); + } + } else if (message.contains("Spirit Sword")) { + spiritSwords++; + spiritSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritSword", spiritSwords); + } else if (message.contains("Spirit Bow")) { + spiritBows++; + spiritBowsSession++; + ConfigHandler.writeIntConfig("catacombs", "spiritBow", spiritBows); + } else if (message.contains("Warped Stone")) { // F5 + warpedStones++; + warpedStonesSession++; + ConfigHandler.writeIntConfig("catacombs", "warpedStone", warpedStones); + } else if (message.contains("Shadow Assassin Helmet")) { + shadowAssHelms++; + shadowAssHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinHelm", shadowAssHelms); + } else if (message.contains("Shadow Assassin Chestplate")) { + shadowAssChests++; + shadowAssChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinChest", shadowAssChests); + } else if (message.contains("Shadow Assassin Leggings")) { + shadowAssLegs++; + shadowAssLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinLegging", shadowAssLegs); + } else if (message.contains("Shadow Assassin Boots")) { + shadowAssBoots++; + shadowAssBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowAssassinBoot", shadowAssBoots); + } else if (message.contains("Livid Dagger")) { + lividDaggers++; + lividDaggersSession++; + ConfigHandler.writeIntConfig("catacombs", "lividDagger", lividDaggers); + } else if (message.contains("Shadow Fury")) { + shadowFurys++; + shadowFurysSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowFury", shadowFurys); + } else if (message.contains("Ancient Rose")) { // F6 + ancientRoses++; + ancientRosesSession++; + ConfigHandler.writeIntConfig("catacombs", "ancientRose", ancientRoses); + } else if (message.contains("Precursor Eye")) { + precursorEyes++; + precursorEyesSession++; + ConfigHandler.writeIntConfig("catacombs", "precursorEye", precursorEyes); + } else if (message.contains("Giant's Sword")) { + giantsSwords++; + giantsSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "giantsSword", giantsSwords); + } else if (message.contains("Necromancer Lord Helmet")) { + necroLordHelms++; + necroLordHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordHelm", necroLordHelms); + } else if (message.contains("Necromancer Lord Chestplate")) { + necroLordChests++; + necroLordChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordChest", necroLordChests); + } else if (message.contains("Necromancer Lord Leggings")) { + necroLordLegs++; + necroLordLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordLegging", necroLordLegs); + } else if (message.contains("Necromancer Lord Boots")) { + necroLordBoots++; + necroLordBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroLordBoot", necroLordBoots); + } else if (message.contains("Necromancer Sword")) { + necroSwords++; + necroSwordsSession++; + ConfigHandler.writeIntConfig("catacombs", "necroSword", necroSwords); + } else if (message.contains("Wither Blood")) { // F7 + witherBloods++; + witherBloodsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherBlood", witherBloods); + } else if (message.contains("Wither Cloak")) { + witherCloaks++; + witherCloaksSession++; + ConfigHandler.writeIntConfig("catacombs", "witherCloak", witherCloaks); + } else if (message.contains("Implosion")) { + implosions++; + implosionsSession++; + ConfigHandler.writeIntConfig("catacombs", "implosion", implosions); + } else if (message.contains("Wither Shield")) { + witherShields++; + witherShieldsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherShield", witherShields); + } else if (message.contains("Shadow Warp")) { + shadowWarps++; + shadowWarpsSession++; + ConfigHandler.writeIntConfig("catacombs", "shadowWarp", shadowWarps); + } else if (message.contains("Necron's Handle")) { + necronsHandles++; + necronsHandlesSession++; + ConfigHandler.writeIntConfig("catacombs", "necronsHandle", necronsHandles); + } else if (message.contains("Auto Recombobulator")) { + autoRecombs++; + autoRecombsSession++; + ConfigHandler.writeIntConfig("catacombs", "autoRecomb", autoRecombs); + } else if (message.contains("Wither Helmet")) { + witherHelms++; + witherHelmsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherHelm", witherHelms); + } else if (message.contains("Wither Chestplate")) { + witherChests++; + witherChestsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherChest", witherChests); + } else if (message.contains("Wither Leggings")) { + witherLegs++; + witherLegsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherLegging", witherLegs); + } else if (message.contains("Wither Boots")) { + witherBoots++; + witherBootsSession++; + ConfigHandler.writeIntConfig("catacombs", "witherBoot", witherBoots); + } else if (message.contains("First Master Star")) { + firstStars++; + firstStarsSession++; + ConfigHandler.writeIntConfig("catacombs", "firstStar", firstStars); + } else if (message.contains("Second Master Star")) { + secondStars++; + secondStarsSession++; + ConfigHandler.writeIntConfig("catacombs", "secondStar", secondStars); + } else if (message.contains("Third Master Star")) { + thirdStars++; + thirdStarsSession++; + ConfigHandler.writeIntConfig("catacombs", "thirdStar", thirdStars); + } else if (message.contains("Fourth Master Star")) { + fourthStars++; + fourthStarsSession++; + ConfigHandler.writeIntConfig("catacombs", "fourthStar", fourthStars); + } else if (message.contains("Fifth Master Star")) { + fifthStars++; + fifthStarsSession++; + ConfigHandler.writeIntConfig("catacombs", "fifthStar", fifthStars); + } else if (message.contains("Dark Claymore")) { + darkClaymores++; + darkClaymoresSession++; + ConfigHandler.writeIntConfig("catacombs", "darkClaymore", darkClaymores); + } else if (message.contains("Necron Dye")) { + necronDyes++; + necronDyesSession++; + ConfigHandler.writeIntConfig("catacombs", "necronDye", necronDyes); + } + } + + if (message.contains("EXTRA STATS ")) { + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + if (sCleaned.contains("Time Elapsed:")) { + // Get floor time + String time = sCleaned.substring(sCleaned.indexOf(":") + 2); + time = time.replaceAll("\\s", ""); + int minutes = Integer.parseInt(time.substring(0, time.indexOf("m"))); + int seconds = Integer.parseInt(time.substring(time.indexOf("m") + 1, time.indexOf("s"))); + int timeToAdd = (minutes * 60) + seconds; + + // Add time to floor + switch (Utils.currentFloor) { + case F1: + f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd); + f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent); + break; + case F2: + f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd); + f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent); + break; + case F3: + f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd); + f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent); + break; + case F4: + f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd); + f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent); + break; + case F5: + f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd); + f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent); + break; + case F6: + f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd); + f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent); + break; + case F7: + f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd); + f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterTimeSpent = Math.floor(masterTimeSpent + timeToAdd); + masterTimeSpentSession = Math.floor(masterTimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "masterTime", masterTimeSpent); + break; + } + } + } + } + } + + @SubscribeEvent + public void onSlotClick(ChestSlotClickedEvent event) { + if (!Utils.inDungeons) return; + + ItemStack item = event.item; + + if (event.inventoryName.endsWith(" Chest") && item != null) { + if (item.getDisplayName().contains("Open Reward Chest")) { + List<String> tooltip = item.getTooltip(Minecraft.getMinecraft().thePlayer, false); + for (String lineUnclean : tooltip) { + String line = StringUtils.stripControlCodes(lineUnclean); + if (line.contains(" Coins") && !line.contains("NOTE:")) { + int coinsSpent = Integer.parseInt(line.replaceAll("[^\\d]", "")); + + switch (Utils.currentFloor) { + case F1: + f1CoinsSpent += coinsSpent; + f1CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent); + break; + case F2: + f2CoinsSpent += coinsSpent; + f2CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent); + break; + case F3: + f3CoinsSpent += coinsSpent; + f3CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent); + break; + case F4: + f4CoinsSpent += coinsSpent; + f4CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent); + break; + case F5: + f5CoinsSpent += coinsSpent; + f5CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent); + break; + case F6: + f6CoinsSpent += coinsSpent; + f6CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent); + break; + case F7: + f7CoinsSpent += coinsSpent; + f7CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterCoinsSpent += coinsSpent; + masterCoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "masterCoins", masterCoinsSpent); + break; + } + break; + } + } + } else if (item.getDisplayName().contains("Reroll Chest")) { + switch (Utils.currentFloor) { + case F6: + f6Rerolls++; + f6RerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixRerolls", f6Rerolls); + break; + case F7: + f7Rerolls++; + f7RerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenRerolls", f7Rerolls); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterRerolls++; + masterRerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "masterRerolls", masterRerolls); + break; + } + } + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/EndermanTracker.java b/src/main/java/me/Danker/features/loot/EndermanTracker.java new file mode 100644 index 0000000..38b22f9 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/EndermanTracker.java @@ -0,0 +1,178 @@ +package me.Danker.features.loot; + +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class EndermanTracker { + + public static int endermanVoidglooms; + public static int endermanNullSpheres; + public static int endermanTAP; + public static int endermanTAPDrops; + public static int endermanEndersnakes; + public static int endermanSummoningEyes; + public static int endermanManaBooks; + public static int endermanTuners; + public static int endermanAtoms; + public static int endermanEspressoMachines; + public static int endermanSmartyBooks; + public static int endermanEndRunes; + public static int endermanChalices; + public static int endermanDice; + public static int endermanArtifacts; + public static int endermanSkins; + public static int endermanMergers; + public static int endermanCores; + public static int endermanEnchantRunes; + public static int endermanEnderBooks; + public static double endermanTime; + public static int endermanBosses; + + public static int endermanVoidgloomsSession = 0; + public static int endermanNullSpheresSession = 0; + public static int endermanTAPSession = 0; + public static int endermanTAPDropsSession = 0; + public static int endermanEndersnakesSession = 0; + public static int endermanSummoningEyesSession = 0; + public static int endermanManaBooksSession = 0; + public static int endermanTunersSession = 0; + public static int endermanAtomsSession = 0; + public static int endermanEspressoMachinesSession = 0; + public static int endermanSmartyBooksSession = 0; + public static int endermanEndRunesSession = 0; + public static int endermanChalicesSession = 0; + public static int endermanDiceSession = 0; + public static int endermanArtifactsSession = 0; + public static int endermanSkinsSession = 0; + public static int endermanMergersSession = 0; + public static int endermanCoresSession = 0; + public static int endermanEnchantRunesSession = 0; + public static int endermanEnderBooksSession = 0; + public static double endermanTimeSession = -1; + public static int endermanBossesSession = -1; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + boolean rng = false; + + if (message.contains(" Enderman Slayer LVL ")) { + endermanVoidglooms++; + endermanVoidgloomsSession++; + if (endermanBosses != -1) { + endermanBosses++; + } + if (endermanBossesSession != -1) { + endermanBossesSession++; + } + ConfigHandler.writeIntConfig("enderman", "voidglooms", endermanVoidglooms); + ConfigHandler.writeIntConfig("enderman", "bossRNG", endermanBosses); + } else if (message.contains("RARE DROP! (") && message.contains("Twilight Arrow Poison)")) { + int amount = LootTracker.getAmountfromMessage(message); + endermanTAP += amount; + endermanTAPSession += amount; + endermanTAPDrops++; + endermanTAPDropsSession++; + ConfigHandler.writeIntConfig("enderman", "tap", endermanTAP); + ConfigHandler.writeIntConfig("enderman", "tapDrops", endermanTAPDrops); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Endersnake Rune I)")) { + endermanEndersnakes++; + endermanEndersnakesSession++; + ConfigHandler.writeIntConfig("enderman", "endersnakes", endermanEndersnakes); + } else if (message.contains("VERY RARE DROP! (Summoning Eye)")) { + endermanSummoningEyes++; + endermanSummoningEyesSession++; + ConfigHandler.writeIntConfig("enderman", "summoningEyes", endermanSummoningEyes); + } else if (message.contains("VERY RARE DROP! (Mana Steal I)")) { + endermanManaBooks++; + endermanManaBooksSession++; + ConfigHandler.writeIntConfig("enderman", "manaBooks", endermanManaBooks); + } else if (message.contains("VERY RARE DROP! (Transmission Tuner)")) { + endermanTuners++; + endermanTunersSession++; + ConfigHandler.writeIntConfig("enderman", "tuners", endermanTuners); + } else if (message.contains("VERY RARE DROP! (Null Atom)")) { + endermanAtoms++; + endermanAtomsSession++; + ConfigHandler.writeIntConfig("enderman", "atoms", endermanAtoms); + } else if (message.contains("CRAZY RARE DROP! (Pocket Espresso Machine)")) { + rng = true; + endermanEspressoMachines++; + endermanEspressoMachinesSession++; + ConfigHandler.writeIntConfig("enderman", "espressoMachines", endermanEspressoMachines); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "POCKET ESPRESSO MACHINE!", 3); + } else if (message.contains("VERY RARE DROP! (Smarty Pants I)")) { + endermanSmartyBooks++; + endermanSmartyBooksSession++; + ConfigHandler.writeIntConfig("enderman", "smartyBooks", endermanSmartyBooks); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" End Rune I)")) { + endermanEndRunes++; + endermanEndRunesSession++; + ConfigHandler.writeIntConfig("enderman", "endRunes", endermanEndRunes); + } else if (message.contains("CRAZY RARE DROP! (Handy Blood Chalice)")) { + rng = true; + endermanChalices++; + endermanChalicesSession++; + ConfigHandler.writeIntConfig("enderman", "chalices", endermanChalices); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "HANDY BLOOD CHALICE!", 3); + } else if (message.contains("VERY RARE DROP! (Sinful Dice)")) { + endermanDice++; + endermanDiceSession++; + ConfigHandler.writeIntConfig("enderman", "dice", endermanDice); + } else if (message.contains("CRAZY RARE DROP! (Exceedingly Rare Ender Artifact Upgrader)")) { + rng = true; + endermanArtifacts++; + endermanArtifactsSession++; + ConfigHandler.writeIntConfig("enderman", "artifacts", endermanArtifacts); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "ENDER ARTIFACT UPGRADER!", 3); + } else if (message.contains("CRAZY RARE DROP! (Void Conqueror Enderman Skin)")) { + rng = true; + endermanSkins++; + endermanSkinsSession++; + ConfigHandler.writeIntConfig("enderman", "skins", endermanSkins); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "ENDERMAN SKIN!", 3); + } else if (message.contains("VERY RARE DROP! (Etherwarp Merger)")) { + endermanMergers++; + endermanMergersSession++; + ConfigHandler.writeIntConfig("enderman", "mergers", endermanMergers); + } else if (message.contains("CRAZY RARE DROP! (Judgement Core)")) { + rng = true; + endermanCores++; + endermanCoresSession++; + ConfigHandler.writeIntConfig("enderman", "cores", endermanCores); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "JUDGEMENT CORE!", 5); + } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Enchant Rune I)")) { + rng = true; + endermanEnchantRunes++; + endermanEnchantRunesSession++; + ConfigHandler.writeIntConfig("enderman", "enchantRunes", endermanEnchantRunes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GRAY + "ENCHANT RUNE!", 3); + } else if (message.contains("INSANE DROP! (Ender Slayer VII)") || message.contains("CRAZY RARE DROP! (Ender Slayer VII)")) { + rng = true; + endermanEnderBooks++; + endermanEnderBooksSession++; + ConfigHandler.writeIntConfig("enderman", "enderBooks", endermanEnderBooks); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "ENDER SLAYER VII!", 3); + } + + if (rng) { + endermanTime = System.currentTimeMillis() / 1000; + endermanBosses = 0; + endermanTimeSession = System.currentTimeMillis() / 1000; + endermanBossesSession = 0; + ConfigHandler.writeDoubleConfig("enderman", "timeRNG", endermanTime); + ConfigHandler.writeIntConfig("enderman", "bossRNG", 0); + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/FishingTracker.java b/src/main/java/me/Danker/features/loot/FishingTracker.java new file mode 100644 index 0000000..95a9040 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/FishingTracker.java @@ -0,0 +1,413 @@ +package me.Danker.features.loot; + +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class FishingTracker { + + // Fishing + public static int seaCreatures; + public static int goodCatches; + public static int greatCatches; + public static int squids; + public static int seaWalkers; + public static int nightSquids; + public static int seaGuardians; + public static int seaWitches; + public static int seaArchers; + public static int monsterOfTheDeeps; + public static int catfishes; + public static int carrotKings; + public static int seaLeeches; + public static int guardianDefenders; + public static int deepSeaProtectors; + public static int hydras; + public static int seaEmperors; + public static double empTime; + public static int empSCs; + public static int fishingMilestone; + // Fishing Winter + public static int frozenSteves; + public static int frostyTheSnowmans; + public static int grinches; + public static int yetis; + public static double yetiTime; + public static int yetiSCs; + // Fishing Festival + public static int nurseSharks; + 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; + // CH Fishing + public static int waterWorms; + public static int poisonedWaterWorms; + public static int flamingWorms; + 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; + public static int goodCatchesSession = 0; + public static int greatCatchesSession = 0; + public static int squidsSession = 0; + public static int seaWalkersSession = 0; + public static int nightSquidsSession = 0; + public static int seaGuardiansSession = 0; + public static int seaWitchesSession = 0; + public static int seaArchersSession = 0; + public static int monsterOfTheDeepsSession = 0; + public static int catfishesSession = 0; + public static int carrotKingsSession = 0; + public static int seaLeechesSession = 0; + public static int guardianDefendersSession = 0; + public static int deepSeaProtectorsSession = 0; + public static int hydrasSession = 0; + public static int seaEmperorsSession = 0; + public static double empTimeSession = -1; + public static int empSCsSession = -1; + public static int fishingMilestoneSession = 0; + // Fishing Winter + public static int frozenStevesSession = 0; + public static int frostyTheSnowmansSession = 0; + public static int grinchesSession = 0; + public static int yetisSession = 0; + public static double yetiTimeSession = -1; + public static int yetiSCsSession = -1; + // Fishing Festival + public static int nurseSharksSession = 0; + 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; + // CH Fishing + public static int waterWormsSession = 0; + public static int poisonedWaterWormsSession = 0; + public static int flamingWormsSession = 0; + 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) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + if (message.contains("GOOD CATCH!")) { + goodCatches++; + goodCatchesSession++; + ConfigHandler.writeIntConfig("fishing", "goodCatch", goodCatches); + } else if (message.contains("GREAT CATCH!")) { + greatCatches++; + greatCatchesSession++; + ConfigHandler.writeIntConfig("fishing", "greatCatch", greatCatches); + } else if (message.contains("A Squid appeared")) { + squids++; + squidsSession++; + ConfigHandler.writeIntConfig("fishing", "squid", squids); + increaseSeaCreatures(); + } else if (message.contains("You caught a Sea Walker")) { + seaWalkers++; + seaWalkersSession++; + ConfigHandler.writeIntConfig("fishing", "seaWalker", seaWalkers); + increaseSeaCreatures(); + } else if (message.contains("Pitch darkness reveals a Night Squid")) { + nightSquids++; + nightSquidsSession++; + ConfigHandler.writeIntConfig("fishing", "nightSquid", nightSquids); + increaseSeaCreatures(); + } else if (message.contains("You stumbled upon a Sea Guardian")) { + seaGuardians++; + seaGuardiansSession++; + ConfigHandler.writeIntConfig("fishing", "seaGuardian", seaGuardians); + increaseSeaCreatures(); + } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) { + seaWitches++; + seaWitchesSession++; + ConfigHandler.writeIntConfig("fishing", "seaWitch", seaWitches); + increaseSeaCreatures(); + } else if (message.contains("You reeled in a Sea Archer")) { + seaArchers++; + seaArchersSession++; + ConfigHandler.writeIntConfig("fishing", "seaArcher", seaArchers); + increaseSeaCreatures(); + } else if (message.contains("The Monster of the Deep has emerged")) { + monsterOfTheDeeps++; + monsterOfTheDeepsSession++; + ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", monsterOfTheDeeps); + increaseSeaCreatures(); + } else if (message.contains("Huh? A Catfish")) { + catfishes++; + catfishesSession++; + ConfigHandler.writeIntConfig("fishing", "catfish", catfishes); + increaseSeaCreatures(); + } else if (message.contains("Is this even a fish? It's the Carrot King")) { + carrotKings++; + carrotKingsSession++; + ConfigHandler.writeIntConfig("fishing", "carrotKing", carrotKings); + increaseSeaCreatures(); + } else if (message.contains("Gross! A Sea Leech")) { + seaLeeches++; + seaLeechesSession++; + ConfigHandler.writeIntConfig("fishing", "seaLeech", seaLeeches); + increaseSeaCreatures(); + } else if (message.contains("You've discovered a Guardian Defender of the sea")) { + guardianDefenders++; + guardianDefendersSession++; + ConfigHandler.writeIntConfig("fishing", "guardianDefender", guardianDefenders); + increaseSeaCreatures(); + } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) { + deepSeaProtectors++; + deepSeaProtectorsSession++; + ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", deepSeaProtectors); + increaseSeaCreatures(); + } else if (message.contains("The Water Hydra has come to test your strength")) { + hydras++; + hydrasSession++; + ConfigHandler.writeIntConfig("fishing", "hydra", hydras); + increaseSeaCreatures(); + } else if (message.contains("The Sea Emperor arises from the depths")) { + increaseSeaCreatures(); + + seaEmperors++; + empTime = System.currentTimeMillis() / 1000; + empSCs = 0; + seaEmperorsSession++; + empTimeSession = System.currentTimeMillis() / 1000; + empSCsSession = 0; + ConfigHandler.writeIntConfig("fishing", "seaEmperor", seaEmperors); + ConfigHandler.writeDoubleConfig("fishing", "empTime", empTime); + ConfigHandler.writeIntConfig("fishing", "empSC", empSCs); + } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter + frozenSteves++; + frozenStevesSession++; + ConfigHandler.writeIntConfig("fishing", "frozenSteve", frozenSteves); + increaseSeaCreatures(); + } else if (message.contains("It's a snowman! He looks harmless")) { + frostyTheSnowmans++; + frostyTheSnowmansSession++; + ConfigHandler.writeIntConfig("fishing", "snowman", frostyTheSnowmans); + increaseSeaCreatures(); + } else if (message.contains("stole Jerry's Gifts...get them back")) { + grinches++; + grinchesSession++; + ConfigHandler.writeIntConfig("fishing", "grinch", grinches); + increaseSeaCreatures(); + } else if (message.contains("What is this creature")) { + yetis++; + yetiTime = System.currentTimeMillis() / 1000; + yetiSCs = 0; + yetisSession++; + yetiTimeSession = System.currentTimeMillis() / 1000; + yetiSCsSession = 0; + ConfigHandler.writeIntConfig("fishing", "yeti", yetis); + ConfigHandler.writeDoubleConfig("fishing", "yetiTime", yetiTime); + ConfigHandler.writeIntConfig("fishing", "yetiSC", yetiSCs); + increaseSeaCreatures(); + } else if (message.contains("A tiny fin emerges from the water, you've caught a Nurse Shark")) { // Fishing Festival + nurseSharks++; + nurseSharksSession++; + ConfigHandler.writeIntConfig("fishing", "nurseShark", nurseSharks); + increaseSeaCreatures(); + } else if (message.contains("You spot a fin as blue as the water it came from, it's a Blue Shark")) { + blueSharks++; + blueSharksSession++; + ConfigHandler.writeIntConfig("fishing", "blueShark", blueSharks); + increaseSeaCreatures(); + } else if (message.contains("A striped beast bounds from the depths, the wild Tiger Shark")) { + tigerSharks++; + tigerSharksSession++; + ConfigHandler.writeIntConfig("fishing", "tigerShark", tigerSharks); + increaseSeaCreatures(); + } else if (message.contains("Hide no longer, a Great White Shark has tracked your scent and thirsts for your blood")) { + greatWhiteSharks++; + greatWhiteSharksSession++; + ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", greatWhiteSharks); + increaseSeaCreatures(); + } else if (message.contains("Phew! It's only a Scarecrow")) { + scarecrows++; + scarecrowsSession++; + ConfigHandler.writeIntConfig("fishing", "scarecrow", scarecrows); + increaseSeaCreatures(); + } else if (message.contains("You hear trotting from beneath the waves, you caught a Nightmare")) { + nightmares++; + nightmaresSession++; + ConfigHandler.writeIntConfig("fishing", "nightmare", nightmares); + increaseSeaCreatures(); + } else if (message.contains("It must be a full moon, a Werewolf appears")) { + werewolfs++; + werewolfsSession++; + ConfigHandler.writeIntConfig("fishing", "werewolf", werewolfs); + increaseSeaCreatures(); + } else if (message.contains("The spirit of a long lost Phantom Fisher has come to haunt you")) { + phantomFishers++; + phantomFishersSession++; + ConfigHandler.writeIntConfig("fishing", "phantomFisher", phantomFishers); + increaseSeaCreatures(); + } else if (message.contains("This can't be! The manifestation of death himself")) { + grimReapers++; + grimReapersSession++; + ConfigHandler.writeIntConfig("fishing", "grimReaper", grimReapers); + increaseSeaCreatures(); + } else if (message.contains("A Water Worm surfaces")) { + waterWorms++; + waterWormsSession++; + ConfigHandler.writeIntConfig("fishing", "waterWorm", waterWorms); + increaseSeaCreatures(); + } else if (message.contains("A Poisoned Water Worm surfaces")) { + poisonedWaterWorms++; + poisonedWaterWormsSession++; + ConfigHandler.writeIntConfig("fishing", "poisonedWaterWorm", poisonedWaterWorms); + increaseSeaCreatures(); + } else if (message.contains("A flaming worm surfaces from the depths")) { + flamingWorms++; + flamingWormsSession++; + ConfigHandler.writeIntConfig("fishing", "flamingWorm", flamingWorms); + increaseSeaCreatures(); + } else if (message.contains("A Lava Blaze has surfaced from the depths")) { + lavaBlazes++; + lavaBlazesSession++; + ConfigHandler.writeIntConfig("fishing", "lavaBlaze", lavaBlazes); + increaseSeaCreatures(); + } else if (message.contains("A Lava Pigman arose from the depths")) { + lavaPigmen++; + lavaPigmenSession++; + ConfigHandler.writeIntConfig("fishing", "lavaPigman", lavaPigmen); + increaseSeaCreatures(); + } else if (message.contains("A Zombie Miner surfaces")) { + zombieMiners++; + 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() { + // Only increment Yetis when in Jerry's Workshop + if (Utils.isInScoreboard("Jerry's Workshop") || Utils.isInScoreboard("Jerry Pond")) { + if (yetiSCs != -1) { + yetiSCs++; + } + 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++; + fishingMilestone++; + seaCreaturesSession++; + fishingMilestoneSession++; + ConfigHandler.writeIntConfig("fishing", "seaCreature", seaCreatures); + 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/GhostTracker.java b/src/main/java/me/Danker/features/loot/GhostTracker.java new file mode 100644 index 0000000..f402823 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/GhostTracker.java @@ -0,0 +1,60 @@ +package me.Danker.features.loot; + +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class GhostTracker { + + public static int sorrows = 0; + public static int bagOfCashs = 0; + public static int voltas = 0; + public static int plasmas = 0; + public static int ghostlyBoots = 0; + + public static int sorrowSession = 0; + public static int bagOfCashSession = 0; + public static int voltaSession = 0; + public static int plasmaSession = 0; + public static int ghostlyBootsSession = 0; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + if (message.contains("RARE DROP!")) { + if (message.contains("Sorrow")) { + sorrows++; + sorrowSession++; + ConfigHandler.writeIntConfig("ghosts", "sorrow", sorrows); + } + if (message.contains("Volta")) { + voltas++; + voltaSession++; + ConfigHandler.writeIntConfig("ghosts", "volta", voltas); + } + if (message.contains("Plasma")) { + plasmas++; + plasmaSession++; + ConfigHandler.writeIntConfig("ghosts", "plasma", plasmas); + } + if (message.contains("Ghostly Boots")) { + ghostlyBoots++; + ghostlyBootsSession++; + ConfigHandler.writeIntConfig("ghosts", "ghostlyBoots", ghostlyBoots); + } + if (message.contains("The ghost's death materialized ")) { + bagOfCashs++; + bagOfCashSession++; + ConfigHandler.writeIntConfig("ghosts", "bagOfCash", bagOfCashs); + } + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/LootDisplay.java b/src/main/java/me/Danker/features/loot/LootDisplay.java index cd34da7..e1ddcb0 100644 --- a/src/main/java/me/Danker/features/loot/LootDisplay.java +++ b/src/main/java/me/Danker/features/loot/LootDisplay.java @@ -3,7 +3,7 @@ package me.Danker.features.loot; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; @@ -20,7 +20,7 @@ public class LootDisplay { public static boolean auto; @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (!display.equals("off")) { Minecraft mc = Minecraft.getMinecraft(); String dropsText = ""; @@ -30,25 +30,27 @@ public class LootDisplay { String timeBetween; String bossesBetween; String drop20; + String runs; + String runsCount; double timeNow = System.currentTimeMillis() / 1000; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); switch (display) { case "wolf": - if (LootTracker.wolfTime == -1) { + if (WolfTracker.wolfTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.wolfTime, timeNow); + timeBetween = Utils.getTimeBetween(WolfTracker.wolfTime, timeNow); } - if (LootTracker.wolfBosses == -1) { + if (WolfTracker.wolfBosses == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.wolfBosses); + bossesBetween = nf.format(WolfTracker.wolfBosses); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.wolfWheels); + drop20 = nf.format(WolfTracker.wolfWheels); } else { - drop20 = nf.format(LootTracker.wolfWheelsDrops) + " times"; + drop20 = nf.format(WolfTracker.wolfWheelsDrops) + " times"; } dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + @@ -62,33 +64,33 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + EnumChatFormatting.AQUA + "Time Since RNG:\n" + EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.wolfSvens) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.wolfTeeth) + "\n" + + countText = EnumChatFormatting.GOLD + nf.format(WolfTracker.wolfSvens) + "\n" + + EnumChatFormatting.GREEN + nf.format(WolfTracker.wolfTeeth) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootTracker.wolfSpirits + "\n" + - EnumChatFormatting.WHITE + LootTracker.wolfBooks + "\n" + - EnumChatFormatting.DARK_RED + LootTracker.wolfEggs + "\n" + - EnumChatFormatting.GOLD + LootTracker.wolfCoutures + "\n" + - EnumChatFormatting.AQUA + LootTracker.wolfBaits + "\n" + - EnumChatFormatting.DARK_PURPLE + LootTracker.wolfFluxes + "\n" + + EnumChatFormatting.AQUA + WolfTracker.wolfSpirits + "\n" + + EnumChatFormatting.WHITE + WolfTracker.wolfBooks + "\n" + + EnumChatFormatting.DARK_RED + WolfTracker.wolfEggs + "\n" + + EnumChatFormatting.GOLD + WolfTracker.wolfCoutures + "\n" + + EnumChatFormatting.AQUA + WolfTracker.wolfBaits + "\n" + + EnumChatFormatting.DARK_PURPLE + WolfTracker.wolfFluxes + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "wolf_session": - if (LootTracker.wolfTimeSession == -1) { + if (WolfTracker.wolfTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.wolfTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(WolfTracker.wolfTimeSession, timeNow); } - if (LootTracker.wolfBossesSession == -1) { + if (WolfTracker.wolfBossesSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.wolfBossesSession); + bossesBetween = nf.format(WolfTracker.wolfBossesSession); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.wolfWheelsSession); + drop20 = nf.format(WolfTracker.wolfWheelsSession); } else { - drop20 = nf.format(LootTracker.wolfWheelsDropsSession) + " times"; + drop20 = nf.format(WolfTracker.wolfWheelsDropsSession) + " times"; } dropsText = EnumChatFormatting.GOLD + "Svens Killed:\n" + @@ -102,33 +104,33 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Overfluxes:\n" + EnumChatFormatting.AQUA + "Time Since RNG:\n" + EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.wolfSvensSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.wolfTeethSession) + "\n" + + countText = EnumChatFormatting.GOLD + nf.format(WolfTracker.wolfSvensSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(WolfTracker.wolfTeethSession) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.AQUA + LootTracker.wolfSpiritsSession + "\n" + - EnumChatFormatting.WHITE + LootTracker.wolfBooksSession + "\n" + - EnumChatFormatting.DARK_RED + LootTracker.wolfEggsSession + "\n" + - EnumChatFormatting.GOLD + LootTracker.wolfCouturesSession + "\n" + - EnumChatFormatting.AQUA + LootTracker.wolfBaitsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootTracker.wolfFluxesSession + "\n" + + EnumChatFormatting.AQUA + WolfTracker.wolfSpiritsSession + "\n" + + EnumChatFormatting.WHITE + WolfTracker.wolfBooksSession + "\n" + + EnumChatFormatting.DARK_RED + WolfTracker.wolfEggsSession + "\n" + + EnumChatFormatting.GOLD + WolfTracker.wolfCouturesSession + "\n" + + EnumChatFormatting.AQUA + WolfTracker.wolfBaitsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + WolfTracker.wolfFluxesSession + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "spider": - if (LootTracker.spiderTime == -1) { + if (SpiderTracker.spiderTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.spiderTime, timeNow); + timeBetween = Utils.getTimeBetween(SpiderTracker.spiderTime, timeNow); } - if (LootTracker.spiderBosses == -1) { + if (SpiderTracker.spiderBosses == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.spiderBosses); + bossesBetween = nf.format(SpiderTracker.spiderBosses); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.spiderTAP); + drop20 = nf.format(SpiderTracker.spiderTAP); } else { - drop20 = nf.format(LootTracker.spiderTAPDrops) + " times"; + drop20 = nf.format(SpiderTracker.spiderTAPDrops) + " times"; } dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + @@ -142,33 +144,33 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + EnumChatFormatting.AQUA + "Time Since RNG:\n" + EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.spiderTarantulas) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.spiderWebs) + "\n" + + countText = EnumChatFormatting.GOLD + nf.format(SpiderTracker.spiderTarantulas) + "\n" + + EnumChatFormatting.GREEN + nf.format(SpiderTracker.spiderWebs) + "\n" + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootTracker.spiderBites + "\n" + - EnumChatFormatting.WHITE + LootTracker.spiderBooks + "\n" + - EnumChatFormatting.AQUA + LootTracker.spiderCatalysts + "\n" + - EnumChatFormatting.DARK_PURPLE + LootTracker.spiderTalismans + "\n" + - EnumChatFormatting.LIGHT_PURPLE + LootTracker.spiderSwatters + "\n" + - EnumChatFormatting.GOLD + LootTracker.spiderMosquitos + "\n" + + EnumChatFormatting.DARK_GRAY + SpiderTracker.spiderBites + "\n" + + EnumChatFormatting.WHITE + SpiderTracker.spiderBooks + "\n" + + EnumChatFormatting.AQUA + SpiderTracker.spiderCatalysts + "\n" + + EnumChatFormatting.DARK_PURPLE + SpiderTracker.spiderTalismans + "\n" + + EnumChatFormatting.LIGHT_PURPLE + SpiderTracker.spiderSwatters + "\n" + + EnumChatFormatting.GOLD + SpiderTracker.spiderMosquitos + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "spider_session": - if (LootTracker.spiderTimeSession == -1) { + if (SpiderTracker.spiderTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.spiderTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(SpiderTracker.spiderTimeSession, timeNow); } - if (LootTracker.spiderBossesSession == -1) { + if (SpiderTracker.spiderBossesSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.spiderBossesSession); + bossesBetween = nf.format(SpiderTracker.spiderBossesSession); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.spiderTAPSession); + drop20 = nf.format(SpiderTracker.spiderTAPSession); } else { - drop20 = nf.format(LootTracker.spiderTAPDropsSession) + " times"; + drop20 = nf.format(SpiderTracker.spiderTAPDropsSession) + " times"; } dropsText = EnumChatFormatting.GOLD + "Tarantulas Killed:\n" + @@ -182,40 +184,42 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Digested Mosquitos:\n" + EnumChatFormatting.AQUA + "Time Since RNG:\n" + EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.spiderTarantulasSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.spiderWebsSession) + "\n" + + countText = EnumChatFormatting.GOLD + nf.format(SpiderTracker.spiderTarantulasSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(SpiderTracker.spiderWebsSession) + "\n" + EnumChatFormatting.DARK_GREEN + drop20 + "\n" + - EnumChatFormatting.DARK_GRAY + LootTracker.spiderBitesSession + "\n" + - EnumChatFormatting.WHITE + LootTracker.spiderBooksSession + "\n" + - EnumChatFormatting.AQUA + LootTracker.spiderCatalystsSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootTracker.spiderTalismansSession + "\n" + - EnumChatFormatting.LIGHT_PURPLE + LootTracker.spiderSwattersSession + "\n" + - EnumChatFormatting.GOLD + LootTracker.spiderMosquitosSession + "\n" + + EnumChatFormatting.DARK_GRAY + SpiderTracker.spiderBitesSession + "\n" + + EnumChatFormatting.WHITE + SpiderTracker.spiderBooksSession + "\n" + + EnumChatFormatting.AQUA + SpiderTracker.spiderCatalystsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + SpiderTracker.spiderTalismansSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + SpiderTracker.spiderSwattersSession + "\n" + + EnumChatFormatting.GOLD + SpiderTracker.spiderMosquitosSession + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "zombie": - if (LootTracker.zombieTime == -1) { + if (ZombieTracker.zombieTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.zombieTime, timeNow); + timeBetween = Utils.getTimeBetween(ZombieTracker.zombieTime, timeNow); } - if (LootTracker.zombieBosses == -1) { + if (ZombieTracker.zombieBosses == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.zombieBosses); + bossesBetween = nf.format(ZombieTracker.zombieBosses); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.zombieFoulFlesh); + drop20 = nf.format(ZombieTracker.zombieFoulFlesh); } else { - drop20 = nf.format(LootTracker.zombieFoulFleshDrops) + " times"; + drop20 = nf.format(ZombieTracker.zombieFoulFleshDrops) + " times"; } dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + + EnumChatFormatting.GREEN + "Revenant Viscera:\n" + EnumChatFormatting.BLUE + "Foul Flesh:\n" + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + EnumChatFormatting.WHITE + "Smite VI Books:\n" + + EnumChatFormatting.WHITE + "Smite VII Books:\n" + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + EnumChatFormatting.RED + "Revenant Catalysts:\n" + @@ -225,43 +229,47 @@ public class LootDisplay { EnumChatFormatting.RED + "Warden Hearts:\n" + EnumChatFormatting.AQUA + "Time Since RNG:\n" + EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.zombieRevs) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.zombieRevFlesh) + "\n" + + countText = EnumChatFormatting.GOLD + nf.format(ZombieTracker.zombieRevs) + "\n" + + EnumChatFormatting.GREEN + nf.format(ZombieTracker.zombieRevFlesh) + "\n" + + EnumChatFormatting.GREEN + nf.format(ZombieTracker.zombieRevViscera) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootTracker.zombiePestilences + "\n" + - EnumChatFormatting.WHITE + LootTracker.zombieBooks + "\n" + - EnumChatFormatting.AQUA + LootTracker.zombieUndeadCatas + "\n" + - EnumChatFormatting.DARK_PURPLE + LootTracker.zombieBeheadeds + "\n" + - EnumChatFormatting.RED + LootTracker.zombieRevCatas + "\n" + - EnumChatFormatting.DARK_GREEN + LootTracker.zombieSnakes + "\n" + - EnumChatFormatting.GOLD + LootTracker.zombieScythes + "\n" + - EnumChatFormatting.RED + LootTracker.zombieShards + "\n" + - EnumChatFormatting.RED + LootTracker.zombieWardenHearts + "\n" + + EnumChatFormatting.DARK_GREEN + ZombieTracker.zombiePestilences + "\n" + + EnumChatFormatting.WHITE + ZombieTracker.zombieBooks + "\n" + + EnumChatFormatting.WHITE + ZombieTracker.zombieBooksT7 + "\n" + + EnumChatFormatting.AQUA + ZombieTracker.zombieUndeadCatas + "\n" + + EnumChatFormatting.DARK_PURPLE + ZombieTracker.zombieBeheadeds + "\n" + + EnumChatFormatting.RED + ZombieTracker.zombieRevCatas + "\n" + + EnumChatFormatting.DARK_GREEN + ZombieTracker.zombieSnakes + "\n" + + EnumChatFormatting.GOLD + ZombieTracker.zombieScythes + "\n" + + EnumChatFormatting.RED + ZombieTracker.zombieShards + "\n" + + EnumChatFormatting.RED + ZombieTracker.zombieWardenHearts + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "zombie_session": - if (LootTracker.zombieTimeSession == -1) { + if (ZombieTracker.zombieTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.zombieTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(ZombieTracker.zombieTimeSession, timeNow); } - if (LootTracker.zombieBossesSession == -1) { + if (ZombieTracker.zombieBossesSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.zombieBossesSession); + bossesBetween = nf.format(ZombieTracker.zombieBossesSession); } if (ToggleCommand.slayerCountTotal) { - drop20 = nf.format(LootTracker.zombieFoulFleshSession); + drop20 = nf.format(ZombieTracker.zombieFoulFleshSession); } else { - drop20 = nf.format(LootTracker.zombieFoulFleshDropsSession) + " times"; + drop20 = nf.format(ZombieTracker.zombieFoulFleshDropsSession) + " times"; } dropsText = EnumChatFormatting.GOLD + "Revs Killed:\n" + EnumChatFormatting.GREEN + "Revenant Flesh:\n" + + EnumChatFormatting.GREEN + "Revenant Viscera:\n" + EnumChatFormatting.BLUE + "Foul Flesh:\n" + EnumChatFormatting.DARK_GREEN + "Pestilence Runes:\n" + EnumChatFormatting.WHITE + "Smite VI Books:\n" + + EnumChatFormatting.WHITE + "Smite VII Books:\n" + EnumChatFormatting.AQUA + "Undead Catalysts:\n" + EnumChatFormatting.DARK_PURPLE + "Beheaded Horrors:\n" + EnumChatFormatting.RED + "Revenant Catalysts:\n" + @@ -271,31 +279,275 @@ public class LootDisplay { EnumChatFormatting.RED + "Warden Hearts:\n" + EnumChatFormatting.AQUA + "Time Since RNG:\n" + EnumChatFormatting.AQUA + "Bosses Since RNG:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.zombieRevsSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.zombieRevFleshSession) + "\n" + + countText = EnumChatFormatting.GOLD + nf.format(ZombieTracker.zombieRevsSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(ZombieTracker.zombieRevFleshSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(ZombieTracker.zombieRevVisceraSession) + "\n" + EnumChatFormatting.BLUE + drop20 + "\n" + - EnumChatFormatting.DARK_GREEN + LootTracker.zombiePestilencesSession + "\n" + - EnumChatFormatting.WHITE + LootTracker.zombieBooksSession + "\n" + - EnumChatFormatting.AQUA + LootTracker.zombieUndeadCatasSession + "\n" + - EnumChatFormatting.DARK_PURPLE + LootTracker.zombieBeheadedsSession + "\n" + - EnumChatFormatting.RED + LootTracker.zombieRevCatasSession + "\n" + - EnumChatFormatting.DARK_GREEN + LootTracker.zombieSnakesSession + "\n" + - EnumChatFormatting.GOLD + LootTracker.zombieScythes + "\n" + - EnumChatFormatting.RED + LootTracker.zombieShardsSession + "\n" + - EnumChatFormatting.RED + LootTracker.zombieWardenHeartsSession + "\n" + + EnumChatFormatting.DARK_GREEN + ZombieTracker.zombiePestilencesSession + "\n" + + EnumChatFormatting.WHITE + ZombieTracker.zombieBooksSession + "\n" + + EnumChatFormatting.WHITE + ZombieTracker.zombieBooksT7Session + "\n" + + EnumChatFormatting.AQUA + ZombieTracker.zombieUndeadCatasSession + "\n" + + EnumChatFormatting.DARK_PURPLE + ZombieTracker.zombieBeheadedsSession + "\n" + + EnumChatFormatting.RED + ZombieTracker.zombieRevCatasSession + "\n" + + EnumChatFormatting.DARK_GREEN + ZombieTracker.zombieSnakesSession + "\n" + + EnumChatFormatting.GOLD + ZombieTracker.zombieScythes + "\n" + + EnumChatFormatting.RED + ZombieTracker.zombieShardsSession + "\n" + + EnumChatFormatting.RED + ZombieTracker.zombieWardenHeartsSession + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "enderman": + if (EndermanTracker.endermanTime == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(EndermanTracker.endermanTime, timeNow); + } + if (EndermanTracker.endermanBosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(EndermanTracker.endermanBosses); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(EndermanTracker.endermanTAP); + } else { + drop20 = nf.format(EndermanTracker.endermanTAPDrops) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Voidglooms Killed:\n" + + EnumChatFormatting.DARK_GRAY + "Null Spheres:\n" + + EnumChatFormatting.DARK_PURPLE + "Arrow Poison:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Endersnake Runes:\n" + + EnumChatFormatting.DARK_GREEN + "Summoning Eyes:\n" + + EnumChatFormatting.AQUA + "Mana Steal Books:\n" + + EnumChatFormatting.BLUE + "Transmission Tuners:\n" + + EnumChatFormatting.YELLOW + "Null Atoms:\n" + + EnumChatFormatting.AQUA + "Espresso Machines:\n" + + EnumChatFormatting.WHITE + "Smarty Pants Books:\n" + + EnumChatFormatting.LIGHT_PURPLE + "End Runes:\n" + + EnumChatFormatting.RED + "Blood Chalices:\n" + + EnumChatFormatting.RED + "Sinful Dice:\n" + + EnumChatFormatting.DARK_PURPLE + "Artifact Upgrader:\n" + + EnumChatFormatting.DARK_PURPLE + "Enderman Skins:\n" + + EnumChatFormatting.GRAY + "Enchant Runes:\n" + + EnumChatFormatting.GOLD + "Etherwarp Mergers:\n" + + EnumChatFormatting.GOLD + "Judgement Cores:\n" + + EnumChatFormatting.RED + "Ender Slayer Books:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(EndermanTracker.endermanVoidglooms) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(EndermanTracker.endermanNullSpheres) + "\n" + + EnumChatFormatting.DARK_PURPLE + drop20 + "\n" + + EnumChatFormatting.LIGHT_PURPLE + EndermanTracker.endermanEndersnakes + "\n" + + EnumChatFormatting.DARK_GREEN + EndermanTracker.endermanSummoningEyes + "\n" + + EnumChatFormatting.AQUA + EndermanTracker.endermanManaBooks + "\n" + + EnumChatFormatting.BLUE + EndermanTracker.endermanTuners + "\n" + + EnumChatFormatting.YELLOW + EndermanTracker.endermanAtoms + "\n" + + EnumChatFormatting.AQUA + EndermanTracker.endermanEspressoMachines + "\n" + + EnumChatFormatting.WHITE + EndermanTracker.endermanSmartyBooks + "\n" + + EnumChatFormatting.LIGHT_PURPLE + EndermanTracker.endermanEndRunes + "\n" + + EnumChatFormatting.RED + EndermanTracker.endermanChalices + "\n" + + EnumChatFormatting.RED + EndermanTracker.endermanDice + "\n" + + EnumChatFormatting.DARK_PURPLE + EndermanTracker.endermanArtifacts + "\n" + + EnumChatFormatting.DARK_PURPLE + EndermanTracker.endermanSkins + "\n" + + EnumChatFormatting.GRAY + EndermanTracker.endermanEnchantRunes + "\n" + + EnumChatFormatting.GOLD + EndermanTracker.endermanMergers + "\n" + + EnumChatFormatting.GOLD + EndermanTracker.endermanCores + "\n" + + EnumChatFormatting.RED + EndermanTracker.endermanEnderBooks + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "enderman_session": + if (EndermanTracker.endermanTimeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(EndermanTracker.endermanTimeSession, timeNow); + } + if (EndermanTracker.endermanBossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(EndermanTracker.endermanBossesSession); + } + if (ToggleCommand.slayerCountTotal) { + drop20 = nf.format(EndermanTracker.endermanTAPSession); + } else { + drop20 = nf.format(EndermanTracker.endermanTAPDropsSession) + " times"; + } + + dropsText = EnumChatFormatting.GOLD + "Voidglooms Killed:\n" + + EnumChatFormatting.DARK_GRAY + "Null Spheres:\n" + + EnumChatFormatting.DARK_PURPLE + "Arrow Poison:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Endersnake Runes:\n" + + EnumChatFormatting.DARK_GREEN + "Summoning Eyes:\n" + + EnumChatFormatting.AQUA + "Mana Steal Books:\n" + + EnumChatFormatting.BLUE + "Transmission Tuners:\n" + + EnumChatFormatting.YELLOW + "Null Atoms:\n" + + EnumChatFormatting.AQUA + "Espresso Machines:\n" + + EnumChatFormatting.WHITE + "Smarty Pants Books:\n" + + EnumChatFormatting.LIGHT_PURPLE + "End Runes:\n" + + EnumChatFormatting.RED + "Blood Chalices:\n" + + EnumChatFormatting.RED + "Sinful Dice:\n" + + EnumChatFormatting.DARK_PURPLE + "Artifact Upgrader:\n" + + EnumChatFormatting.DARK_PURPLE + "Enderman Skins:\n" + + EnumChatFormatting.GRAY + "Enchant Runes:\n" + + EnumChatFormatting.GOLD + "Etherwarp Mergers:\n" + + EnumChatFormatting.GOLD + "Judgement Cores:\n" + + EnumChatFormatting.RED + "Ender Slayer Books:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(EndermanTracker.endermanVoidgloomsSession) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(EndermanTracker.endermanNullSpheresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + drop20 + "\n" + + EnumChatFormatting.LIGHT_PURPLE + EndermanTracker.endermanEndersnakesSession + "\n" + + EnumChatFormatting.DARK_GREEN + EndermanTracker.endermanSummoningEyesSession + "\n" + + EnumChatFormatting.AQUA + EndermanTracker.endermanManaBooksSession + "\n" + + EnumChatFormatting.BLUE + EndermanTracker.endermanTunersSession + "\n" + + EnumChatFormatting.YELLOW + EndermanTracker.endermanAtomsSession + "\n" + + EnumChatFormatting.AQUA + EndermanTracker.endermanEspressoMachinesSession + "\n" + + EnumChatFormatting.WHITE + EndermanTracker.endermanSmartyBooksSession + "\n" + + EnumChatFormatting.LIGHT_PURPLE + EndermanTracker.endermanEndRunesSession + "\n" + + EnumChatFormatting.RED + EndermanTracker.endermanChalicesSession + "\n" + + EnumChatFormatting.RED + EndermanTracker.endermanDiceSession + "\n" + + EnumChatFormatting.DARK_PURPLE + EndermanTracker.endermanArtifactsSession + "\n" + + EnumChatFormatting.DARK_PURPLE + EndermanTracker.endermanSkinsSession + "\n" + + EnumChatFormatting.GRAY + EndermanTracker.endermanEnchantRunesSession + "\n" + + EnumChatFormatting.GOLD + EndermanTracker.endermanMergersSession + "\n" + + EnumChatFormatting.GOLD + EndermanTracker.endermanCoresSession + "\n" + + EnumChatFormatting.RED + EndermanTracker.endermanEnderBooksSession + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "blaze": + if (BlazeTracker.time == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(BlazeTracker.time, timeNow); + } + if (BlazeTracker.bosses == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(BlazeTracker.bosses); + } + + dropsText = EnumChatFormatting.GOLD + "Demonlords Killed:\n" + + EnumChatFormatting.GRAY + "Derelict Ashes:\n" + + EnumChatFormatting.RED + "Lavatear Runes:\n" + + EnumChatFormatting.AQUA + "Splash Potions:\n" + + EnumChatFormatting.DARK_RED + "Magma Arrows:\n" + + EnumChatFormatting.DARK_AQUA + "Mana Disintegrators:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Scorched Books:\n" + + EnumChatFormatting.WHITE + "Kelvin Inverters:\n" + + EnumChatFormatting.BLUE + "Blaze Rod Distillates:\n" + + EnumChatFormatting.BLUE + "Glowstone Distillates:\n" + + EnumChatFormatting.BLUE + "Magma Distillates:\n" + + EnumChatFormatting.BLUE + "Wart Distillates:\n" + + EnumChatFormatting.BLUE + "Gabagool Distillates:\n" + + EnumChatFormatting.RED + "Power Crystals:\n" + + EnumChatFormatting.RED + "Fire Aspect Books:\n" + + EnumChatFormatting.GOLD + "Fiery Burst Runes:\n" + + EnumChatFormatting.WHITE + "Opal Gems:\n" + + EnumChatFormatting.RED + "Archfiend Dice:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Duplex Books:\n" + + EnumChatFormatting.GOLD + "High Class Dice:\n" + + EnumChatFormatting.GOLD + "Engineering Plans:\n" + + EnumChatFormatting.GOLD + "Subzero Inverters:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(BlazeTracker.demonlords) + "\n" + + EnumChatFormatting.GRAY + nf.format(BlazeTracker.derelictAshes) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.lavatearRunes) + "\n" + + EnumChatFormatting.AQUA + nf.format(BlazeTracker.splashPotions) + "\n" + + EnumChatFormatting.DARK_RED + nf.format(BlazeTracker.magmaArrows) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(BlazeTracker.manaDisintegrators) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(BlazeTracker.scorchedBooks) + "\n" + + EnumChatFormatting.WHITE + nf.format(BlazeTracker.kelvinInverters) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.blazeRodDistillates) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.glowstoneDistillates) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.magmaCreamDistillates) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.netherWartDistillates) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.gabagoolDistillates) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.scorchedPowerCrystals) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.fireAspectBooks) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.fieryBurstRunes) + "\n" + + EnumChatFormatting.WHITE + nf.format(BlazeTracker.opalGems) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.archfiendDice) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(BlazeTracker.duplexBooks) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.highClassArchfiendDice) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.engineeringPlans) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.subzeroInverters) + "\n" + + EnumChatFormatting.AQUA + timeBetween + "\n" + + EnumChatFormatting.AQUA + bossesBetween; + break; + case "blaze_session": + if (BlazeTracker.timeSession == -1) { + timeBetween = "Never"; + } else { + timeBetween = Utils.getTimeBetween(BlazeTracker.timeSession, timeNow); + } + if (BlazeTracker.bossesSession == -1) { + bossesBetween = "Never"; + } else { + bossesBetween = nf.format(BlazeTracker.bossesSession); + } + + dropsText = EnumChatFormatting.GOLD + "Demonlords Killed:\n" + + EnumChatFormatting.GRAY + "Derelict Ashes:\n" + + EnumChatFormatting.RED + "Lavatear Runes:\n" + + EnumChatFormatting.AQUA + "Splash Potions:\n" + + EnumChatFormatting.DARK_RED + "Magma Arrows:\n" + + EnumChatFormatting.DARK_AQUA + "Mana Disintegrators:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Scorched Books:\n" + + EnumChatFormatting.WHITE + "Kelvin Inverters:\n" + + EnumChatFormatting.BLUE + "Blaze Rod Distillates:\n" + + EnumChatFormatting.BLUE + "Glowstone Distillates:\n" + + EnumChatFormatting.BLUE + "Magma Distillates:\n" + + EnumChatFormatting.BLUE + "Wart Distillates:\n" + + EnumChatFormatting.BLUE + "Gabagool Distillates:\n" + + EnumChatFormatting.RED + "Power Crystals:\n" + + EnumChatFormatting.RED + "Fire Aspect Books:\n" + + EnumChatFormatting.GOLD + "Fiery Burst Runes:\n" + + EnumChatFormatting.WHITE + "Opal Gems:\n" + + EnumChatFormatting.RED + "Archfiend Dice:\n" + + EnumChatFormatting.LIGHT_PURPLE + "Duplex Books:\n" + + EnumChatFormatting.GOLD + "High Class Dice:\n" + + EnumChatFormatting.GOLD + "Engineering Plans:\n" + + EnumChatFormatting.GOLD + "Subzero Inverters:\n" + + EnumChatFormatting.AQUA + "Time Since RNG:\n" + + EnumChatFormatting.AQUA + "Bosses Since RNG:"; + countText = EnumChatFormatting.GOLD + nf.format(BlazeTracker.demonlordsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(BlazeTracker.derelictAshesSession) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.lavatearRunesSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(BlazeTracker.splashPotionsSession) + "\n" + + EnumChatFormatting.DARK_RED + nf.format(BlazeTracker.magmaArrowsSession) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(BlazeTracker.manaDisintegratorsSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(BlazeTracker.scorchedBooksSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(BlazeTracker.kelvinInvertersSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.blazeRodDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.glowstoneDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.magmaCreamDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.netherWartDistillatesSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(BlazeTracker.gabagoolDistillatesSession) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.scorchedPowerCrystalsSession) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.fireAspectBooksSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.fieryBurstRunesSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(BlazeTracker.opalGemsSession) + "\n" + + EnumChatFormatting.RED + nf.format(BlazeTracker.archfiendDiceSession) + "\n" + + EnumChatFormatting.LIGHT_PURPLE + nf.format(BlazeTracker.duplexBooksSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.highClassArchfiendDiceSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.engineeringPlansSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(BlazeTracker.subzeroInvertersSession) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "fishing": - if (LootTracker.empTime == -1) { + if (FishingTracker.empTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.empTime, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.empTime, timeNow); } - if (LootTracker.empSCs == -1) { + if (FishingTracker.empSCs == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.empSCs); + bossesBetween = nf.format(FishingTracker.empSCs); } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -308,16 +560,16 @@ public class LootDisplay { EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + EnumChatFormatting.BLUE + "Sea Witches:\n" + EnumChatFormatting.GREEN + "Sea Archers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatches) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.squids) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.seaWalkers) + "\n" + - EnumChatFormatting.DARK_GRAY + nf.format(LootTracker.nightSquids) + "\n" + - EnumChatFormatting.DARK_AQUA + nf.format(LootTracker.seaGuardians) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.seaWitches) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.seaArchers); + 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.GRAY + nf.format(FishingTracker.squids) + "\n" + + EnumChatFormatting.GREEN + nf.format(FishingTracker.seaWalkers) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(FishingTracker.nightSquids) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(FishingTracker.seaGuardians) + "\n" + + EnumChatFormatting.BLUE + nf.format(FishingTracker.seaWitches) + "\n" + + EnumChatFormatting.GREEN + nf.format(FishingTracker.seaArchers); // Seperated to save vertical space dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + EnumChatFormatting.YELLOW + "Catfishes:\n" + @@ -329,14 +581,14 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Sea Emperors:\n" + EnumChatFormatting.AQUA + "Time Since Emp:\n" + EnumChatFormatting.AQUA + "Creatures Since Emp:"; - countTextTwo = EnumChatFormatting.GREEN + nf.format(LootTracker.monsterOfTheDeeps) + "\n" + - EnumChatFormatting.YELLOW + nf.format(LootTracker.catfishes) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.carrotKings) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.seaLeeches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.guardianDefenders) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.deepSeaProtectors) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.hydras) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.seaEmperors) + "\n" + + countTextTwo = EnumChatFormatting.GREEN + nf.format(FishingTracker.monsterOfTheDeeps) + "\n" + + EnumChatFormatting.YELLOW + nf.format(FishingTracker.catfishes) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.carrotKings) + "\n" + + EnumChatFormatting.GRAY + nf.format(FishingTracker.seaLeeches) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.guardianDefenders) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.deepSeaProtectors) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.hydras) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.seaEmperors) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; @@ -349,15 +601,15 @@ public class LootDisplay { } break; case "fishing_session": - if (LootTracker.empTimeSession == -1) { + if (FishingTracker.empTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.empTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.empTimeSession, timeNow); } - if (LootTracker.empSCsSession == -1) { + if (FishingTracker.empSCsSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.empSCsSession); + bossesBetween = nf.format(FishingTracker.empSCsSession); } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -370,16 +622,16 @@ public class LootDisplay { EnumChatFormatting.DARK_AQUA + "Sea Guardians:\n" + EnumChatFormatting.BLUE + "Sea Witches:\n" + EnumChatFormatting.GREEN + "Sea Archers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatchesSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.squidsSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.seaWalkersSession) + "\n" + - EnumChatFormatting.DARK_GRAY + nf.format(LootTracker.nightSquidsSession) + "\n" + - EnumChatFormatting.DARK_AQUA + nf.format(LootTracker.seaGuardiansSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.seaWitchesSession) + "\n" + - EnumChatFormatting.GREEN + nf.format(LootTracker.seaArchersSession); + 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.GRAY + nf.format(FishingTracker.squidsSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(FishingTracker.seaWalkersSession) + "\n" + + EnumChatFormatting.DARK_GRAY + nf.format(FishingTracker.nightSquidsSession) + "\n" + + EnumChatFormatting.DARK_AQUA + nf.format(FishingTracker.seaGuardiansSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(FishingTracker.seaWitchesSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(FishingTracker.seaArchersSession); // Seperated to save vertical space dropsTextTwo = EnumChatFormatting.GREEN + "Monster of Deeps:\n" + EnumChatFormatting.YELLOW + "Catfishes:\n" + @@ -391,14 +643,14 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Sea Emperors:\n" + EnumChatFormatting.AQUA + "Time Since Emp:\n" + EnumChatFormatting.AQUA + "Creatures Since Emp:"; - countTextTwo = EnumChatFormatting.GREEN + nf.format(LootTracker.monsterOfTheDeepsSession) + "\n" + - EnumChatFormatting.YELLOW + nf.format(LootTracker.catfishesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.carrotKingsSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.seaLeechesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.guardianDefendersSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.deepSeaProtectorsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.hydrasSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.seaEmperorsSession) + "\n" + + countTextTwo = EnumChatFormatting.GREEN + nf.format(FishingTracker.monsterOfTheDeepsSession) + "\n" + + EnumChatFormatting.YELLOW + nf.format(FishingTracker.catfishesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.carrotKingsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(FishingTracker.seaLeechesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.guardianDefendersSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.deepSeaProtectorsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.hydrasSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.seaEmperorsSession) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; @@ -411,15 +663,15 @@ public class LootDisplay { } break; case "fishing_winter": - if (LootTracker.yetiTime == -1) { + if (FishingTracker.yetiTime == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.yetiTime, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.yetiTime, timeNow); } - if (LootTracker.yetiSCs == -1) { + if (FishingTracker.yetiSCs == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.yetiSCs); + bossesBetween = nf.format(FishingTracker.yetiSCs); } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -432,27 +684,27 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Yetis:\n" + EnumChatFormatting.AQUA + "Time Since Yeti:\n" + EnumChatFormatting.AQUA + "Creatures Since Yeti:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatches) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.frozenSteves) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.frostyTheSnowmans) + "\n" + - EnumChatFormatting.DARK_GREEN + nf.format(LootTracker.grinches) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.yetis) + "\n" + + 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.AQUA + nf.format(FishingTracker.frozenSteves) + "\n" + + EnumChatFormatting.WHITE + nf.format(FishingTracker.frostyTheSnowmans) + "\n" + + EnumChatFormatting.DARK_GREEN + nf.format(FishingTracker.grinches) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.yetis) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; case "fishing_winter_session": - if (LootTracker.yetiTimeSession == -1) { + if (FishingTracker.yetiTimeSession == -1) { timeBetween = "Never"; } else { - timeBetween = Utils.getTimeBetween(LootTracker.yetiTimeSession, timeNow); + timeBetween = Utils.getTimeBetween(FishingTracker.yetiTimeSession, timeNow); } - if (LootTracker.yetiSCsSession == -1) { + if (FishingTracker.yetiSCsSession == -1) { bossesBetween = "Never"; } else { - bossesBetween = nf.format(LootTracker.yetiSCsSession); + bossesBetween = nf.format(FishingTracker.yetiSCsSession); } dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -465,14 +717,14 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Yetis:\n" + EnumChatFormatting.AQUA + "Time Since Yeti:\n" + EnumChatFormatting.AQUA + "Creatures Since Yeti:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatchesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.frozenStevesSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.frostyTheSnowmansSession) + "\n" + - EnumChatFormatting.DARK_GREEN + nf.format(LootTracker.grinchesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.yetisSession) + "\n" + + 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.AQUA + nf.format(FishingTracker.frozenStevesSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(FishingTracker.frostyTheSnowmansSession) + "\n" + + EnumChatFormatting.DARK_GREEN + nf.format(FishingTracker.grinchesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.yetisSession) + "\n" + EnumChatFormatting.AQUA + timeBetween + "\n" + EnumChatFormatting.AQUA + bossesBetween; break; @@ -485,14 +737,14 @@ public class LootDisplay { EnumChatFormatting.BLUE + "Blue Sharks:\n" + EnumChatFormatting.GOLD + "Tiger Sharks:\n" + EnumChatFormatting.WHITE + "Great White Sharks:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatches) + "\n" + - EnumChatFormatting.LIGHT_PURPLE + nf.format(LootTracker.nurseSharks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.blueSharks) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.tigerSharks) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.greatWhiteSharks); + 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.LIGHT_PURPLE + nf.format(FishingTracker.nurseSharks) + "\n" + + EnumChatFormatting.BLUE + nf.format(FishingTracker.blueSharks) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.tigerSharks) + "\n" + + EnumChatFormatting.WHITE + nf.format(FishingTracker.greatWhiteSharks); break; case "fishing_festival_session": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -503,14 +755,14 @@ public class LootDisplay { EnumChatFormatting.BLUE + "Blue Sharks:\n" + EnumChatFormatting.GOLD + "Tiger Sharks:\n" + EnumChatFormatting.WHITE + "Great White Sharks:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatchesSession) + "\n" + - EnumChatFormatting.LIGHT_PURPLE + nf.format(LootTracker.nurseSharksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.blueSharksSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.tigerSharksSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.greatWhiteSharksSession); + 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.LIGHT_PURPLE + nf.format(FishingTracker.nurseSharksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(FishingTracker.blueSharksSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.tigerSharksSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(FishingTracker.greatWhiteSharksSession); break; case "fishing_spooky": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -522,15 +774,15 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + EnumChatFormatting.GOLD + "Grim Reapers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreatures) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestone) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatches) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatches) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.scarecrows) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.nightmares) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.werewolfs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.phantomFishers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.grimReapers); + 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.BLUE + nf.format(FishingTracker.scarecrows) + "\n" + + EnumChatFormatting.GRAY + nf.format(FishingTracker.nightmares) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.werewolfs) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.phantomFishers) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.grimReapers); break; case "fishing_spooky_session": dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + @@ -542,15 +794,145 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Werewolves:\n" + EnumChatFormatting.GOLD + "Phantom Fishers:\n" + EnumChatFormatting.GOLD + "Grim Reapers:"; - countText = EnumChatFormatting.AQUA + nf.format(LootTracker.seaCreaturesSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.fishingMilestoneSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.goodCatchesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.greatCatchesSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.scarecrowsSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.nightmaresSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.werewolfsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.phantomFishersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.grimReapersSession); + 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.BLUE + nf.format(FishingTracker.scarecrowsSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(FishingTracker.nightmaresSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.werewolfsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.phantomFishersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.grimReapersSession); + break; + case "fishing_ch": + dropsText = EnumChatFormatting.AQUA + "Creatures Caught:\n" + + EnumChatFormatting.AQUA + "Fishing Milestone:\n" + + EnumChatFormatting.GOLD + "Good Catches:\n" + + EnumChatFormatting.DARK_PURPLE + "Great Catches:\n" + + EnumChatFormatting.BLUE + "Water Worms:\n" + + EnumChatFormatting.GREEN + "Poison Water Worms:\n" + + EnumChatFormatting.RED + "Flaming Worms:\n" + + EnumChatFormatting.DARK_PURPLE + "Lava Blazes:\n" + + EnumChatFormatting.DARK_PURPLE + "Lava Pigmen:\n" + + EnumChatFormatting.GOLD + "Zombie Miners:"; + 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.BLUE + nf.format(FishingTracker.waterWorms) + "\n" + + EnumChatFormatting.GREEN + nf.format(FishingTracker.poisonedWaterWorms) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.flamingWorms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.lavaBlazes) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.lavaPigmen) + "\n" + + EnumChatFormatting.GOLD + nf.format(FishingTracker.zombieMiners); + break; + case "fishing_ch_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 + "Water Worms:\n" + + EnumChatFormatting.GREEN + "Poison Water Worms:\n" + + EnumChatFormatting.RED + "Flaming Worms:\n" + + EnumChatFormatting.DARK_PURPLE + "Lava Blazes:\n" + + EnumChatFormatting.DARK_PURPLE + "Lava Pigmen:\n" + + EnumChatFormatting.GOLD + "Zombie Miners:"; + 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.BLUE + nf.format(FishingTracker.waterWormsSession) + "\n" + + EnumChatFormatting.GREEN + nf.format(FishingTracker.poisonedWaterWormsSession) + "\n" + + EnumChatFormatting.RED + nf.format(FishingTracker.flamingWormsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(FishingTracker.lavaBlazesSession) + "\n" + + 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" + @@ -563,16 +945,16 @@ public class LootDisplay { EnumChatFormatting.WHITE + "Gaia Constructs:\n" + EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + EnumChatFormatting.GOLD + "Minos Inquisitors:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.mythCoins) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.griffinFeathers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.crownOfGreeds) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.washedUpSouvenirs) + "\n" + - EnumChatFormatting.RED + nf.format(LootTracker.minosHunters) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.siameseLynxes) + "\n" + - EnumChatFormatting.RED + nf.format(LootTracker.minotaurs) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.gaiaConstructs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.minosChampions) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.minosInquisitors); + countText = EnumChatFormatting.GOLD + nf.format(MythologicalTracker.mythCoins) + "\n" + + EnumChatFormatting.WHITE + nf.format(MythologicalTracker.griffinFeathers) + "\n" + + EnumChatFormatting.GOLD + nf.format(MythologicalTracker.crownOfGreeds) + "\n" + + EnumChatFormatting.AQUA + nf.format(MythologicalTracker.washedUpSouvenirs) + "\n" + + EnumChatFormatting.RED + nf.format(MythologicalTracker.minosHunters) + "\n" + + EnumChatFormatting.GRAY + nf.format(MythologicalTracker.siameseLynxes) + "\n" + + EnumChatFormatting.RED + nf.format(MythologicalTracker.minotaurs) + "\n" + + EnumChatFormatting.WHITE + nf.format(MythologicalTracker.gaiaConstructs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(MythologicalTracker.minosChampions) + "\n" + + EnumChatFormatting.GOLD + nf.format(MythologicalTracker.minosInquisitors); break; case "mythological_session": dropsText = EnumChatFormatting.GOLD + "Coins:\n" + @@ -585,71 +967,80 @@ public class LootDisplay { EnumChatFormatting.WHITE + "Gaia Constructs:\n" + EnumChatFormatting.DARK_PURPLE + "Minos Champions:\n" + EnumChatFormatting.GOLD + "Minos Inquisitors:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.mythCoinsSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.griffinFeathersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.crownOfGreedsSession) + "\n" + - EnumChatFormatting.AQUA + nf.format(LootTracker.washedUpSouvenirsSession) + "\n" + - EnumChatFormatting.RED + nf.format(LootTracker.minosHuntersSession) + "\n" + - EnumChatFormatting.GRAY + nf.format(LootTracker.siameseLynxesSession) + "\n" + - EnumChatFormatting.RED + nf.format(LootTracker.minotaursSession) + "\n" + - EnumChatFormatting.WHITE + nf.format(LootTracker.gaiaConstructsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.minosChampionsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.minosInquisitorsSession); + countText = EnumChatFormatting.GOLD + nf.format(MythologicalTracker.mythCoinsSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(MythologicalTracker.griffinFeathersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(MythologicalTracker.crownOfGreedsSession) + "\n" + + EnumChatFormatting.AQUA + nf.format(MythologicalTracker.washedUpSouvenirsSession) + "\n" + + EnumChatFormatting.RED + nf.format(MythologicalTracker.minosHuntersSession) + "\n" + + EnumChatFormatting.GRAY + nf.format(MythologicalTracker.siameseLynxesSession) + "\n" + + EnumChatFormatting.RED + nf.format(MythologicalTracker.minotaursSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(MythologicalTracker.gaiaConstructsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(MythologicalTracker.minosChampionsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(MythologicalTracker.minosInquisitorsSession); break; case "catacombs_floor_one": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.bonzoStaffs) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f1CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f1TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f1SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.bonzoStaffs) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f1CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f1TimeSpent); break; case "catacombs_floor_one_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Bonzo's Staffs:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.bonzoStaffsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f1CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f1TimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.bonzoStaffsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f1CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f1TimeSpentSession); break; case "catacombs_floor_two": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Scarf's Studies:\n" + EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.scarfStudies) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveSwords) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f2CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f2TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f2SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.scarfStudies) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveSwords) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f2CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f2TimeSpent); break; case "catacombs_floor_two_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Scarf's Studies:\n" + EnumChatFormatting.DARK_PURPLE + "Adaptive Blades:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.scarfStudiesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveSwordsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f2CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f2TimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.scarfStudiesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveSwordsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f2CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f2TimeSpentSession); break; case "catacombs_floor_three": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + @@ -657,17 +1048,19 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveBoots) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f3CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f3TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f3SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveBoots) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f3CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f3TimeSpent); break; case "catacombs_floor_three_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "Adaptive Helmets:\n" + EnumChatFormatting.DARK_PURPLE + "Adaptive Chestplates:\n" + @@ -675,17 +1068,19 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Adaptive Boots:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.adaptiveBootsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f3CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f3TimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.adaptiveBootsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f3CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f3TimeSpentSession); break; case "catacombs_floor_four": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + @@ -696,20 +1091,22 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritWings) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritBones) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritBoots) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritSwords) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.spiritBows) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.epicSpiritPets) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.legSpiritPets) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f4CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f4TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f4SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritWings) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritBones) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritBoots) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritSwords) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.spiritBows) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.epicSpiritPets) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.legSpiritPets) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f4CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f4TimeSpent); break; case "catacombs_floor_four_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "Spirit Wings:\n" + EnumChatFormatting.DARK_PURPLE + "Spirit Bones:\n" + @@ -720,20 +1117,22 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Leg Spirit Pets:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritWingsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritBonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritBootsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.spiritSwordsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.spiritBowsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.epicSpiritPetsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.legSpiritPetsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f4CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f4TimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritWingsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritBonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.spiritSwordsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.spiritBowsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.epicSpiritPetsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.legSpiritPetsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f4CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f4TimeSpentSession); break; case "catacombs_floor_five": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Warped Stones:\n" + EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + @@ -745,21 +1144,23 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Shadow Furys:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.warpedStones) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssHelms) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssChests) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssLegs) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssBoots) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.lastBreaths) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.lividDaggers) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.shadowFurys) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f5CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f5TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f5SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.warpedStones) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssHelms) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssChests) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssLegs) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssBoots) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.lastBreaths) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.lividDaggers) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.shadowFurys) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f5CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f5TimeSpent); break; case "catacombs_floor_five_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Warped Stones:\n" + EnumChatFormatting.DARK_PURPLE + "Shadow Helmets:\n" + @@ -771,21 +1172,23 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Shadow Furys:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.warpedStonesSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssHelmsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssChestsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssLegsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowAssBootsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.lastBreathsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.lividDaggersSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.shadowFurysSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f5CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f5TimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.warpedStonesSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssHelmsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssChestsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssLegsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowAssBootsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.lastBreathsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.lividDaggersSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.shadowFurysSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f5CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f5TimeSpentSession); break; case "catacombs_floor_six": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Ancient Roses:\n" + EnumChatFormatting.GOLD + "Precursor Eyes:\n" + @@ -795,23 +1198,27 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + EnumChatFormatting.GOLD + "Necro Swords:\n" + + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.ancientRoses) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.precursorEyes) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.giantsSwords) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordHelms) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordChests) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordLegs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordBoots) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroSwords) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f6CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f6TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f6SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.ancientRoses) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.precursorEyes) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.giantsSwords) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordHelms) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordChests) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordLegs) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordBoots) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroSwords) + "\n" + + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.f6Rerolls) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f6CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f6TimeSpent); break; case "catacombs_floor_six_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.BLUE + "Ancient Roses:\n" + EnumChatFormatting.GOLD + "Precursor Eyes:\n" + @@ -821,23 +1228,27 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Necro Lord Leggings:\n" + EnumChatFormatting.GOLD + "Necro Lord Boots:\n" + EnumChatFormatting.GOLD + "Necro Swords:\n" + + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.ancientRosesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.precursorEyesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.giantsSwordsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordHelmsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordChestsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordLegsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroLordBootsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.necroSwordsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f6CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f6TimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(CatacombsTracker.ancientRosesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.precursorEyesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.giantsSwordsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordHelmsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordChestsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordLegsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroLordBootsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necroSwordsSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.f6RerollsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f6CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f6TimeSpentSession); break; case "catacombs_floor_seven": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + @@ -850,26 +1261,30 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Wither Chests:\n" + EnumChatFormatting.GOLD + "Wither Leggings:\n" + EnumChatFormatting.GOLD + "Wither Boots:\n" + + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulators) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.witherBloods) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.witherCloaks) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.implosions) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.witherShields) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowWarps) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.necronsHandles) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.autoRecombs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherHelms) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherChests) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherLegs) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherBoots) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f7CoinsSpent) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f7TimeSpent); + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f7SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.witherBloods) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.witherCloaks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.implosions) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.witherShields) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowWarps) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.necronsHandles) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.autoRecombs) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherHelms) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherChests) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherLegs) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherBoots) + "\n" + + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.f7Rerolls) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f7CoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f7TimeSpent); break; case "catacombs_floor_seven_session": - dropsText = EnumChatFormatting.GOLD + "Recombobulators:\n" + + dropsText = EnumChatFormatting.GOLD + "S+ Runs:\n" + + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "Wither Bloods:\n" + EnumChatFormatting.DARK_PURPLE + "Wither Cloaks:\n" + @@ -882,23 +1297,146 @@ public class LootDisplay { EnumChatFormatting.GOLD + "Wither Chests:\n" + EnumChatFormatting.GOLD + "Wither Leggings:\n" + EnumChatFormatting.GOLD + "Wither Boots:\n" + + EnumChatFormatting.WHITE + "Rerolls:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.f7SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.witherBloodsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.witherCloaksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.implosionsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.witherShieldsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.shadowWarpsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.necronsHandlesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.autoRecombsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherHelmsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherChestsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherLegsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.witherBootsSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.f7RerollsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.f7CoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f7TimeSpentSession); + break; + case "catacombs_master": + if (ToggleCommand.masterSPlusDisplay) { + runs = EnumChatFormatting.GOLD + "Master One S+:\n" + + EnumChatFormatting.GOLD + "Master Two S+:\n" + + EnumChatFormatting.GOLD + "Master Three S+:\n" + + EnumChatFormatting.GOLD + "Master Four S+:\n" + + EnumChatFormatting.GOLD + "Master Five S+:\n" + + EnumChatFormatting.GOLD + "Master Six S+:\n" + + EnumChatFormatting.GOLD + "Master Seven S+:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SPlus) + "\n"; + } else { + runs = EnumChatFormatting.GOLD + "Master One S:\n" + + EnumChatFormatting.GOLD + "Master Two S:\n" + + EnumChatFormatting.GOLD + "Master Three S:\n" + + EnumChatFormatting.GOLD + "Master Four S:\n" + + EnumChatFormatting.GOLD + "Master Five S:\n" + + EnumChatFormatting.GOLD + "Master Six S:\n" + + EnumChatFormatting.GOLD + "Master Seven S:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7S) + "\n"; + } + + dropsText = runs + + EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "1st Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "2nd Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "3rd Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "4th Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "5th Master Stars:\n" + + EnumChatFormatting.GOLD + "Necron Dyes:\n" + + EnumChatFormatting.GOLD + "Dark Claymores:\n" + + EnumChatFormatting.WHITE + "Rerolls:\n" + + EnumChatFormatting.AQUA + "Coins Spent:\n" + + EnumChatFormatting.AQUA + "Time Spent:"; + countText = runsCount + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.firstStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.secondStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.thirdStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fourthStars) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fifthStars) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necronDyes) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.darkClaymores) + "\n" + + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.masterRerolls) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpent) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpent); + break; + case "catacombs_master_session": + if (ToggleCommand.masterSPlusDisplay) { + runs = EnumChatFormatting.GOLD + "Master One S+:\n" + + EnumChatFormatting.GOLD + "Master Two S+:\n" + + EnumChatFormatting.GOLD + "Master Three S+:\n" + + EnumChatFormatting.GOLD + "Master Four S+:\n" + + EnumChatFormatting.GOLD + "Master Five S+:\n" + + EnumChatFormatting.GOLD + "Master Six S+:\n" + + EnumChatFormatting.GOLD + "Master Seven S+:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SPlusSession) + "\n"; + } else { + runs = EnumChatFormatting.GOLD + "Master One S:\n" + + EnumChatFormatting.GOLD + "Master Two S:\n" + + EnumChatFormatting.GOLD + "Master Three S:\n" + + EnumChatFormatting.GOLD + "Master Four S:\n" + + EnumChatFormatting.GOLD + "Master Five S:\n" + + EnumChatFormatting.GOLD + "Master Six S:\n" + + EnumChatFormatting.GOLD + "Master Seven S:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SSession) + "\n"; + } + + dropsText = runs + + EnumChatFormatting.GOLD + "Recombobulators:\n" + + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + + EnumChatFormatting.DARK_PURPLE + "1st Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "2nd Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "3rd Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "4th Master Stars:\n" + + EnumChatFormatting.DARK_PURPLE + "5th Master Stars:\n" + + EnumChatFormatting.GOLD + "Necron Dyes:\n" + + EnumChatFormatting.GOLD + "Dark Claymores:\n" + + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.recombobulatorsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.fumingPotatoBooksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.witherBloodsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.witherCloaksSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.implosionsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.witherShieldsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.shadowWarpsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.necronsHandlesSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.autoRecombsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherHelmsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherChestsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherLegsSession) + "\n" + - EnumChatFormatting.GOLD + nf.format(LootTracker.witherBootsSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getMoneySpent(LootTracker.f7CoinsSpentSession) + "\n" + - EnumChatFormatting.AQUA + Utils.getTimeBetween(0, LootTracker.f7TimeSpentSession); + countText = runsCount + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.firstStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.secondStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.thirdStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fourthStarsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fifthStarsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.necronDyesSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.darkClaymoresSession) + "\n" + + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.masterRerollsSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpentSession) + "\n" + + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpentSession); break; case "ghost_session": dropsText = EnumChatFormatting.GOLD + "Bags of Cash:\n" + @@ -907,12 +1445,12 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Voltas:\n" + EnumChatFormatting.DARK_PURPLE + "Plasmas:" ; // + \n // EnumChatFormatting.AQUA + "Time Spent:" + - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.bagOfCashSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.sorrowSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.ghostlyBootsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.voltaSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.plasmaSession); //+ "\n" + - // EnumChatFormatting.AQUA + nf.format(LootTracker.ghostsTimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(GhostTracker.bagOfCashSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(GhostTracker.sorrowSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(GhostTracker.ghostlyBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(GhostTracker.voltaSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(GhostTracker.plasmaSession); //+ "\n" + + // EnumChatFormatting.AQUA + nf.format(GhostTracker.ghostsTimeSpentSession); break; case "ghost": dropsText = EnumChatFormatting.GOLD + "Bags of Cash:\n" + @@ -921,12 +1459,12 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "Voltas:\n" + EnumChatFormatting.DARK_PURPLE + "Plasmas:" ; // + \n // EnumChatFormatting.AQUA + "Time Spent:" + - countText = EnumChatFormatting.GOLD + nf.format(LootTracker.bagOfCashSession) + "\n" + - EnumChatFormatting.BLUE + nf.format(LootTracker.sorrowSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.ghostlyBootsSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.voltaSession) + "\n" + - EnumChatFormatting.DARK_PURPLE + nf.format(LootTracker.plasmaSession); //+ "\n" + - // EnumChatFormatting.AQUA + nf.format(LootTracker.ghostsTimeSpentSession); + countText = EnumChatFormatting.GOLD + nf.format(GhostTracker.bagOfCashSession) + "\n" + + EnumChatFormatting.BLUE + nf.format(GhostTracker.sorrowSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(GhostTracker.ghostlyBootsSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(GhostTracker.voltaSession) + "\n" + + EnumChatFormatting.DARK_PURPLE + nf.format(GhostTracker.plasmaSession); //+ "\n" + + // EnumChatFormatting.AQUA + nf.format(GhostTracker.ghostsTimeSpentSession); break; diff --git a/src/main/java/me/Danker/features/loot/LootTracker.java b/src/main/java/me/Danker/features/loot/LootTracker.java index 7919366..27f0779 100644 --- a/src/main/java/me/Danker/features/loot/LootTracker.java +++ b/src/main/java/me/Danker/features/loot/LootTracker.java @@ -1,15 +1,8 @@ package me.Danker.features.loot; -import me.Danker.commands.ToggleCommand; -import me.Danker.events.ChestSlotClickedEvent; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.ScoreboardHandler; import me.Danker.utils.Utils; -import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StringUtils; -import net.minecraftforge.client.event.ClientChatReceivedEvent; import net.minecraftforge.client.event.sound.PlaySoundEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; @@ -18,1074 +11,14 @@ import java.util.List; public class LootTracker { - // Wolf - public static int wolfSvens; - public static int wolfTeeth; - public static int wolfWheels; - public static int wolfWheelsDrops; - public static int wolfSpirits; - public static int wolfBooks; - public static int wolfEggs; - public static int wolfCoutures; - public static int wolfBaits; - public static int wolfFluxes; - public static double wolfTime; - public static int wolfBosses; - // Spider - public static int spiderTarantulas; - public static int spiderWebs; - public static int spiderTAP; - public static int spiderTAPDrops; - public static int spiderBites; - public static int spiderCatalysts; - public static int spiderBooks; - public static int spiderSwatters; - public static int spiderTalismans; - public static int spiderMosquitos; - public static double spiderTime; - public static int spiderBosses; - // Zombie - public static int zombieRevs; - public static int zombieRevFlesh; - public static int zombieFoulFlesh; - public static int zombieFoulFleshDrops; - public static int zombiePestilences; - public static int zombieUndeadCatas; - public static int zombieBooks; - public static int zombieBeheadeds; - public static int zombieRevCatas; - public static int zombieSnakes; - public static int zombieScythes; - public static int zombieShards; - public static int zombieWardenHearts; - public static double zombieTime; - public static int zombieBosses; - - // Fishing - public static int seaCreatures; - public static int goodCatches; - public static int greatCatches; - public static int squids; - public static int seaWalkers; - public static int nightSquids; - public static int seaGuardians; - public static int seaWitches; - public static int seaArchers; - public static int monsterOfTheDeeps; - public static int catfishes; - public static int carrotKings; - public static int seaLeeches; - public static int guardianDefenders; - public static int deepSeaProtectors; - public static int hydras; - public static int seaEmperors; - public static double empTime; - public static int empSCs; - public static int fishingMilestone; - // Fishing Winter - public static int frozenSteves; - public static int frostyTheSnowmans; - public static int grinches; - public static int yetis; - public static double yetiTime; - public static int yetiSCs; - // Fishing Festival - public static int nurseSharks; - 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; - - // Mythological - public static double mythCoins; - public static int griffinFeathers; - public static int crownOfGreeds; - public static int washedUpSouvenirs; - public static int minosHunters; - public static int siameseLynxes; - public static int minotaurs; - public static int gaiaConstructs; - public static int minosChampions; - public static int minosInquisitors; - - // Catacombs Dungeons - public static int recombobulators; - public static int fumingPotatoBooks; - // F1 - public static int bonzoStaffs; - public static double f1CoinsSpent; - public static double f1TimeSpent; - // F2 - public static int scarfStudies; - public static int adaptiveSwords; - public static double f2CoinsSpent; - public static double f2TimeSpent; - // F3 - public static int adaptiveHelms; - public static int adaptiveChests; - public static int adaptiveLegs; - public static int adaptiveBoots; - public static double f3CoinsSpent; - public static double f3TimeSpent; - // F4 - public static int spiritWings; - public static int spiritBones; - public static int spiritBoots; - public static int spiritSwords; - public static int spiritBows; - public static int epicSpiritPets; - public static int legSpiritPets; - public static double f4CoinsSpent; - public static double f4TimeSpent; - // F5 - public static int warpedStones; - public static int shadowAssHelms; - public static int shadowAssChests; - public static int shadowAssLegs; - public static int shadowAssBoots; - public static int lastBreaths; - public static int lividDaggers; - public static int shadowFurys; - public static double f5CoinsSpent; - public static double f5TimeSpent; - // F6 - public static int ancientRoses; - public static int precursorEyes; - public static int giantsSwords; - public static int necroLordHelms; - public static int necroLordChests; - public static int necroLordLegs; - public static int necroLordBoots; - public static int necroSwords; - public static double f6CoinsSpent; - public static double f6TimeSpent; - // F7 - public static int witherBloods; - public static int witherCloaks; - public static int implosions; - public static int witherShields; - public static int shadowWarps; - public static int necronsHandles; - public static int autoRecombs; - public static int witherHelms; - public static int witherChests; - public static int witherLegs; - public static int witherBoots; - public static double f7CoinsSpent; - public static double f7TimeSpent; - // Ghosts - public static int sorrows = 0; - public static int bagOfCashs = 0; - public static int voltas = 0; - public static int plasmas = 0; - public static int ghostlyBoots = 0; - // public static double ghostsTimeSpent = -1; - - - - // Single sessions (No config saves) - // Wolf - public static int wolfSvensSession = 0; - public static int wolfTeethSession = 0; - public static int wolfWheelsSession = 0; - public static int wolfWheelsDropsSession = 0; - public static int wolfSpiritsSession = 0; - public static int wolfBooksSession = 0; - public static int wolfEggsSession = 0; - public static int wolfCouturesSession = 0; - public static int wolfBaitsSession = 0; - public static int wolfFluxesSession = 0; - public static double wolfTimeSession = -1; - public static int wolfBossesSession = -1; - // Spider - public static int spiderTarantulasSession = 0; - public static int spiderWebsSession = 0; - public static int spiderTAPSession = 0; - public static int spiderTAPDropsSession = 0; - public static int spiderBitesSession = 0; - public static int spiderCatalystsSession = 0; - public static int spiderBooksSession = 0; - public static int spiderSwattersSession = 0; - public static int spiderTalismansSession = 0; - public static int spiderMosquitosSession = 0; - public static double spiderTimeSession = -1; - public static int spiderBossesSession = -1; - // Zombie - public static int zombieRevsSession = 0; - public static int zombieRevFleshSession = 0; - public static int zombieFoulFleshSession = 0; - public static int zombieFoulFleshDropsSession = 0; - public static int zombiePestilencesSession = 0; - public static int zombieUndeadCatasSession = 0; - public static int zombieBooksSession = 0; - public static int zombieBeheadedsSession = 0; - public static int zombieRevCatasSession = 0; - public static int zombieSnakesSession = 0; - public static int zombieScythesSession = 0; - public static int zombieShardsSession = 0; - public static int zombieWardenHeartsSession = 0; - public static double zombieTimeSession = -1; - public static int zombieBossesSession = -1; - - // Fishing - public static int seaCreaturesSession = 0; - public static int goodCatchesSession = 0; - public static int greatCatchesSession = 0; - public static int squidsSession = 0; - public static int seaWalkersSession = 0; - public static int nightSquidsSession = 0; - public static int seaGuardiansSession = 0; - public static int seaWitchesSession = 0; - public static int seaArchersSession = 0; - public static int monsterOfTheDeepsSession = 0; - public static int catfishesSession = 0; - public static int carrotKingsSession = 0; - public static int seaLeechesSession = 0; - public static int guardianDefendersSession = 0; - public static int deepSeaProtectorsSession = 0; - public static int hydrasSession = 0; - public static int seaEmperorsSession = 0; - public static double empTimeSession = -1; - public static int empSCsSession = -1; - public static int fishingMilestoneSession = 0; - // Fishing Winter - public static int frozenStevesSession = 0; - public static int frostyTheSnowmansSession = 0; - public static int grinchesSession = 0; - public static int yetisSession = 0; - public static double yetiTimeSession = -1; - public static int yetiSCsSession = -1; - // Fishing Festival - public static int nurseSharksSession = 0; - 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; - - // Mythological - public static double mythCoinsSession = 0; - public static int griffinFeathersSession = 0; - public static int crownOfGreedsSession = 0; - public static int washedUpSouvenirsSession = 0; - public static int minosHuntersSession = 0; - public static int siameseLynxesSession = 0; - public static int minotaursSession = 0; - public static int gaiaConstructsSession = 0; - public static int minosChampionsSession = 0; - public static int minosInquisitorsSession = 0; - - // Catacombs Dungeons - public static int recombobulatorsSession = 0; - public static int fumingPotatoBooksSession = 0; - // F1 - public static int bonzoStaffsSession = 0; - public static double f1CoinsSpentSession = 0; - public static double f1TimeSpentSession = 0; - // F2 - public static int scarfStudiesSession = 0; - public static int adaptiveSwordsSession = 0; - public static double f2CoinsSpentSession = 0; - public static double f2TimeSpentSession = 0; - // F3 - public static int adaptiveHelmsSession = 0; - public static int adaptiveChestsSession = 0; - public static int adaptiveLegsSession = 0; - public static int adaptiveBootsSession = 0; - public static double f3CoinsSpentSession = 0; - public static double f3TimeSpentSession = 0; - // F4 - public static int spiritWingsSession = 0; - public static int spiritBonesSession = 0; - public static int spiritBootsSession = 0; - public static int spiritSwordsSession = 0; - public static int spiritBowsSession = 0; - public static int epicSpiritPetsSession = 0; - public static int legSpiritPetsSession = 0; - public static double f4CoinsSpentSession = 0; - public static double f4TimeSpentSession = 0; - // F5 - public static int warpedStonesSession = 0; - public static int shadowAssHelmsSession = 0; - public static int shadowAssChestsSession = 0; - public static int shadowAssLegsSession = 0; - public static int shadowAssBootsSession = 0; - public static int lastBreathsSession = 0; - public static int lividDaggersSession = 0; - public static int shadowFurysSession = 0; - public static double f5CoinsSpentSession = 0; - public static double f5TimeSpentSession = 0; - // F6 - public static int ancientRosesSession = 0; - public static int precursorEyesSession = 0; - public static int giantsSwordsSession = 0; - public static int necroLordHelmsSession = 0; - public static int necroLordChestsSession = 0; - public static int necroLordLegsSession = 0; - public static int necroLordBootsSession = 0; - public static int necroSwordsSession = 0; - public static double f6CoinsSpentSession = 0; - public static double f6TimeSpentSession = 0; - // F7 - public static int witherBloodsSession = 0; - public static int witherCloaksSession = 0; - public static int implosionsSession = 0; - public static int witherShieldsSession = 0; - public static int shadowWarpsSession = 0; - public static int necronsHandlesSession = 0; - public static int autoRecombsSession = 0; - public static int witherHelmsSession = 0; - public static int witherChestsSession = 0; - public static int witherLegsSession = 0; - public static int witherBootsSession = 0; - public static double f7CoinsSpentSession = 0; - public static double f7TimeSpentSession = 0; - // Ghosts - public static int sorrowSession = 0; - public static int bagOfCashSession = 0; - public static int voltaSession = 0; - public static int plasmaSession = 0; - public static int ghostlyBootsSession = 0; - // public static double ghostsSecondsSinceStarts = 0; - - - static double checkItemsNow = 0; - static double itemsChecked = 0; - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void onChat(ClientChatReceivedEvent event) { - String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); - - - if (!Utils.inSkyblock) return; - if (event.type == 2) return; - if (message.contains(":")) return; - - boolean wolfRNG = false; - boolean spiderRNG = false; - boolean zombieRNG = false; - - - - // Slayer tracker - // T6 books - if (message.contains("VERY RARE DROP! (Enchanted Book)") || message.contains("CRAZY RARE DROP! (Enchanted Book)")) { - // Loop through scoreboard to see what boss you're doing - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("Sven Packmaster")) { - wolfBooks++; - ConfigHandler.writeIntConfig("wolf", "book", wolfBooks); - } else if (sCleaned.contains("Tarantula Broodfather")) { - spiderBooks++; - ConfigHandler.writeIntConfig("spider", "book", spiderBooks); - } else if (sCleaned.contains("Revenant Horror")) { - zombieBooks++; - ConfigHandler.writeIntConfig("zombie", "book", zombieBooks); - } - - } - } - - // Wolf - if (message.contains(" Wolf Slayer LVL ")) { - wolfSvens++; - wolfSvensSession++; - if (wolfBosses != -1) { - wolfBosses++; - } - if (wolfBossesSession != -1) { - wolfBossesSession++; - } - ConfigHandler.writeIntConfig("wolf", "svens", wolfSvens); - ConfigHandler.writeIntConfig("wolf", "bossRNG", wolfBosses); - } else if (message.contains("RARE DROP! (Hamster Wheel)")) { - wolfWheelsDrops++; - wolfWheelsDropsSession++; - ConfigHandler.writeIntConfig("wolf", "wheelDrops", wolfWheelsDrops); - } else if (message.contains("VERY RARE DROP! (") && message.contains(" Spirit Rune I)")) { // Removing the unicode here *should* fix rune drops not counting - wolfSpirits++; - wolfSpiritsSession++; - ConfigHandler.writeIntConfig("wolf", "spirit", wolfSpirits); - } else if (message.contains("CRAZY RARE DROP! (Red Claw Egg)")) { - wolfRNG = true; - wolfEggs++; - wolfEggsSession++; - ConfigHandler.writeIntConfig("wolf", "egg", wolfEggs); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_RED + "RED CLAW EGG!", 3); - } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Couture Rune I)")) { - wolfRNG = true; - wolfCoutures++; - wolfCouturesSession++; - ConfigHandler.writeIntConfig("wolf", "couture", wolfCoutures); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "COUTURE RUNE!", 3); - } else if (message.contains("CRAZY RARE DROP! (Grizzly Bait)") || message.contains("CRAZY RARE DROP! (Rename Me)")) { // How did Skyblock devs even manage to make this item Rename Me - wolfRNG = true; - wolfBaits++; - wolfBaitsSession++; - ConfigHandler.writeIntConfig("wolf", "bait", wolfBaits); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "GRIZZLY BAIT!", 3); - } else if (message.contains("CRAZY RARE DROP! (Overflux Capacitor)")) { - wolfRNG = true; - wolfFluxes++; - wolfFluxesSession++; - ConfigHandler.writeIntConfig("wolf", "flux", wolfFluxes); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "OVERFLUX CAPACITOR!", 5); - } else if (message.contains(" Spider Slayer LVL ")) { // Spider - spiderTarantulas++; - spiderTarantulasSession++; - if (spiderBosses != -1) { - spiderBosses++; - } - if (spiderBossesSession != -1) { - spiderBossesSession++; - } - ConfigHandler.writeIntConfig("spider", "tarantulas", spiderTarantulas); - ConfigHandler.writeIntConfig("spider", "bossRNG", spiderBosses); - } else if (message.contains("RARE DROP! (Toxic Arrow Poison)")) { - spiderTAPDrops++; - spiderTAPDropsSession++; - ConfigHandler.writeIntConfig("spider", "tapDrops", spiderTAPDrops); - } else if (message.contains("VERY RARE DROP! (") && message.contains(" Bite Rune I)")) { - spiderBites++; - spiderBitesSession++; - ConfigHandler.writeIntConfig("spider", "bite", spiderBites); - } else if (message.contains("VERY RARE DROP! (Spider Catalyst)")) { - spiderCatalysts++; - spiderCatalystsSession++; - ConfigHandler.writeIntConfig("spider", "catalyst", spiderCatalysts); - } else if (message.contains("CRAZY RARE DROP! (Fly Swatter)")) { - spiderRNG = true; - spiderSwatters++; - spiderSwattersSession++; - ConfigHandler.writeIntConfig("spider", "swatter", spiderSwatters); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.LIGHT_PURPLE + "FLY SWATTER!", 3); - } else if (message.contains("CRAZY RARE DROP! (Tarantula Talisman")) { - spiderRNG = true; - spiderTalismans++; - spiderTalismansSession++; - ConfigHandler.writeIntConfig("spider", "talisman", spiderTalismans); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "TARANTULA TALISMAN!", 3); - } else if (message.contains("CRAZY RARE DROP! (Digested Mosquito)")) { - spiderRNG = true; - spiderMosquitos++; - spiderMosquitosSession++; - ConfigHandler.writeIntConfig("spider", "mosquito", spiderMosquitos); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "DIGESTED MOSQUITO!", 5); - } else if (message.contains(" Zombie Slayer LVL ")) { // Zombie - zombieRevs++; - zombieRevsSession++; - if (zombieBosses != -1) { - zombieBosses++; - } - if (zombieBossesSession != 1) { - zombieBossesSession++; - } - ConfigHandler.writeIntConfig("zombie", "revs", zombieRevs); - ConfigHandler.writeIntConfig("zombie", "bossRNG", zombieBosses); - } else if (message.contains("RARE DROP! (Foul Flesh)")) { - zombieFoulFleshDrops++; - zombieFoulFleshDropsSession++; - ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", zombieFoulFleshDrops); - } else if (message.contains("VERY RARE DROP! (Revenant Catalyst)")) { - zombieRevCatas++; - zombieRevCatasSession++; - ConfigHandler.writeIntConfig("zombie", "revCatalyst", zombieRevCatas); - } else if (message.contains("VERY RARE DROP! (") && message.contains(" Pestilence Rune I)")) { - zombiePestilences++; - zombiePestilencesSession++; - ConfigHandler.writeIntConfig("zombie", "pestilence", zombiePestilences); - } else if (message.contains("VERY RARE DROP! (Undead Catalyst)")) { - zombieUndeadCatas++; - zombieUndeadCatasSession++; - ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", zombieUndeadCatas); - } else if (message.contains("CRAZY RARE DROP! (Beheaded Horror)")) { - zombieRNG = true; - zombieBeheadeds++; - zombieBeheadedsSession++; - ConfigHandler.writeIntConfig("zombie", "beheaded", zombieBeheadeds); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3); - } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Snake Rune I)")) { - zombieRNG = true; - zombieSnakes++; - zombieSnakesSession++; - ConfigHandler.writeIntConfig("zombie", "snake", zombieSnakes); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3); - } else if (message.contains("CRAZY RARE DROP! (Scythe Blade)")) { - zombieRNG = true; - zombieScythes++; - zombieScythesSession++; - ConfigHandler.writeIntConfig("zombie", "scythe", zombieScythes); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5); - } else if (message.contains("CRAZY RARE DROP! (Shard of the Shredded)")) { - zombieRNG = true; - zombieShards++; - zombieShardsSession++; - ConfigHandler.writeIntConfig("zombie", "shard", zombieShards); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "SHARD OF THE SHREDDED!", 5); - } else if (message.contains("INSANE DROP! (Warden Heart)")) { - zombieRNG = true; - zombieWardenHearts++; - zombieWardenHeartsSession++; - ConfigHandler.writeIntConfig("zombie", "heart", zombieWardenHearts); - if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "WARDEN HEART!", 5); - } - - if (wolfRNG) { - wolfTime = System.currentTimeMillis() / 1000; - wolfBosses = 0; - wolfTimeSession = System.currentTimeMillis() / 1000; - wolfBossesSession = 0; - ConfigHandler.writeDoubleConfig("wolf", "timeRNG", wolfTime); - ConfigHandler.writeIntConfig("wolf", "bossRNG", 0); - } - if (spiderRNG) { - spiderTime = System.currentTimeMillis() / 1000; - spiderBosses = 0; - spiderTimeSession = System.currentTimeMillis() / 1000; - spiderBossesSession = 0; - ConfigHandler.writeDoubleConfig("spider", "timeRNG", spiderTime); - ConfigHandler.writeIntConfig("spider", "bossRNG", 0); - } - if (zombieRNG) { - zombieTime = System.currentTimeMillis() / 1000; - zombieBosses = 0; - zombieTimeSession = System.currentTimeMillis() / 1000; - zombieBossesSession = 0; - ConfigHandler.writeDoubleConfig("zombie", "timeRNG", zombieTime); - ConfigHandler.writeIntConfig("zombie", "bossRNG", 0); - } - - // Fishing tracker - if (message.contains("GOOD CATCH!")) { - goodCatches++; - goodCatchesSession++; - ConfigHandler.writeIntConfig("fishing", "goodCatch", goodCatches); - } else if (message.contains("GREAT CATCH!")) { - greatCatches++; - greatCatchesSession++; - ConfigHandler.writeIntConfig("fishing", "greatCatch", greatCatches); - } else if (message.contains("A Squid appeared")) { - squids++; - squidsSession++; - ConfigHandler.writeIntConfig("fishing", "squid", squids); - increaseSeaCreatures(); - } else if (message.contains("You caught a Sea Walker")) { - seaWalkers++; - seaWalkersSession++; - ConfigHandler.writeIntConfig("fishing", "seaWalker", seaWalkers); - increaseSeaCreatures(); - } else if (message.contains("Pitch darkness reveals a Night Squid")) { - nightSquids++; - nightSquidsSession++; - ConfigHandler.writeIntConfig("fishing", "nightSquid", nightSquids); - increaseSeaCreatures(); - } else if (message.contains("You stumbled upon a Sea Guardian")) { - seaGuardians++; - seaGuardiansSession++; - ConfigHandler.writeIntConfig("fishing", "seaGuardian", seaGuardians); - increaseSeaCreatures(); - } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) { - seaWitches++; - seaWitchesSession++; - ConfigHandler.writeIntConfig("fishing", "seaWitch", seaWitches); - increaseSeaCreatures(); - } else if (message.contains("You reeled in a Sea Archer")) { - seaArchers++; - seaArchersSession++; - ConfigHandler.writeIntConfig("fishing", "seaArcher", seaArchers); - increaseSeaCreatures(); - } else if (message.contains("The Monster of the Deep has emerged")) { - monsterOfTheDeeps++; - monsterOfTheDeepsSession++; - ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", monsterOfTheDeeps); - increaseSeaCreatures(); - } else if (message.contains("Huh? A Catfish")) { - catfishes++; - catfishesSession++; - ConfigHandler.writeIntConfig("fishing", "catfish", catfishes); - increaseSeaCreatures(); - } else if (message.contains("Is this even a fish? It's the Carrot King")) { - carrotKings++; - carrotKingsSession++; - ConfigHandler.writeIntConfig("fishing", "carrotKing", carrotKings); - increaseSeaCreatures(); - } else if (message.contains("Gross! A Sea Leech")) { - seaLeeches++; - seaLeechesSession++; - ConfigHandler.writeIntConfig("fishing", "seaLeech", seaLeeches); - increaseSeaCreatures(); - } else if (message.contains("You've discovered a Guardian Defender of the sea")) { - guardianDefenders++; - guardianDefendersSession++; - ConfigHandler.writeIntConfig("fishing", "guardianDefender", guardianDefenders); - increaseSeaCreatures(); - } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) { - deepSeaProtectors++; - deepSeaProtectorsSession++; - ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", deepSeaProtectors); - increaseSeaCreatures(); - } else if (message.contains("The Water Hydra has come to test your strength")) { - hydras++; - hydrasSession++; - ConfigHandler.writeIntConfig("fishing", "hydra", hydras); - increaseSeaCreatures(); - } else if (message.contains("The Sea Emperor arises from the depths")) { - increaseSeaCreatures(); - - seaEmperors++; - empTime = System.currentTimeMillis() / 1000; - empSCs = 0; - seaEmperorsSession++; - empTimeSession = System.currentTimeMillis() / 1000; - empSCsSession = 0; - ConfigHandler.writeIntConfig("fishing", "seaEmperor", seaEmperors); - ConfigHandler.writeDoubleConfig("fishing", "empTime", empTime); - ConfigHandler.writeIntConfig("fishing", "empSC", empSCs); - } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter - frozenSteves++; - frozenStevesSession++; - ConfigHandler.writeIntConfig("fishing", "frozenSteve", frozenSteves); - increaseSeaCreatures(); - } else if (message.contains("It's a snowman! He looks harmless")) { - frostyTheSnowmans++; - frostyTheSnowmansSession++; - ConfigHandler.writeIntConfig("fishing", "snowman", frostyTheSnowmans); - increaseSeaCreatures(); - } else if (message.contains("stole Jerry's Gifts...get them back")) { - grinches++; - grinchesSession++; - ConfigHandler.writeIntConfig("fishing", "grinch", grinches); - increaseSeaCreatures(); - } else if (message.contains("What is this creature")) { - yetis++; - yetiTime = System.currentTimeMillis() / 1000; - yetiSCs = 0; - yetisSession++; - yetiTimeSession = System.currentTimeMillis() / 1000; - yetiSCsSession = 0; - ConfigHandler.writeIntConfig("fishing", "yeti", yetis); - ConfigHandler.writeDoubleConfig("fishing", "yetiTime", yetiTime); - ConfigHandler.writeIntConfig("fishing", "yetiSC", yetiSCs); - increaseSeaCreatures(); - } else if (message.contains("A tiny fin emerges from the water, you've caught a Nurse Shark")) { // Fishing Festival - nurseSharks++; - nurseSharksSession++; - ConfigHandler.writeIntConfig("fishing", "nurseShark", nurseSharks); - increaseSeaCreatures(); - } else if (message.contains("You spot a fin as blue as the water it came from, it's a Blue Shark")) { - blueSharks++; - blueSharksSession++; - ConfigHandler.writeIntConfig("fishing", "blueShark", blueSharks); - increaseSeaCreatures(); - } else if (message.contains("A striped beast bounds from the depths, the wild Tiger Shark")) { - tigerSharks++; - tigerSharksSession++; - ConfigHandler.writeIntConfig("fishing", "tigerShark", tigerSharks); - increaseSeaCreatures(); - } else if (message.contains("Hide no longer, a Great White Shark has tracked your scent and thirsts for your blood")) { - greatWhiteSharks++; - greatWhiteSharksSession++; - ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", greatWhiteSharks); - increaseSeaCreatures(); - } else if (message.contains("Phew! It's only a Scarecrow")) { - scarecrows++; - scarecrowsSession++; - ConfigHandler.writeIntConfig("fishing", "scarecrow", scarecrows); - increaseSeaCreatures(); - } else if (message.contains("You hear trotting from beneath the waves, you caught a Nightmare")) { - nightmares++; - nightmaresSession++; - ConfigHandler.writeIntConfig("fishing", "nightmare", nightmares); - increaseSeaCreatures(); - } else if (message.contains("It must be a full moon, a Werewolf appears")) { - werewolfs++; - werewolfsSession++; - ConfigHandler.writeIntConfig("fishing", "werewolf", werewolfs); - increaseSeaCreatures(); - } else if (message.contains("The spirit of a long lost Phantom Fisher has come to haunt you")) { - phantomFishers++; - phantomFishersSession++; - ConfigHandler.writeIntConfig("fishing", "phantomFisher", phantomFishers); - increaseSeaCreatures(); - } else if (message.contains("This can't be! The manifestation of death himself")) { - grimReapers++; - grimReapersSession++; - ConfigHandler.writeIntConfig("fishing", "grimReaper", grimReapers); - increaseSeaCreatures(); - } - - // Dungeons tracker - if (message.contains(" ")) { - if (message.contains("Recombobulator 3000")) { - recombobulators++; - recombobulatorsSession++; - ConfigHandler.writeIntConfig("catacombs", "recombobulator", recombobulators); - } else if (message.contains("Fuming Potato Book")) { - fumingPotatoBooks++; - fumingPotatoBooksSession++; - ConfigHandler.writeIntConfig("catacombs", "fumingBooks", fumingPotatoBooks); - } else if (message.contains("Bonzo's Staff")) { // F1 - bonzoStaffs++; - bonzoStaffsSession++; - ConfigHandler.writeIntConfig("catacombs", "bonzoStaff", bonzoStaffs); - } else if (message.contains("Scarf's Studies")) { // F2 - scarfStudies++; - scarfStudiesSession++; - ConfigHandler.writeIntConfig("catacombs", "scarfStudies", scarfStudies); - } else if (message.contains("Adaptive Helmet")) { // F3 - adaptiveHelms++; - adaptiveHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveHelm", adaptiveHelms); - } else if (message.contains("Adaptive Chestplate")) { - adaptiveChests++; - adaptiveChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveChest", adaptiveChests); - } else if (message.contains("Adaptive Leggings")) { - adaptiveLegs++; - adaptiveLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveLegging", adaptiveLegs); - } else if (message.contains("Adaptive Boots")) { - adaptiveBoots++; - adaptiveBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveBoot", adaptiveBoots); - } else if (message.contains("Adaptive Blade")) { - adaptiveSwords++; - adaptiveSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "adaptiveSword", adaptiveSwords); - } else if (message.contains("Spirit Wing")) { // F4 - spiritWings++; - spiritWingsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritWing", spiritWings); - } else if (message.contains("Spirit Bone")) { - spiritBones++; - spiritBonesSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritBone", spiritBones); - } else if (message.contains("Spirit Boots")) { - spiritBoots++; - spiritBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritBoot", spiritBoots); - } else if (message.contains("[Lvl 1] Spirit")) { - String formattedMessage = event.message.getFormattedText(); - // Unicode colour code messes up here, just gonna remove the symbols - if (formattedMessage.contains("5Spirit")) { - epicSpiritPets++; - epicSpiritPetsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritPetEpic", epicSpiritPets); - } else if (formattedMessage.contains("6Spirit")) { - legSpiritPets++; - legSpiritPetsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritPetLeg", legSpiritPets); - } - } else if (message.contains("Spirit Sword")) { - spiritSwords++; - spiritSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritSword", spiritSwords); - } else if (message.contains("Spirit Bow")) { - spiritBows++; - spiritBowsSession++; - ConfigHandler.writeIntConfig("catacombs", "spiritBow", spiritBows); - } else if (message.contains("Warped Stone")) { // F5 - warpedStones++; - warpedStonesSession++; - ConfigHandler.writeIntConfig("catacombs", "warpedStone", warpedStones); - } else if (message.contains("Shadow Assassin Helmet")) { - shadowAssHelms++; - shadowAssHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinHelm", shadowAssHelms); - } else if (message.contains("Shadow Assassin Chestplate")) { - shadowAssChests++; - shadowAssChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinChest", shadowAssChests); - } else if (message.contains("Shadow Assassin Leggings")) { - shadowAssLegs++; - shadowAssLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinLegging", shadowAssLegs); - } else if (message.contains("Shadow Assassin Boots")) { - shadowAssBoots++; - shadowAssBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowAssassinBoot", shadowAssBoots); - } else if (message.contains("Livid Dagger")) { - lividDaggers++; - lividDaggersSession++; - ConfigHandler.writeIntConfig("catacombs", "lividDagger", lividDaggers); - } else if (message.contains("Shadow Fury")) { - shadowFurys++; - shadowFurysSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowFury", shadowFurys); - } else if (message.contains("Ancient Rose")) { // F6 - ancientRoses++; - ancientRosesSession++; - ConfigHandler.writeIntConfig("catacombs", "ancientRose", ancientRoses); - } else if (message.contains("Precursor Eye")) { - precursorEyes++; - precursorEyesSession++; - ConfigHandler.writeIntConfig("catacombs", "precursorEye", precursorEyes); - } else if (message.contains("Giant's Sword")) { - giantsSwords++; - giantsSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "giantsSword", giantsSwords); - } else if (message.contains("Necromancer Lord Helmet")) { - necroLordHelms++; - necroLordHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordHelm", necroLordHelms); - } else if (message.contains("Necromancer Lord Chestplate")) { - necroLordChests++; - necroLordChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordChest", necroLordChests); - } else if (message.contains("Necromancer Lord Leggings")) { - necroLordLegs++; - necroLordLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordLegging", necroLordLegs); - } else if (message.contains("Necromancer Lord Boots")) { - necroLordBoots++; - necroLordBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroLordBoot", necroLordBoots); - } else if (message.contains("Necromancer Sword")) { - necroSwords++; - necroSwordsSession++; - ConfigHandler.writeIntConfig("catacombs", "necroSword", necroSwords); - } else if (message.contains("Wither Blood")) { // F7 - witherBloods++; - witherBloodsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherBlood", witherBloods); - } else if (message.contains("Wither Cloak")) { - witherCloaks++; - witherCloaksSession++; - ConfigHandler.writeIntConfig("catacombs", "witherCloak", witherCloaks); - } else if (message.contains("Implosion")) { - implosions++; - implosionsSession++; - ConfigHandler.writeIntConfig("catacombs", "implosion", implosions); - } else if (message.contains("Wither Shield")) { - witherShields++; - witherShieldsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherShield", witherShields); - } else if (message.contains("Shadow Warp")) { - shadowWarps++; - shadowWarpsSession++; - ConfigHandler.writeIntConfig("catacombs", "shadowWarp", shadowWarps); - } else if (message.contains("Necron's Handle")) { - necronsHandles++; - necronsHandlesSession++; - ConfigHandler.writeIntConfig("catacombs", "necronsHandle", necronsHandles); - } else if (message.contains("Auto Recombobulator")) { - autoRecombs++; - autoRecombsSession++; - ConfigHandler.writeIntConfig("catacombs", "autoRecomb", autoRecombs); - } else if (message.contains("Wither Helmet")) { - witherHelms++; - witherHelmsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherHelm", witherHelms); - } else if (message.contains("Wither Chestplate")) { - witherChests++; - witherChestsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherChest", witherChests); - } else if (message.contains("Wither Leggings")) { - witherLegs++; - witherLegsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherLegging", witherLegs); - } else if (message.contains("Wither Boots")) { - witherBoots++; - witherBootsSession++; - ConfigHandler.writeIntConfig("catacombs", "witherBoot", witherBoots); - } - } - - if (message.contains("EXTRA STATS ")) { - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - int timeToAdd = 0; - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - // Add time to floor - if (sCleaned.contains("F1")) { - f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd); - f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent); - } else if (sCleaned.contains("F2")) { - f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd); - f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent); - } else if (sCleaned.contains("F3")) { - f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd); - f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent); - } else if (sCleaned.contains("F4")) { - f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd); - f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent); - } else if (sCleaned.contains("F5")) { - f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd); - f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent); - } else if (sCleaned.contains("F6")) { - f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd); - f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent); - } else if (sCleaned.contains("F7")) { - f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd); - f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent); - } - } else if (sCleaned.contains("Time Elapsed:")) { - // Get floor time - String time = sCleaned.substring(sCleaned.indexOf(":") + 2); - time = time.replaceAll("\\s", ""); - int minutes = Integer.parseInt(time.substring(0, time.indexOf("m"))); - int seconds = Integer.parseInt(time.substring(time.indexOf("m") + 1, time.indexOf("s"))); - timeToAdd = (minutes * 60) + seconds; - } - } - } - - // Mythological Tracker - if (message.contains("You dug out")) { - if (message.contains(" coins!")) { - double coinsEarned = Double.parseDouble(message.replaceAll("[^\\d]", "")); - mythCoins += coinsEarned; - mythCoinsSession += coinsEarned; - ConfigHandler.writeDoubleConfig("mythological", "coins", mythCoins); - } else if (message.contains("a Griffin Feather!")) { - griffinFeathers++; - griffinFeathersSession++; - ConfigHandler.writeIntConfig("mythological", "griffinFeather", griffinFeathers); - } else if (message.contains("a Crown of Greed!")) { - crownOfGreeds++; - crownOfGreedsSession++; - ConfigHandler.writeIntConfig("mythological", "crownOfGreed", crownOfGreeds); - } else if (message.contains("a Washed-up Souvenir!")) { - washedUpSouvenirs++; - washedUpSouvenirsSession++; - ConfigHandler.writeIntConfig("mythological", "washedUpSouvenir", washedUpSouvenirs); - } else if (message.contains("a Minos Hunter!")) { - minosHunters++; - minosHuntersSession++; - ConfigHandler.writeIntConfig("mythological", "minosHunter", minosHunters); - } else if (message.contains("Siamese Lynxes!")) { - siameseLynxes++; - siameseLynxesSession++; - ConfigHandler.writeIntConfig("mythological", "siameseLynx", siameseLynxes); - } else if (message.contains("a Minotaur!")) { - minotaurs++; - minotaursSession++; - ConfigHandler.writeIntConfig("mythological", "minotaur", minotaurs); - } else if (message.contains("a Gaia Construct!")) { - gaiaConstructs++; - gaiaConstructsSession++; - ConfigHandler.writeIntConfig("mythological", "gaiaConstruct", gaiaConstructs); - } else if (message.contains("a Minos Champion!")) { - minosChampions++; - minosChampionsSession++; - ConfigHandler.writeIntConfig("mythological", "minosChampion", minosChampions); - } else if (message.contains("a Minos Inquisitor!")) { - minosInquisitors++; - minosInquisitorsSession++; - ConfigHandler.writeIntConfig("mythological", "minosInquisitor", minosInquisitors); - } - } - - - if (message.contains("RARE DROP!")) { - if (message.contains("Sorrow")) { - sorrows++; - sorrowSession++; - ConfigHandler.writeIntConfig("ghosts", "sorrow", sorrows); - } - if (message.contains("Volta")) { - voltas++; - voltaSession++; - ConfigHandler.writeIntConfig("ghosts", "volta", voltas); - } - if (message.contains("Plasma")) { - plasmas++; - plasmaSession++; - ConfigHandler.writeIntConfig("ghosts", "plasma", plasmas); - } - if (message.contains("Ghostly Boots")) { - ghostlyBoots++; - ghostlyBootsSession++; - ConfigHandler.writeIntConfig("ghosts", "ghostlyBoots", ghostlyBoots); - } - if (message.contains("Bag of Cash")) { - bagOfCashs++; - bagOfCashSession++; - ConfigHandler.writeIntConfig("ghosts", "bagOfCash", bagOfCashs); - } - } - } - - @SubscribeEvent - public void onSlotClick(ChestSlotClickedEvent event) { - ItemStack item = event.item; - - if (event.inventoryName.endsWith(" Chest") && item != null && item.getDisplayName().contains("Open Reward Chest")) { - List<String> tooltip = item.getTooltip(Minecraft.getMinecraft().thePlayer, Minecraft.getMinecraft().gameSettings.advancedItemTooltips); - for (String lineUnclean : tooltip) { - String line = StringUtils.stripControlCodes(lineUnclean); - if (line.contains("FREE")) { - break; - } else if (line.contains(" Coins")) { - int coinsSpent = Integer.parseInt(line.substring(0, line.indexOf(" ")).replaceAll(",", "")); - - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - f1CoinsSpent += coinsSpent; - f1CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent); - } else if (sCleaned.contains("F2")) { - f2CoinsSpent += coinsSpent; - f2CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent); - } else if (sCleaned.contains("F3")) { - f3CoinsSpent += coinsSpent; - f3CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent); - } else if (sCleaned.contains("F4")) { - f4CoinsSpent += coinsSpent; - f4CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent); - } else if (sCleaned.contains("F5")) { - f5CoinsSpent += coinsSpent; - f5CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent); - } else if (sCleaned.contains("F6")) { - f6CoinsSpent += coinsSpent; - f6CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent); - } else if (sCleaned.contains("F7")) { - f7CoinsSpent += coinsSpent; - f7CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent); - } - break; - } - } - break; - } - } - } - } + public static long itemsChecked = 0; @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSound(PlaySoundEvent event) { if (!Utils.inSkyblock) return; if (event.name.equals("note.pling")) { // Don't check twice within 3 seconds - checkItemsNow = System.currentTimeMillis() / 1000; + long checkItemsNow = System.currentTimeMillis() / 1000; if (checkItemsNow - itemsChecked < 3) return; List<String> scoreboard = ScoreboardHandler.getSidebarLines(); @@ -1095,69 +28,42 @@ public class LootTracker { // If Hypixel lags and scoreboard doesn't update if (cleanedLine.contains("Boss slain!") || cleanedLine.contains("Slay the boss!")) { int itemTeeth = Utils.getItems("Wolf Tooth"); - int itemWheels = Utils.getItems("Hamster Wheel"); int itemWebs = Utils.getItems("Tarantula Web"); - int itemTAP = Utils.getItems("Toxic Arrow Poison"); int itemRev = Utils.getItems("Revenant Flesh"); - int itemFoul = Utils.getItems("Foul Flesh"); + int itemNullSphere = Utils.getItems("Null Sphere"); + int itemDerelictAshe = Utils.getItems("Derelict Ashe"); // If no items, are detected, allow check again. Should fix items not being found - if (itemTeeth + itemWheels + itemWebs + itemTAP + itemRev + itemFoul > 0) { + if (itemTeeth + itemWebs + itemRev + itemNullSphere + itemDerelictAshe > 0) { itemsChecked = System.currentTimeMillis() / 1000; - wolfTeeth += itemTeeth; - wolfWheels += itemWheels; - spiderWebs += itemWebs; - spiderTAP += itemTAP; - zombieRevFlesh += itemRev; - zombieFoulFlesh += itemFoul; - wolfTeethSession += itemTeeth; - wolfWheelsSession += itemWheels; - spiderWebsSession += itemWebs; - spiderTAPSession += itemTAP; - zombieRevFleshSession += itemRev; - zombieFoulFleshSession += itemFoul; - - ConfigHandler.writeIntConfig("wolf", "teeth", wolfTeeth); - ConfigHandler.writeIntConfig("wolf", "wheel", wolfWheels); - ConfigHandler.writeIntConfig("spider", "web", spiderWebs); - ConfigHandler.writeIntConfig("spider", "tap", spiderTAP); - ConfigHandler.writeIntConfig("zombie", "revFlesh", zombieRevFlesh); - ConfigHandler.writeIntConfig("zombie", "foulFlesh", zombieFoulFlesh); + WolfTracker.wolfTeeth += itemTeeth; + SpiderTracker.spiderWebs += itemWebs; + ZombieTracker.zombieRevFlesh += itemRev; + EndermanTracker.endermanNullSpheres += itemNullSphere; + BlazeTracker.derelictAshes += itemDerelictAshe; + WolfTracker.wolfTeethSession += itemTeeth; + SpiderTracker.spiderWebsSession += itemWebs; + ZombieTracker.zombieRevFleshSession += itemRev; + EndermanTracker.endermanNullSpheresSession += itemNullSphere; + BlazeTracker.derelictAshesSession += itemDerelictAshe; + + ConfigHandler.writeIntConfig("wolf", "teeth", WolfTracker.wolfTeeth); + ConfigHandler.writeIntConfig("spider", "web", SpiderTracker.spiderWebs); + ConfigHandler.writeIntConfig("zombie", "revFlesh", ZombieTracker.zombieRevFlesh); + ConfigHandler.writeIntConfig("enderman", "nullSpheres", EndermanTracker.endermanNullSpheres); + ConfigHandler.writeIntConfig("blaze", "derelictAshe", BlazeTracker.derelictAshes); } } } } } - - public void increaseSeaCreatures() { - if (empSCs != -1) { - empSCs++; - } - if (empSCsSession != -1) { - empSCsSession++; - } - // Only increment Yetis when in Jerry's Workshop - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("Jerry's Workshop") || sCleaned.contains("Jerry Pond")) { - if (yetiSCs != -1) { - yetiSCs++; - } - if (yetiSCsSession != -1) { - yetiSCsSession++; - } - } - } - seaCreatures++; - fishingMilestone++; - seaCreaturesSession++; - fishingMilestoneSession++; - ConfigHandler.writeIntConfig("fishing", "seaCreature", seaCreatures); - ConfigHandler.writeIntConfig("fishing", "milestone", fishingMilestone); - ConfigHandler.writeIntConfig("fishing", "empSC", empSCs); - ConfigHandler.writeIntConfig("fishing", "yetiSC", yetiSCs); + public static int getAmountfromMessage(String message) { + if (message.charAt(message.indexOf("(") + 2) == 'x' || message.charAt(message.indexOf("(") + 3) == 'x') { + return Integer.parseInt(message.substring(message.indexOf("(") + 1, message.indexOf("x"))); + } else { + return 1; + } } } diff --git a/src/main/java/me/Danker/features/loot/MythologicalTracker.java b/src/main/java/me/Danker/features/loot/MythologicalTracker.java new file mode 100644 index 0000000..9a98466 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/MythologicalTracker.java @@ -0,0 +1,101 @@ +package me.Danker.features.loot; + +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +import java.util.List; + +public class MythologicalTracker { + + public static double mythCoins; + public static int griffinFeathers; + public static int crownOfGreeds; + public static int washedUpSouvenirs; + public static int minosHunters; + public static int siameseLynxes; + public static int minotaurs; + public static int gaiaConstructs; + public static int minosChampions; + public static int minosInquisitors; + + public static double mythCoinsSession = 0; + public static int griffinFeathersSession = 0; + public static int crownOfGreedsSession = 0; + public static int washedUpSouvenirsSession = 0; + public static int minosHuntersSession = 0; + public static int siameseLynxesSession = 0; + public static int minotaursSession = 0; + public static int gaiaConstructsSession = 0; + public static int minosChampionsSession = 0; + public static int minosInquisitorsSession = 0; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + if (message.contains("You dug out")) { + if (message.contains(" coins!")) { + double coinsEarned = Double.parseDouble(message.replaceAll("[^\\d]", "")); + mythCoins += coinsEarned; + mythCoinsSession += coinsEarned; + ConfigHandler.writeDoubleConfig("mythological", "coins", mythCoins); + } else if (message.contains("a Griffin Feather!")) { + griffinFeathers++; + griffinFeathersSession++; + ConfigHandler.writeIntConfig("mythological", "griffinFeather", griffinFeathers); + } else if (message.contains("a Crown of Greed!")) { + crownOfGreeds++; + crownOfGreedsSession++; + ConfigHandler.writeIntConfig("mythological", "crownOfGreed", crownOfGreeds); + } else if (message.contains("a Washed-up Souvenir!")) { + washedUpSouvenirs++; + washedUpSouvenirsSession++; + ConfigHandler.writeIntConfig("mythological", "washedUpSouvenir", washedUpSouvenirs); + } else if (message.contains("a Minos Hunter!")) { + minosHunters++; + minosHuntersSession++; + ConfigHandler.writeIntConfig("mythological", "minosHunter", minosHunters); + } else if (message.contains("Siamese Lynxes!")) { + siameseLynxes++; + siameseLynxesSession++; + ConfigHandler.writeIntConfig("mythological", "siameseLynx", siameseLynxes); + } else if (message.contains("a Minotaur!")) { + minotaurs++; + minotaursSession++; + ConfigHandler.writeIntConfig("mythological", "minotaur", minotaurs); + } else if (message.contains("a Gaia Construct!")) { + gaiaConstructs++; + gaiaConstructsSession++; + ConfigHandler.writeIntConfig("mythological", "gaiaConstruct", gaiaConstructs); + } else if (message.contains("a Minos Champion!")) { + Minecraft mc = Minecraft.getMinecraft(); + List<Entity> listWorldEntity = mc.theWorld.getLoadedEntityList(); + for (Entity entity : listWorldEntity) { + if (entity.getName().contains("Minos Champion")) { + minosChampions++; + minosChampionsSession++; + ConfigHandler.writeIntConfig("mythological", "minosChampion", minosChampions); + } else if (entity.getName().contains("Minos Inquisitor")) { + minosInquisitors++; + minosInquisitorsSession++; + ConfigHandler.writeIntConfig("mythological", "minosInquisitor", minosInquisitors); + } + } + } else if (message.contains("a Minos Inquisitor!")) { + minosInquisitors++; + minosInquisitorsSession++; + ConfigHandler.writeIntConfig("mythological", "minosInquisitor", minosInquisitors); + } + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/SpiderTracker.java b/src/main/java/me/Danker/features/loot/SpiderTracker.java new file mode 100644 index 0000000..34ee695 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/SpiderTracker.java @@ -0,0 +1,110 @@ +package me.Danker.features.loot; + +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class SpiderTracker { + + public static int spiderTarantulas; + public static int spiderWebs; + public static int spiderTAP; + public static int spiderTAPDrops; + public static int spiderBites; + public static int spiderCatalysts; + public static int spiderBooks; + public static int spiderSwatters; + public static int spiderTalismans; + public static int spiderMosquitos; + public static double spiderTime; + public static int spiderBosses; + + public static int spiderTarantulasSession = 0; + public static int spiderWebsSession = 0; + public static int spiderTAPSession = 0; + public static int spiderTAPDropsSession = 0; + public static int spiderBitesSession = 0; + public static int spiderCatalystsSession = 0; + public static int spiderBooksSession = 0; + public static int spiderSwattersSession = 0; + public static int spiderTalismansSession = 0; + public static int spiderMosquitosSession = 0; + public static double spiderTimeSession = -1; + public static int spiderBossesSession = -1; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + boolean rng = false; + + if (message.contains(" Spider Slayer LVL ")) { // Spider + spiderTarantulas++; + spiderTarantulasSession++; + if (spiderBosses != -1) { + spiderBosses++; + } + if (spiderBossesSession != -1) { + spiderBossesSession++; + } + ConfigHandler.writeIntConfig("spider", "tarantulas", spiderTarantulas); + ConfigHandler.writeIntConfig("spider", "bossRNG", spiderBosses); + } else if (message.contains("RARE DROP! (") && message.contains("Toxic Arrow Poison)")) { + int amount = LootTracker.getAmountfromMessage(message); + spiderTAP += amount; + spiderTAPSession += amount; + spiderTAPDrops++; + spiderTAPDropsSession++; + ConfigHandler.writeIntConfig("spider", "tap", spiderTAP); + ConfigHandler.writeIntConfig("spider", "tapDrops", spiderTAPDrops); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Bite Rune I)")) { + spiderBites++; + spiderBitesSession++; + ConfigHandler.writeIntConfig("spider", "bite", spiderBites); + } else if (message.contains("VERY RARE DROP! (Bane of Arthropods VI)")) { + spiderBooks++; + spiderBooksSession++; + ConfigHandler.writeIntConfig("spider", "book", spiderBooks); + } else if (message.contains("VERY RARE DROP! (Spider Catalyst)")) { + spiderCatalysts++; + spiderCatalystsSession++; + ConfigHandler.writeIntConfig("spider", "catalyst", spiderCatalysts); + } else if (message.contains("CRAZY RARE DROP! (Fly Swatter)")) { + rng = true; + spiderSwatters++; + spiderSwattersSession++; + ConfigHandler.writeIntConfig("spider", "swatter", spiderSwatters); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.LIGHT_PURPLE + "FLY SWATTER!", 3); + } else if (message.contains("CRAZY RARE DROP! (Tarantula Talisman")) { + rng = true; + spiderTalismans++; + spiderTalismansSession++; + ConfigHandler.writeIntConfig("spider", "talisman", spiderTalismans); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "TARANTULA TALISMAN!", 3); + } else if (message.contains("CRAZY RARE DROP! (Digested Mosquito)")) { + rng = true; + spiderMosquitos++; + spiderMosquitosSession++; + ConfigHandler.writeIntConfig("spider", "mosquito", spiderMosquitos); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "DIGESTED MOSQUITO!", 5); + } + + if (rng) { + spiderTime = System.currentTimeMillis() / 1000; + spiderBosses = 0; + spiderTimeSession = System.currentTimeMillis() / 1000; + spiderBossesSession = 0; + ConfigHandler.writeDoubleConfig("spider", "timeRNG", spiderTime); + ConfigHandler.writeIntConfig("spider", "bossRNG", 0); + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/WolfTracker.java b/src/main/java/me/Danker/features/loot/WolfTracker.java new file mode 100644 index 0000000..449a3b4 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/WolfTracker.java @@ -0,0 +1,112 @@ +package me.Danker.features.loot; + +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class WolfTracker { + + public static int wolfSvens; + public static int wolfTeeth; + public static int wolfWheels; + public static int wolfWheelsDrops; + public static int wolfSpirits; + public static int wolfBooks; + public static int wolfEggs; + public static int wolfCoutures; + public static int wolfBaits; + public static int wolfFluxes; + public static double wolfTime; + public static int wolfBosses; + + public static int wolfSvensSession = 0; + public static int wolfTeethSession = 0; + public static int wolfWheelsSession = 0; + public static int wolfWheelsDropsSession = 0; + public static int wolfSpiritsSession = 0; + public static int wolfBooksSession = 0; + public static int wolfEggsSession = 0; + public static int wolfCouturesSession = 0; + public static int wolfBaitsSession = 0; + public static int wolfFluxesSession = 0; + public static double wolfTimeSession = -1; + public static int wolfBossesSession = -1; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + boolean rng = false; + + if (message.contains(" Wolf Slayer LVL ")) { + wolfSvens++; + wolfSvensSession++; + if (wolfBosses != -1) { + wolfBosses++; + } + if (wolfBossesSession != -1) { + wolfBossesSession++; + } + ConfigHandler.writeIntConfig("wolf", "svens", wolfSvens); + ConfigHandler.writeIntConfig("wolf", "bossRNG", wolfBosses); + } else if (message.contains("RARE DROP! (") && message.contains("Hamster Wheel)")) { + int amount = LootTracker.getAmountfromMessage(message); + wolfWheels += amount; + wolfWheelsSession += amount; + wolfWheelsDrops++; + wolfWheelsDropsSession++; + ConfigHandler.writeIntConfig("wolf", "wheel", wolfWheels); + ConfigHandler.writeIntConfig("wolf", "wheelDrops", wolfWheelsDrops); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Spirit Rune I)")) { // Removing the unicode here *should* fix rune drops not counting + wolfSpirits++; + wolfSpiritsSession++; + ConfigHandler.writeIntConfig("wolf", "spirit", wolfSpirits); + } else if (message.contains("VERY RARE DROP! (Critical VI)")) { + wolfBooks++; + wolfBooksSession++; + ConfigHandler.writeIntConfig("wolf", "book", wolfBooks); + } else if (message.contains("CRAZY RARE DROP! (Red Claw Egg)")) { + rng = true; + wolfEggs++; + wolfEggsSession++; + ConfigHandler.writeIntConfig("wolf", "egg", wolfEggs); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_RED + "RED CLAW EGG!", 3); + } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Couture Rune I)")) { + rng = true; + wolfCoutures++; + wolfCouturesSession++; + ConfigHandler.writeIntConfig("wolf", "couture", wolfCoutures); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "COUTURE RUNE!", 3); + } else if (message.contains("CRAZY RARE DROP! (Grizzly Bait)") || message.contains("CRAZY RARE DROP! (Rename Me)")) { // How did Skyblock devs even manage to make this item Rename Me + rng = true; + wolfBaits++; + wolfBaitsSession++; + ConfigHandler.writeIntConfig("wolf", "bait", wolfBaits); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "GRIZZLY BAIT!", 3); + } else if (message.contains("CRAZY RARE DROP! (Overflux Capacitor)")) { + rng = true; + wolfFluxes++; + wolfFluxesSession++; + ConfigHandler.writeIntConfig("wolf", "flux", wolfFluxes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "OVERFLUX CAPACITOR!", 5); + } + + if (rng) { + wolfTime = System.currentTimeMillis() / 1000; + wolfBosses = 0; + wolfTimeSession = System.currentTimeMillis() / 1000; + wolfBossesSession = 0; + ConfigHandler.writeDoubleConfig("wolf", "timeRNG", wolfTime); + ConfigHandler.writeIntConfig("wolf", "bossRNG", 0); + } + } + +} diff --git a/src/main/java/me/Danker/features/loot/ZombieTracker.java b/src/main/java/me/Danker/features/loot/ZombieTracker.java new file mode 100644 index 0000000..1d71222 --- /dev/null +++ b/src/main/java/me/Danker/features/loot/ZombieTracker.java @@ -0,0 +1,145 @@ +package me.Danker.features.loot; + +import me.Danker.commands.ToggleCommand; +import me.Danker.handlers.ConfigHandler; +import me.Danker.utils.Utils; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.StringUtils; +import net.minecraftforge.client.event.ClientChatReceivedEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class ZombieTracker { + + public static int zombieRevs; + public static int zombieRevFlesh; + public static int zombieRevViscera; + public static int zombieFoulFlesh; + public static int zombieFoulFleshDrops; + public static int zombiePestilences; + public static int zombieUndeadCatas; + public static int zombieBooks; + public static int zombieBooksT7; + public static int zombieBeheadeds; + public static int zombieRevCatas; + public static int zombieSnakes; + public static int zombieScythes; + public static int zombieShards; + public static int zombieWardenHearts; + public static double zombieTime; + public static int zombieBosses; + + public static int zombieRevsSession = 0; + public static int zombieRevFleshSession = 0; + public static int zombieRevVisceraSession = 0; + public static int zombieFoulFleshSession = 0; + public static int zombieFoulFleshDropsSession = 0; + public static int zombiePestilencesSession = 0; + public static int zombieUndeadCatasSession = 0; + public static int zombieBooksSession = 0; + public static int zombieBooksT7Session = 0; + public static int zombieBeheadedsSession = 0; + public static int zombieRevCatasSession = 0; + public static int zombieSnakesSession = 0; + public static int zombieScythesSession = 0; + public static int zombieShardsSession = 0; + public static int zombieWardenHeartsSession = 0; + public static double zombieTimeSession = -1; + public static int zombieBossesSession = -1; + + @SubscribeEvent + public void onChat(ClientChatReceivedEvent event) { + String message = StringUtils.stripControlCodes(event.message.getUnformattedText()); + + if (!Utils.inSkyblock) return; + if (event.type == 2) return; + if (message.contains(":")) return; + + boolean rng = false; + + if (message.contains(" Zombie Slayer LVL ")) { // Zombie + zombieRevs++; + zombieRevsSession++; + if (zombieBosses != -1) { + zombieBosses++; + } + if (zombieBossesSession != 1) { + zombieBossesSession++; + } + ConfigHandler.writeIntConfig("zombie", "revs", zombieRevs); + ConfigHandler.writeIntConfig("zombie", "bossRNG", zombieBosses); + } else if (message.contains("RARE DROP! (") && message.contains("Revenant Viscera)")) { + int amount = LootTracker.getAmountfromMessage(message); + zombieRevViscera += amount; + zombieRevVisceraSession += amount; + ConfigHandler.writeIntConfig("zombie", "revViscera", zombieRevViscera); + } else if (message.contains("RARE DROP! (") && message.contains("Foul Flesh)")) { + int amount = LootTracker.getAmountfromMessage(message); + zombieFoulFlesh += amount; + zombieFoulFleshSession += amount; + zombieFoulFleshDrops++; + zombieFoulFleshDropsSession++; + ConfigHandler.writeIntConfig("zombie", "foulFlesh", zombieFoulFlesh); + ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", zombieFoulFleshDrops); + } else if (message.contains("VERY RARE DROP! (Revenant Catalyst)")) { + zombieRevCatas++; + zombieRevCatasSession++; + ConfigHandler.writeIntConfig("zombie", "revCatalyst", zombieRevCatas); + } else if (message.contains("VERY RARE DROP! (") && message.contains(" Pestilence Rune I)")) { + zombiePestilences++; + zombiePestilencesSession++; + ConfigHandler.writeIntConfig("zombie", "pestilence", zombiePestilences); + } else if (message.contains("VERY RARE DROP! (Smite VI)")) { + zombieBooks++; + zombieBooksSession++; + ConfigHandler.writeIntConfig("zombie", "book", zombieBooks); + } else if (message.contains("VERY RARE DROP! (Smite VII)")) { + zombieBooksT7++; + zombieBooksT7Session++; + ConfigHandler.writeIntConfig("zombie", "bookT7", zombieBooksT7); + } else if (message.contains("VERY RARE DROP! (Undead Catalyst)")) { + zombieUndeadCatas++; + zombieUndeadCatasSession++; + ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", zombieUndeadCatas); + } else if (message.contains("CRAZY RARE DROP! (Beheaded Horror)")) { + rng = true; + zombieBeheadeds++; + zombieBeheadedsSession++; + ConfigHandler.writeIntConfig("zombie", "beheaded", zombieBeheadeds); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3); + } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Snake Rune I)")) { + rng = true; + zombieSnakes++; + zombieSnakesSession++; + ConfigHandler.writeIntConfig("zombie", "snake", zombieSnakes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3); + } else if (message.contains("CRAZY RARE DROP! (Scythe Blade)")) { + rng = true; + zombieScythes++; + zombieScythesSession++; + ConfigHandler.writeIntConfig("zombie", "scythe", zombieScythes); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5); + } else if (message.contains("CRAZY RARE DROP! (Shard of the Shredded)")) { + rng = true; + zombieShards++; + zombieShardsSession++; + ConfigHandler.writeIntConfig("zombie", "shard", zombieShards); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "SHARD OF THE SHREDDED!", 5); + } else if (message.contains("INSANE DROP! (Warden Heart)") || message.contains("CRAZY RARE DROP! (Warden Heart)")) { + rng = true; + zombieWardenHearts++; + zombieWardenHeartsSession++; + ConfigHandler.writeIntConfig("zombie", "heart", zombieWardenHearts); + if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.RED + "WARDEN HEART!", 5); + } + + if (rng) { + zombieTime = System.currentTimeMillis() / 1000; + zombieBosses = 0; + zombieTimeSession = System.currentTimeMillis() / 1000; + zombieBossesSession = 0; + ConfigHandler.writeDoubleConfig("zombie", "timeRNG", zombieTime); + ConfigHandler.writeIntConfig("zombie", "bossRNG", 0); + } + } + +} diff --git a/src/main/java/me/Danker/features/puzzlesolvers/ArrowTerminalSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/ArrowTerminalSolver.java new file mode 100644 index 0000000..14870f2 --- /dev/null +++ b/src/main/java/me/Danker/features/puzzlesolvers/ArrowTerminalSolver.java @@ -0,0 +1,55 @@ +package me.Danker.features.puzzlesolvers; + +import me.Danker.commands.ToggleCommand; +import me.Danker.events.PacketWriteEvent; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.EntityItemFrame; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.network.play.client.C02PacketUseEntity; +import net.minecraft.util.BlockPos; +import net.minecraftforge.event.entity.player.EntityInteractEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +public class ArrowTerminalSolver { + + @SubscribeEvent + public void onEntityInteract(EntityInteractEvent event) { + Minecraft mc = Minecraft.getMinecraft(); + if (mc.thePlayer != event.entityPlayer) return; + + if (ToggleCommand.itemFrameOnSeaLanternsToggled && Utils.inDungeons && event.target instanceof EntityItemFrame) { + EntityItemFrame itemFrame = (EntityItemFrame) event.target; + ItemStack item = itemFrame.getDisplayedItem(); + if (item == null || item.getItem() != Items.arrow) return; + BlockPos blockPos = Utils.getBlockUnderItemFrame(itemFrame); + if (mc.theWorld.getBlockState(blockPos).getBlock() == Blocks.sea_lantern) { + event.setCanceled(true); + } + } + } + + @SubscribeEvent + public void onPacket(PacketWriteEvent event) { + if (ToggleCommand.itemFrameOnSeaLanternsToggled && Utils.inDungeons && event.packet instanceof C02PacketUseEntity) { + Minecraft mc = Minecraft.getMinecraft(); + C02PacketUseEntity packet = (C02PacketUseEntity) event.packet; + Entity entityHit = packet.getEntityFromWorld(mc.theWorld); + if (entityHit instanceof EntityItemFrame) { + EntityItemFrame itemFrame = (EntityItemFrame) entityHit; + ItemStack item = itemFrame.getDisplayedItem(); + if (item != null && item.getItem() == Items.arrow) { + BlockPos blockPos = Utils.getBlockUnderItemFrame(itemFrame); + if (mc.theWorld.getBlockState(blockPos).getBlock() == Blocks.sea_lantern) { + event.setCanceled(true); + } + } + } + } + + } + +} diff --git a/src/main/java/me/Danker/features/puzzlesolvers/BlazeSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/BlazeSolver.java index 0910fc7..b76e3ca 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/BlazeSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/BlazeSolver.java @@ -2,13 +2,14 @@ package me.Danker.features.puzzlesolvers; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.Entity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.StringUtils; +import net.minecraft.init.Blocks; +import net.minecraft.util.*; import net.minecraft.world.World; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.event.world.WorldEvent; @@ -21,11 +22,15 @@ public class BlazeSolver { static Entity highestBlaze = null; static Entity lowestBlaze = null; + static boolean higherToLower = false; + static boolean foundChest = false; public static int LOWEST_BLAZE_COLOUR; public static int HIGHEST_BLAZE_COLOUR; @SubscribeEvent public void onWorldChange(WorldEvent.Load event) { + higherToLower = false; + foundChest = false; lowestBlaze = null; highestBlaze = null; } @@ -34,9 +39,13 @@ public class BlazeSolver { public void onTick(TickEvent.ClientTickEvent event) { if (event.phase != TickEvent.Phase.START) return; - World world = Minecraft.getMinecraft().theWorld; + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + World world = mc.theWorld; + if (DankersSkyblockMod.tickAmount % 4 == 0) { - if (ToggleCommand.blazeToggled && Utils.inDungeons && world != null) { + if (ToggleCommand.blazeToggled && Utils.inDungeons && world != null && player != null) { + List<Entity> entities = world.getLoadedEntityList(); int highestHealth = 0; highestBlaze = null; @@ -61,6 +70,29 @@ public class BlazeSolver { } } } + + if (!foundChest) { + new Thread(() -> { + Iterable<BlockPos> blocks = BlockPos.getAllInBox(new BlockPos(player.posX - 27, 69, player.posZ - 27), new BlockPos(player.posX + 27, 70, player.posZ + 27)); + for (BlockPos blockPos : blocks) { + Block block = world.getBlockState(blockPos).getBlock(); + if (block == Blocks.chest && world.getBlockState(blockPos.add(0, 1, 0)).getBlock() == Blocks.iron_bars) { + Block blockbelow = world.getBlockState(blockPos.add(0, -1, 0)).getBlock(); + if (blockbelow == Blocks.stone) { + higherToLower = false; + foundChest = true; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Chest located. Sorting from lowest to highest.")); + } else if (blockbelow == Blocks.air) { + higherToLower = true; + foundChest = true; + player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Chest located. Sorting from highest to lowest.")); + } else { + return; + } + } + } + }).start(); + } } } } @@ -68,19 +100,33 @@ public class BlazeSolver { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { if (ToggleCommand.blazeToggled && Utils.inDungeons) { - if (lowestBlaze != null) { - BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); - Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Smallest", LOWEST_BLAZE_COLOUR, 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, LOWEST_BLAZE_COLOUR, event.partialTicks); - } - if (highestBlaze != null) { - BlockPos stringPos = new BlockPos(highestBlaze.posX, highestBlaze.posY + 1, highestBlaze.posZ); - Utils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Biggest", HIGHEST_BLAZE_COLOUR, 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, HIGHEST_BLAZE_COLOUR, event.partialTicks); + if (foundChest) { + if (lowestBlaze != null && !higherToLower) { + BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); + RenderUtils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Shoot me!", LOWEST_BLAZE_COLOUR, 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); + RenderUtils.draw3DBox(aabb, LOWEST_BLAZE_COLOUR, event.partialTicks); + } + if (highestBlaze != null && higherToLower) { + BlockPos stringPos = new BlockPos(highestBlaze.posX, highestBlaze.posY + 1, highestBlaze.posZ); + RenderUtils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Shoot me!", LOWEST_BLAZE_COLOUR, 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); + RenderUtils.draw3DBox(aabb, LOWEST_BLAZE_COLOUR, event.partialTicks); + } + } else { + if (lowestBlaze != null) { + BlockPos stringPos = new BlockPos(lowestBlaze.posX, lowestBlaze.posY + 1, lowestBlaze.posZ); + RenderUtils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Smallest", LOWEST_BLAZE_COLOUR, 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); + RenderUtils.draw3DBox(aabb, LOWEST_BLAZE_COLOUR, event.partialTicks); + } + if (highestBlaze != null) { + BlockPos stringPos = new BlockPos(highestBlaze.posX, highestBlaze.posY + 1, highestBlaze.posZ); + RenderUtils.draw3DString(stringPos, EnumChatFormatting.BOLD + "Biggest", HIGHEST_BLAZE_COLOUR, 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); + RenderUtils.draw3DBox(aabb, HIGHEST_BLAZE_COLOUR, event.partialTicks); + } } } } - } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/BlockWrongTerminalClicks.java b/src/main/java/me/Danker/features/puzzlesolvers/BlockWrongTerminalClicks.java new file mode 100644 index 0000000..7f76059 --- /dev/null +++ b/src/main/java/me/Danker/features/puzzlesolvers/BlockWrongTerminalClicks.java @@ -0,0 +1,93 @@ +package me.Danker.features.puzzlesolvers; + +import me.Danker.commands.ToggleCommand; +import me.Danker.events.ChestSlotClickedEvent; +import me.Danker.utils.Utils; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StringUtils; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.input.Keyboard; + +public class BlockWrongTerminalClicks { + + @SubscribeEvent + public void onSlotClick(ChestSlotClickedEvent event) { + if (ToggleCommand.blockWrongTerminalClicksToggled && Utils.inDungeons) { + IInventory inventory = event.inventory; + String inventoryName = event.inventoryName; + Slot slot = event.slot; + ItemStack item = event.item; + boolean shouldCancel = false; + + if (item == null) return; + + //most of these are extra but who cares + + switch (inventoryName) { + case "Correct all the panes!": + shouldCancel = !StringUtils.stripControlCodes(item.getDisplayName()).startsWith("Off"); + break; + case "Click in order!": + + if (slot.getSlotIndex() > 35) { + break; + } + + if ((item.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane))) { + shouldCancel = true; + break; + } + if (item.getItemDamage() != 14) { + shouldCancel = true; + break; + } + int needed = ClickInOrderSolver.terminalNumberNeeded[0]; + if (needed == 0) break; + shouldCancel = needed != -1 && item.stackSize != needed; + break; + case "Change all to same color!": + if (SameColourSolver.foundColour) { + shouldCancel = SameColourSolver.getDistance(item.getItemDamage(), SameColourSolver.correctColour) == 0; + } + break; + case "Click the button on time!": + int correctPos = -1; + for (int i = 0; i <= 50; i++) { + ItemStack stack = inventory.getStackInSlot(i); + if (stack == null || stack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + + if (stack.getItemDamage() == 10) { + correctPos = i % 9; + } else if (stack.getItemDamage() == 5 && correctPos != -1) { + shouldCancel = i % 9 != correctPos; + break; + } + } + break; + } + + if (!shouldCancel) { + if (inventoryName.startsWith("What starts with:")) { + char letter = inventoryName.charAt(inventoryName.indexOf("'") + 1); + shouldCancel = !(StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter); + } else if (inventoryName.startsWith("Select all the")) { + if (SelectAllColourSolver.terminalColorNeeded == null) return; + String itemName = StringUtils.stripControlCodes(item.getDisplayName()).toUpperCase(); + shouldCancel = !(itemName.contains(SelectAllColourSolver.terminalColorNeeded) || + (SelectAllColourSolver.terminalColorNeeded.equals("SILVER") && itemName.contains("LIGHT GRAY")) || + (SelectAllColourSolver.terminalColorNeeded.equals("WHITE") && (itemName.equals("WOOL") || itemName.equals("BONE MEAL"))) || + (SelectAllColourSolver.terminalColorNeeded.equals("BLACK") && itemName.equals("INK SACK")) || + (SelectAllColourSolver.terminalColorNeeded.equals("BLUE") && itemName.equals("LAPIS LAZULI")) || + (SelectAllColourSolver.terminalColorNeeded.equals("BROWN") && itemName.equals("COCOA BEAN"))); + } + } + + event.setCanceled(shouldCancel && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)); + } + } + +} diff --git a/src/main/java/me/Danker/features/puzzlesolvers/BoulderSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/BoulderSolver.java index 0089038..3096e16 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/BoulderSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/BoulderSolver.java @@ -3,6 +3,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; import me.Danker.utils.BoulderUtils; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -145,7 +146,7 @@ public class BoulderSolver { int[] currentBlockArray = route.get(currentStep); AxisAlignedBB currentBoulder = BoulderUtils.getBoulder(currentBlockArray[0], currentBlockArray[1], chest, boulderRoomDirection); if (currentBoulder == null) return; - Utils.drawFilled3DBox(currentBoulder, BOULDER_COLOUR, true, false, event.partialTicks); + RenderUtils.drawFilled3DBox(currentBoulder, BOULDER_COLOUR, true, false, event.partialTicks); char direction; switch (currentBlockArray[2]) { case 1: diff --git a/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java index 208cf9b..7293f51 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/ChronomatronSolver.java @@ -4,7 +4,7 @@ import me.Danker.commands.ToggleCommand; import me.Danker.events.ChestSlotClickedEvent; import me.Danker.events.GuiChestBackgroundDrawnEvent; import me.Danker.handlers.TextRenderer; -import me.Danker.utils.Utils; +import me.Danker.utils.RenderUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.init.Blocks; @@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.StringUtils; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.input.Keyboard; import java.util.ArrayList; import java.util.List; @@ -32,10 +33,24 @@ public class ChronomatronSolver { if (ToggleCommand.chronomatronToggled && event.inventoryName.startsWith("Chronomatron (")) { IInventory inventory = event.inventory; ItemStack item = event.item; - if (item == null) return; + + if (item == null) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) { + event.setCanceled(true); + } + return; + } if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a") && (item.getItem() == Item.getItemFromBlock(Blocks.stained_glass) || item.getItem() == Item.getItemFromBlock(Blocks.stained_hardened_clay))) { + if (chronomatronPattern.size() > chronomatronMouseClicks && !item.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) { + event.setCanceled(true); + return; + } + } chronomatronMouseClicks++; + } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§aRemember the pattern!")) { + if (event.isCancelable()) event.setCanceled(true); } } } @@ -67,19 +82,13 @@ public class ChronomatronSolver { Slot glassSlot = invSlots.get(i); - if (chronomatronMouseClicks + 1 < chronomatronPattern.size()) { - if (chronomatronPattern.get(chronomatronMouseClicks).equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); - } - } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); - } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT_TO_NEXT + 0XBE000000); - } - } else if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { - Utils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); + + if (glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks))) { + RenderUtils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT + 0xE5000000); + } else if (chronomatronMouseClicks + 1 < chronomatronPattern.size() && glass.getDisplayName().equals(chronomatronPattern.get(chronomatronMouseClicks + 1))) { + RenderUtils.drawOnSlot(chestSize, glassSlot.xDisplayPosition, glassSlot.yDisplayPosition, CHRONOMATRON_NEXT_TO_NEXT + 0XBE000000); } + } } } else if (invSlots.get(49).getStack().getDisplayName().equals("§aRemember the pattern!")) { diff --git a/src/main/java/me/Danker/features/puzzlesolvers/ClickInOrderSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/ClickInOrderSolver.java index e503b37..1665ba7 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/ClickInOrderSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/ClickInOrderSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.commands.ToggleCommand; import me.Danker.events.GuiChestBackgroundDrawnEvent; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; @@ -91,10 +92,10 @@ public class ClickInOrderSolver { int chestSize = event.chestSize; List<Slot> invSlots = event.slots; Slot slot = invSlots.get(terminalNumberNeeded[1]); - Utils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, CLICK_IN_ORDER_NEXT + 0xFF000000); + RenderUtils.drawOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, CLICK_IN_ORDER_NEXT + 0xFF000000); Slot nextSlot = invSlots.get(terminalNumberNeeded[3]); if (nextSlot != slot && nextSlot.getSlotIndex() != 0) { - Utils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, CLICK_IN_ORDER_NEXT_TO_NEXT + 0xFF000000); + RenderUtils.drawOnSlot(chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, CLICK_IN_ORDER_NEXT_TO_NEXT + 0xFF000000); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/CreeperSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/CreeperSolver.java index cd6bcf4..e35abe3 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/CreeperSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/CreeperSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -81,9 +82,10 @@ public class CreeperSolver { Vec3 pos1 = creeperLines.get(i)[0]; Vec3 pos2 = creeperLines.get(i)[1]; int colour = CREEPER_COLOURS[i % 10]; - Utils.draw3DLine(pos1, pos2, colour, 2, true, event.partialTicks); - Utils.drawFilled3DBox(new AxisAlignedBB(pos1.xCoord - 0.51, pos1.yCoord - 0.51, pos1.zCoord - 0.51, pos1.xCoord + 0.51, pos1.yCoord + 0.51, pos1.zCoord + 0.51), colour, true, true, event.partialTicks); - Utils.drawFilled3DBox(new AxisAlignedBB(pos2.xCoord - 0.51, pos2.yCoord - 0.51, pos2.zCoord - 0.51, pos2.xCoord + 0.51, pos2.yCoord + 0.51, pos2.zCoord + 0.51), colour, true, true, event.partialTicks); + + if (ToggleCommand.creeperLinesToggled) RenderUtils.draw3DLine(pos1, pos2, colour, 2, true, event.partialTicks); + RenderUtils.drawFilled3DBox(new AxisAlignedBB(pos1.xCoord - 0.51, pos1.yCoord - 0.51, pos1.zCoord - 0.51, pos1.xCoord + 0.51, pos1.yCoord + 0.51, pos1.zCoord + 0.51), colour, true, true, event.partialTicks); + RenderUtils.drawFilled3DBox(new AxisAlignedBB(pos2.xCoord - 0.51, pos2.yCoord - 0.51, pos2.zCoord - 0.51, pos2.xCoord + 0.51, pos2.yCoord + 0.51, pos2.zCoord + 0.51), colour, true, true, event.partialTicks); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/IceWalkSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/IceWalkSolver.java index eaabf6e..fdcf503 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/IceWalkSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/IceWalkSolver.java @@ -3,6 +3,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; import me.Danker.utils.IceWalkUtils; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -214,7 +215,7 @@ public class IceWalkSolver { default: return; } - Utils.draw3DLine(pos1, pos2, ICE_WALK_LINE_COLOUR, 5, true, event.partialTicks); + RenderUtils.draw3DLine(pos1, pos2, ICE_WALK_LINE_COLOUR, 5, true, event.partialTicks); } } @@ -242,7 +243,7 @@ public class IceWalkSolver { default: return; } - Utils.draw3DLine(pos1, pos2, ICE_WALK_LINE_COLOUR, 5, true, event.partialTicks); + RenderUtils.draw3DLine(pos1, pos2, ICE_WALK_LINE_COLOUR, 5, true, event.partialTicks); } } @@ -270,7 +271,7 @@ public class IceWalkSolver { default: return; } - Utils.draw3DLine(pos1, pos2, ICE_WALK_LINE_COLOUR, 5, true, event.partialTicks); + RenderUtils.draw3DLine(pos1, pos2, ICE_WALK_LINE_COLOUR, 5, true, event.partialTicks); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java index 6f02982..b947cdb 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java @@ -4,7 +4,7 @@ import me.Danker.DankersSkyblockMod; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -38,7 +38,7 @@ public class LividSolver { World world = Minecraft.getMinecraft().theWorld; if (DankersSkyblockMod.tickAmount % 20 == 0) { if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && world != null) { - if (Utils.isInScoreboard("The Catacombs (F5)")) { + if (Utils.currentFloor == Utils.DungeonFloor.F5 || Utils.currentFloor == Utils.DungeonFloor.M5) { List<Entity> loadedLivids = new ArrayList<>(); List<Entity> entities = world.getLoadedEntityList(); for (Entity entity : entities) { @@ -57,7 +57,7 @@ public class LividSolver { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.lividSolverToggled && foundLivid && livid != null) { new TextRenderer(Minecraft.getMinecraft(), livid.getName().replace("" + EnumChatFormatting.BOLD, ""), MoveCommand.lividHpXY[0], MoveCommand.lividHpXY[1], ScaleCommand.lividHpScale); } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/SameColourSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/SameColourSolver.java new file mode 100644 index 0000000..a3c1bc1 --- /dev/null +++ b/src/main/java/me/Danker/features/puzzlesolvers/SameColourSolver.java @@ -0,0 +1,153 @@ +package me.Danker.features.puzzlesolvers; + +import me.Danker.commands.ToggleCommand; +import me.Danker.events.GuiChestBackgroundDrawnEvent; +import me.Danker.utils.RenderUtils; +import me.Danker.utils.Utils; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.gui.inventory.GuiChest; +import net.minecraft.init.Blocks; +import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.event.GuiOpenEvent; +import net.minecraftforge.event.entity.player.ItemTooltipEvent; +import net.minecraftforge.fml.common.eventhandler.EventPriority; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; +import org.apache.commons.lang3.math.NumberUtils; + +import java.util.Arrays; +import java.util.List; + +public class SameColourSolver { + + public static boolean foundColour = false; + public static int correctColour = 0; + static List<Integer> colourLoop = Arrays.asList(14, 1, 4, 13, 11); + + @SubscribeEvent(priority = EventPriority.LOW) + public void onTooltipLow(ItemTooltipEvent event) { + if (!ToggleCommand.sameColourToggled || !Utils.inDungeons) return; + if (event.toolTip == null) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + + if (mc.currentScreen instanceof GuiChest) { + ContainerChest chest = (ContainerChest) player.openContainer; + IInventory inv = chest.getLowerChestInventory(); + String chestName = inv.getDisplayName().getUnformattedText(); + + if (chestName.equals("Change all to same color!")) { + event.toolTip.clear(); + } + } + } + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + if (!ToggleCommand.sameColourToggled || foundColour || !Utils.inDungeons) return; + if (event.phase != TickEvent.Phase.START) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + if (mc.currentScreen instanceof GuiChest) { + if (player == null) return; + ContainerChest chest = (ContainerChest) player.openContainer; + List<Slot> invSlots = ((GuiChest) mc.currentScreen).inventorySlots.inventorySlots; + String chestName = chest.getLowerChestInventory().getDisplayName().getUnformattedText().trim(); + + if (chestName.equals("Change all to same color!")) { + int red = 0; + int orange = 0; + int yellow = 0; + int green = 0; + int blue = 0; + + for (int i = 12; i <= 32; i++) { + ItemStack stack = invSlots.get(i).getStack(); + if (stack == null || stack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (stack.getItemDamage() == 7) continue; + + switch (stack.getItemDamage()) { + case 1: + orange++; + break; + case 4: + yellow++; + break; + case 11: + blue++; + break; + case 13: + green++; + break; + case 14: + red++; + break; + } + } + + int max = NumberUtils.max(new int[]{red, orange, yellow, green, blue}); + if (max == red) { + correctColour = 14; + } else if (max == orange) { + correctColour = 1; + } else if (max == yellow) { + correctColour = 4; + } else if (max == green) { + correctColour = 13; + } else { + correctColour = 11; + } + foundColour = true; + } + } + } + + @SubscribeEvent + public void onGuiRender(GuiChestBackgroundDrawnEvent event) { + if (!ToggleCommand.sameColourToggled || !foundColour || !Utils.inDungeons) return; + + if (event.displayName.equals("Change all to same color!")) { + int chestSize = event.chestSize; + List<Slot> invSlots = event.slots; + + for (int i = 12; i <= 32; i++) { + Slot slot = invSlots.get(i); + ItemStack stack = slot.getStack(); + if (stack == null || stack.getItem() != Item.getItemFromBlock(Blocks.stained_glass_pane)) continue; + if (stack.getItemDamage() == 7) continue; + + int distance = getDistance(stack.getItemDamage(), correctColour); + if (distance == 0) continue; + + RenderUtils.drawTextOnSlot(chestSize, slot.xDisplayPosition, slot.yDisplayPosition, "" + distance); + } + } + } + + @SubscribeEvent + public void onGuiOpen(GuiOpenEvent event) { + if (!(event.gui instanceof GuiChest)) { + foundColour = false; + correctColour = 0; + } + } + + public static int getDistance(int colour, int endColour) { + int index = colourLoop.indexOf(colour); + int finalIndex = colourLoop.indexOf(endColour); + if (index == -1 || finalIndex == -1) return 0; + + if (finalIndex < index) { + return finalIndex - index + 5; + } + return finalIndex - index; + } + +} diff --git a/src/main/java/me/Danker/features/puzzlesolvers/SelectAllColourSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/SelectAllColourSolver.java index 16125db..e43a971 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/SelectAllColourSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/SelectAllColourSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.commands.ToggleCommand; import me.Danker.events.GuiChestBackgroundDrawnEvent; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.inventory.Slot; @@ -45,7 +46,7 @@ public class SelectAllColourSolver { (terminalColorNeeded.equals("BLACK") && itemName.equals("INK SACK")) || (terminalColorNeeded.equals("BLUE") && itemName.equals("LAPIS LAZULI")) || (terminalColorNeeded.equals("BROWN") && itemName.equals("COCOA BEAN"))) { - Utils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + RenderUtils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/SilverfishSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/SilverfishSolver.java index 575dcd3..541a298 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/SilverfishSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/SilverfishSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.RenderUtils; import me.Danker.utils.SilverfishUtils; import me.Danker.utils.Utils; import net.minecraft.block.BlockHopper; @@ -171,7 +172,7 @@ public class SilverfishSolver { default: return; } - Utils.draw3DLine(pos1, pos2, SILVERFISH_LINE_COLOUR, 5, true, event.partialTicks); + RenderUtils.draw3DLine(pos1, pos2, SILVERFISH_LINE_COLOUR, 5, true, event.partialTicks); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/StartsWithSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/StartsWithSolver.java index 8f15fa7..8b79af5 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/StartsWithSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/StartsWithSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.commands.ToggleCommand; import me.Danker.events.GuiChestBackgroundDrawnEvent; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.inventory.Slot; @@ -22,7 +23,7 @@ public class StartsWithSolver { if (item == null) continue; if (item.isItemEnchanted()) continue; if (StringUtils.stripControlCodes(item.getDisplayName()).charAt(0) == letter) { - Utils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); + RenderUtils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, 0xBF40FF40); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/SuperpairsSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/SuperpairsSolver.java index c6e1d76..6f532bd 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/SuperpairsSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/SuperpairsSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.commands.ToggleCommand; import me.Danker.events.GuiChestBackgroundDrawnEvent; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; @@ -135,9 +136,7 @@ public class SuperpairsSolver { ArrayList<Slot> slots = new ArrayList<>(); slotSet.forEach(slotNum -> slots.add(event.slots.get(slotNum))); Color color = colorIterator.next(); - slots.forEach(slot -> { - Utils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, color.getRGB()); - }); + slots.forEach(slot -> RenderUtils.drawOnSlot(event.chestSize, slot.xDisplayPosition, slot.yDisplayPosition, color.getRGB())); }); } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/TeleportPadSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/TeleportPadSolver.java new file mode 100644 index 0000000..8e03671 --- /dev/null +++ b/src/main/java/me/Danker/features/puzzlesolvers/TeleportPadSolver.java @@ -0,0 +1,45 @@ +package me.Danker.features.puzzlesolvers; + +import me.Danker.DankersSkyblockMod; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.util.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.event.world.WorldEvent; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + +import java.util.ArrayList; +import java.util.List; + +public class TeleportPadSolver { + + static List<BlockPos> usedPads = new ArrayList<>(); + static BlockPos finalPad = null; + + @SubscribeEvent + public void onWorldChange(WorldEvent.Load event) { + usedPads.clear(); + finalPad = null; + } + + @SubscribeEvent + public void onTick(TickEvent.ClientTickEvent event) { + if (event.phase != TickEvent.Phase.START) return; + + Minecraft mc = Minecraft.getMinecraft(); + EntityPlayerSP player = mc.thePlayer; + World world = mc.theWorld; + + if (DankersSkyblockMod.tickAmount % 20 == 0) { + + } + } + + @SubscribeEvent + public void onWorldRender(RenderWorldLastEvent event) { + + } + +} diff --git a/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java index 500c8eb..d97509c 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/ThreeManSolver.java @@ -3,6 +3,7 @@ package me.Danker.features.puzzlesolvers; import com.google.gson.JsonArray; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; @@ -34,7 +35,7 @@ public class ThreeManSolver { if (!Utils.inDungeons) return; - if (ToggleCommand.threeManToggled && message.contains("[NPC]")) { + if (ToggleCommand.threeManToggled && message.startsWith("[NPC]")) { if (DankersSkyblockMod.data != null && DankersSkyblockMod.data.has("threeman")) { JsonArray riddleSolutions = DankersSkyblockMod.data.get("threeman").getAsJsonArray(); @@ -59,7 +60,7 @@ public class ThreeManSolver { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { if (ToggleCommand.threeManToggled && riddleChest != null) { - Utils.drawFilled3DBox(new AxisAlignedBB(riddleChest.getX() - 0.05, riddleChest.getY(), riddleChest.getZ() - 0.05, riddleChest.getX() + 1.05, riddleChest.getY() + 1, riddleChest.getZ() + 1.05), 0x197F19, true, true, event.partialTicks); + RenderUtils.drawFilled3DBox(new AxisAlignedBB(riddleChest.getX() - 0.05, riddleChest.getY(), riddleChest.getZ() - 0.05, riddleChest.getX() + 1.05, riddleChest.getY() + 1, riddleChest.getZ() + 1.05), 0x197F19, true, true, event.partialTicks); } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/TicTacToeSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/TicTacToeSolver.java index 1b4a2e1..a50a7b8 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/TicTacToeSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/TicTacToeSolver.java @@ -2,6 +2,7 @@ package me.Danker.features.puzzlesolvers; import me.Danker.DankersSkyblockMod; import me.Danker.commands.ToggleCommand; +import me.Danker.utils.RenderUtils; import me.Danker.utils.TicTacToeUtils; import me.Danker.utils.Utils; import net.minecraft.block.Block; @@ -128,7 +129,7 @@ public class TicTacToeSolver { @SubscribeEvent public void onWorldRender(RenderWorldLastEvent event) { if (ToggleCommand.ticTacToeToggled && correctTicTacToeButton != null) { - Utils.draw3DBox(correctTicTacToeButton, 0x40FF40, event.partialTicks); + RenderUtils.draw3DBox(correctTicTacToeButton, 0x40FF40, event.partialTicks); } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/UltrasequencerSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/UltrasequencerSolver.java index 3df6fc4..6608555 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/UltrasequencerSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/UltrasequencerSolver.java @@ -1,17 +1,20 @@ package me.Danker.features.puzzlesolvers; import me.Danker.commands.ToggleCommand; +import me.Danker.events.ChestSlotClickedEvent; import me.Danker.events.GuiChestBackgroundDrawnEvent; -import me.Danker.utils.Utils; +import me.Danker.utils.RenderUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.inventory.GuiChest; import net.minecraft.inventory.ContainerChest; +import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.util.StringUtils; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; +import org.lwjgl.input.Keyboard; import java.util.List; @@ -50,6 +53,27 @@ public class UltrasequencerSolver { } @SubscribeEvent + public void onSlotClick(ChestSlotClickedEvent event) { + if (ToggleCommand.ultrasequencerToggled && event.inventoryName.startsWith("Ultrasequencer (")) { + IInventory inventory = event.inventory; + if (event.item == null) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) + event.setCanceled(true); + return; + } + if (inventory.getStackInSlot(49).getDisplayName().equals("§aRemember the pattern!")) { + if (event.isCancelable()) event.setCanceled(true); + } else if (inventory.getStackInSlot(49).getDisplayName().startsWith("§7Timer: §a")) { + if (clickInOrderSlots[lastUltraSequencerClicked] != null && event.slot.getSlotIndex() != clickInOrderSlots[lastUltraSequencerClicked].getSlotIndex()) { + if (event.isCancelable() && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) && !Keyboard.isKeyDown(Keyboard.KEY_RCONTROL)) { + event.setCanceled(true); + } + } + } + } + } + + @SubscribeEvent public void onGuiRender(GuiChestBackgroundDrawnEvent event) { if (ToggleCommand.ultrasequencerToggled && event.displayName.startsWith("Ultrasequencer (")) { List<Slot> invSlots = event.slots; @@ -66,12 +90,12 @@ public class UltrasequencerSolver { } if (clickInOrderSlots[lastUltraSequencerClicked] != null) { Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked]; - Utils.drawOnSlot(event.chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT + 0xE5000000); + RenderUtils.drawOnSlot(event.chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT + 0xE5000000); } if (lastUltraSequencerClicked + 1 < clickInOrderSlots.length) { if (clickInOrderSlots[lastUltraSequencerClicked + 1] != null) { Slot nextSlot = clickInOrderSlots[lastUltraSequencerClicked + 1]; - Utils.drawOnSlot(event.chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT_TO_NEXT + 0xD7000000); + RenderUtils.drawOnSlot(event.chestSize, nextSlot.xDisplayPosition, nextSlot.yDisplayPosition, ULTRASEQUENCER_NEXT_TO_NEXT + 0xD7000000); } } } diff --git a/src/main/java/me/Danker/features/puzzlesolvers/WaterSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/WaterSolver.java index 2be92f9..c3a379e 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/WaterSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/WaterSolver.java @@ -4,7 +4,7 @@ import me.Danker.DankersSkyblockMod; import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; -import me.Danker.events.RenderOverlay; +import me.Danker.events.RenderOverlayEvent; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.block.Block; @@ -153,7 +153,7 @@ public class WaterSolver { } @SubscribeEvent - public void renderPlayerInfo(RenderOverlay event) { + public void renderPlayerInfo(RenderOverlayEvent event) { if (ToggleCommand.waterToggled && Utils.inDungeons && waterAnswers != null) { new TextRenderer(Minecraft.getMinecraft(), waterAnswers, MoveCommand.waterAnswerXY[0], MoveCommand.waterAnswerXY[1], ScaleCommand.waterAnswerScale); } |