aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/features/loot/BlazeTracker.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2022-04-20 22:52:26 -0400
committerbowser0000 <bowser0000@gmail.com>2022-04-20 22:52:26 -0400
commitf214832fb6f315d59d876267f71e9e9f0a6082fd (patch)
tree7e91ac59569230e587cb5060f42356241a07ea97 /src/main/java/me/Danker/features/loot/BlazeTracker.java
parent9b65362e8e85a8fc783fdb2a1c94f6df51f9450f (diff)
downloadSkyblockMod-f214832fb6f315d59d876267f71e9e9f0a6082fd.tar.gz
SkyblockMod-f214832fb6f315d59d876267f71e9e9f0a6082fd.tar.bz2
SkyblockMod-f214832fb6f315d59d876267f71e9e9f0a6082fd.zip
Add blaze slayer support + tracker
Diffstat (limited to 'src/main/java/me/Danker/features/loot/BlazeTracker.java')
-rw-r--r--src/main/java/me/Danker/features/loot/BlazeTracker.java184
1 files changed, 184 insertions, 0 deletions
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);
+ }
+ }
+
+}