aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/commands/ImportFishingCommand.java
diff options
context:
space:
mode:
authorbowser0000 <bowser0000@gmail.com>2021-08-28 02:56:06 -0400
committerbowser0000 <bowser0000@gmail.com>2021-08-28 02:56:06 -0400
commitea8413504f2a6663608367ad6ab5fbcad7e6c029 (patch)
treeff19616c49487a4c7ea338c46f5319e6f2c47555 /src/main/java/me/Danker/commands/ImportFishingCommand.java
parent4ea49e306ca14e2f4045045f7895e2c1c5d51d6d (diff)
downloadSkyblockMod-ea8413504f2a6663608367ad6ab5fbcad7e6c029.tar.gz
SkyblockMod-ea8413504f2a6663608367ad6ab5fbcad7e6c029.tar.bz2
SkyblockMod-ea8413504f2a6663608367ad6ab5fbcad7e6c029.zip
A lot of internal changes
Rename RenderOverlay -> RenderOverlayEvent Split loot trackers into own classes Add packet read and write events Move render functions form Utils to RenderUtils Fix warnings in installer frame Move spirit boots fix to own class
Diffstat (limited to 'src/main/java/me/Danker/commands/ImportFishingCommand.java')
-rw-r--r--src/main/java/me/Danker/commands/ImportFishingCommand.java250
1 files changed, 125 insertions, 125 deletions
diff --git a/src/main/java/me/Danker/commands/ImportFishingCommand.java b/src/main/java/me/Danker/commands/ImportFishingCommand.java
index 8d40c0c..f27aa8a 100644
--- a/src/main/java/me/Danker/commands/ImportFishingCommand.java
+++ b/src/main/java/me/Danker/commands/ImportFishingCommand.java
@@ -2,7 +2,7 @@ package me.Danker.commands;
import com.google.gson.JsonObject;
import me.Danker.DankersSkyblockMod;
-import me.Danker.features.loot.LootTracker;
+import me.Danker.features.loot.FishingTracker;
import me.Danker.handlers.APIHandler;
import me.Danker.handlers.ConfigHandler;
import net.minecraft.command.CommandBase;
@@ -64,230 +64,230 @@ public class ImportFishingCommand extends CommandBase {
System.out.println("Fetching fishing stats...");
JsonObject statsObject = profileResponse.get("profile").getAsJsonObject().get("members").getAsJsonObject().get(uuid).getAsJsonObject().get("stats").getAsJsonObject();
- LootTracker.greatCatches = 0;
- LootTracker.goodCatches = 0;
+ FishingTracker.greatCatches = 0;
+ FishingTracker.goodCatches = 0;
if (statsObject.has("items_fished_treasure")) {
if (statsObject.has("items_fished_large_treasure")) {
- LootTracker.greatCatches = statsObject.get("items_fished_large_treasure").getAsInt();
- LootTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt() - LootTracker.greatCatches;
+ FishingTracker.greatCatches = statsObject.get("items_fished_large_treasure").getAsInt();
+ FishingTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt() - FishingTracker.greatCatches;
} else {
- LootTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt();
+ FishingTracker.goodCatches = statsObject.get("items_fished_treasure").getAsInt();
}
}
- LootTracker.seaCreatures = 0;
- LootTracker.squids = 0;
+ FishingTracker.seaCreatures = 0;
+ FishingTracker.squids = 0;
if (statsObject.has("kills_pond_squid")) {
- LootTracker.squids = statsObject.get("kills_pond_squid").getAsInt();
+ FishingTracker.squids = statsObject.get("kills_pond_squid").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.squids;
+ FishingTracker.seaCreatures += FishingTracker.squids;
- LootTracker.seaWalkers = 0;
+ FishingTracker.seaWalkers = 0;
if (statsObject.has("kills_sea_walker")) {
- LootTracker.seaWalkers = statsObject.get("kills_sea_walker").getAsInt();
+ FishingTracker.seaWalkers = statsObject.get("kills_sea_walker").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.seaWalkers;
+ FishingTracker.seaCreatures += FishingTracker.seaWalkers;
- LootTracker.nightSquids = 0;
+ FishingTracker.nightSquids = 0;
if (statsObject.has("kills_night_squid")) {
- LootTracker.nightSquids = statsObject.get("kills_night_squid").getAsInt();
+ FishingTracker.nightSquids = statsObject.get("kills_night_squid").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.nightSquids;
+ FishingTracker.seaCreatures += FishingTracker.nightSquids;
- LootTracker.seaGuardians = 0;
+ FishingTracker.seaGuardians = 0;
if (statsObject.has("kills_sea_guardian")) {
- LootTracker.seaGuardians = statsObject.get("kills_sea_guardian").getAsInt();
+ FishingTracker.seaGuardians = statsObject.get("kills_sea_guardian").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.seaGuardians;
+ FishingTracker.seaCreatures += FishingTracker.seaGuardians;
- LootTracker.seaWitches = 0;
+ FishingTracker.seaWitches = 0;
if (statsObject.has("kills_sea_witch")) {
- LootTracker.seaWitches = statsObject.get("kills_sea_witch").getAsInt();
+ FishingTracker.seaWitches = statsObject.get("kills_sea_witch").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.seaWitches;
+ FishingTracker.seaCreatures += FishingTracker.seaWitches;
- LootTracker.seaArchers = 0;
+ FishingTracker.seaArchers = 0;
if (statsObject.has("kills_sea_archer")) {
- LootTracker.seaArchers = statsObject.get("kills_sea_archer").getAsInt();
+ FishingTracker.seaArchers = statsObject.get("kills_sea_archer").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.seaArchers;
+ FishingTracker.seaCreatures += FishingTracker.seaArchers;
- LootTracker.monsterOfTheDeeps = 0;
+ FishingTracker.monsterOfTheDeeps = 0;
if (statsObject.has("kills_zombie_deep")) {
if (statsObject.has("kills_chicken_deep")) {
- LootTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt() + statsObject.get("kills_chicken_deep").getAsInt();
+ FishingTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt() + statsObject.get("kills_chicken_deep").getAsInt();
} else {
- LootTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt();
+ FishingTracker.monsterOfTheDeeps = statsObject.get("kills_zombie_deep").getAsInt();
}
} else if (statsObject.has("kills_chicken_deep")) {
- LootTracker.monsterOfTheDeeps = statsObject.get("kills_chicken_deep").getAsInt();
+ FishingTracker.monsterOfTheDeeps = statsObject.get("kills_chicken_deep").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.monsterOfTheDeeps;
+ FishingTracker.seaCreatures += FishingTracker.monsterOfTheDeeps;
- LootTracker.catfishes = 0;
+ FishingTracker.catfishes = 0;
if (statsObject.has("kills_catfish")) {
- LootTracker.catfishes = statsObject.get("kills_catfish").getAsInt();
+ FishingTracker.catfishes = statsObject.get("kills_catfish").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.catfishes;
+ FishingTracker.seaCreatures += FishingTracker.catfishes;
- LootTracker.carrotKings = 0;
+ FishingTracker.carrotKings = 0;
if (statsObject.has("kills_carrot_king")) {
- LootTracker.carrotKings = statsObject.get("kills_carrot_king").getAsInt();
+ FishingTracker.carrotKings = statsObject.get("kills_carrot_king").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.carrotKings;
+ FishingTracker.seaCreatures += FishingTracker.carrotKings;
- LootTracker.seaLeeches = 0;
+ FishingTracker.seaLeeches = 0;
if (statsObject.has("kills_sea_leech")) {
- LootTracker.seaLeeches = statsObject.get("kills_sea_leech").getAsInt();
+ FishingTracker.seaLeeches = statsObject.get("kills_sea_leech").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.seaLeeches;
+ FishingTracker.seaCreatures += FishingTracker.seaLeeches;
- LootTracker.guardianDefenders = 0;
+ FishingTracker.guardianDefenders = 0;
if (statsObject.has("kills_guardian_defender")) {
- LootTracker.guardianDefenders = statsObject.get("kills_guardian_defender").getAsInt();
+ FishingTracker.guardianDefenders = statsObject.get("kills_guardian_defender").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.guardianDefenders;
+ FishingTracker.seaCreatures += FishingTracker.guardianDefenders;
- LootTracker.deepSeaProtectors = 0;
+ FishingTracker.deepSeaProtectors = 0;
if (statsObject.has("kills_deep_sea_protector")) {
- LootTracker.deepSeaProtectors = statsObject.get("kills_deep_sea_protector").getAsInt();
+ FishingTracker.deepSeaProtectors = statsObject.get("kills_deep_sea_protector").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.deepSeaProtectors;
+ FishingTracker.seaCreatures += FishingTracker.deepSeaProtectors;
- LootTracker.hydras = 0;
+ FishingTracker.hydras = 0;
if (statsObject.has("kills_water_hydra")) {
// Hydra splits
- LootTracker.hydras = statsObject.get("kills_water_hydra").getAsInt() / 2;
+ FishingTracker.hydras = statsObject.get("kills_water_hydra").getAsInt() / 2;
}
- LootTracker.seaCreatures += LootTracker.hydras;
+ FishingTracker.seaCreatures += FishingTracker.hydras;
- LootTracker.seaEmperors = 0;
+ FishingTracker.seaEmperors = 0;
if (statsObject.has("kills_skeleton_emperor")) {
if (statsObject.has("kills_guardian_emperor")) {
- LootTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt() + statsObject.get("kills_guardian_emperor").getAsInt();
+ FishingTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt() + statsObject.get("kills_guardian_emperor").getAsInt();
} else {
- LootTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt();
+ FishingTracker.seaEmperors = statsObject.get("kills_skeleton_emperor").getAsInt();
}
} else if (statsObject.has("kills_guardian_emperor")) {
- LootTracker.seaEmperors = statsObject.get("kills_guardian_emperor").getAsInt();
+ FishingTracker.seaEmperors = statsObject.get("kills_guardian_emperor").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.seaEmperors;
+ FishingTracker.seaCreatures += FishingTracker.seaEmperors;
- LootTracker.fishingMilestone = 0;
+ FishingTracker.fishingMilestone = 0;
if (statsObject.has("pet_milestone_sea_creatures_killed")) {
- LootTracker.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt();
+ FishingTracker.fishingMilestone = statsObject.get("pet_milestone_sea_creatures_killed").getAsInt();
}
- LootTracker.frozenSteves = 0;
+ FishingTracker.frozenSteves = 0;
if (statsObject.has("kills_frozen_steve")) {
- LootTracker.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt();
+ FishingTracker.frozenSteves = statsObject.get("kills_frozen_steve").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.frozenSteves;
+ FishingTracker.seaCreatures += FishingTracker.frozenSteves;
- LootTracker.frostyTheSnowmans = 0;
+ FishingTracker.frostyTheSnowmans = 0;
if (statsObject.has("kills_frosty_the_snowman")) {
- LootTracker.frostyTheSnowmans = statsObject.get("kills_frosty_the_snowman").getAsInt();
+ FishingTracker.frostyTheSnowmans = statsObject.get("kills_frosty_the_snowman").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.frostyTheSnowmans;
+ FishingTracker.seaCreatures += FishingTracker.frostyTheSnowmans;
- LootTracker.grinches = 0;
+ FishingTracker.grinches = 0;
if (statsObject.has("kills_grinch")) {
- LootTracker.grinches = statsObject.get("kills_grinch").getAsInt();
+ FishingTracker.grinches = statsObject.get("kills_grinch").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.grinches;
+ FishingTracker.seaCreatures += FishingTracker.grinches;
- LootTracker.yetis = 0;
+ FishingTracker.yetis = 0;
if (statsObject.has("kills_yeti")) {
- LootTracker.yetis = statsObject.get("kills_yeti").getAsInt();
+ FishingTracker.yetis = statsObject.get("kills_yeti").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.yetis;
+ FishingTracker.seaCreatures += FishingTracker.yetis;
- LootTracker.nurseSharks = 0;
+ FishingTracker.nurseSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- LootTracker.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt();
+ FishingTracker.nurseSharks = statsObject.get("kills_nurse_shark").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.nurseSharks;
+ FishingTracker.seaCreatures += FishingTracker.nurseSharks;
- LootTracker.blueSharks = 0;
+ FishingTracker.blueSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- LootTracker.blueSharks = statsObject.get("kills_blue_shark").getAsInt();
+ FishingTracker.blueSharks = statsObject.get("kills_blue_shark").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.blueSharks;
+ FishingTracker.seaCreatures += FishingTracker.blueSharks;
- LootTracker.tigerSharks = 0;
+ FishingTracker.tigerSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- LootTracker.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt();
+ FishingTracker.tigerSharks = statsObject.get("kills_tiger_shark").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.tigerSharks;
+ FishingTracker.seaCreatures += FishingTracker.tigerSharks;
- LootTracker.greatWhiteSharks = 0;
+ FishingTracker.greatWhiteSharks = 0;
if (statsObject.has("kills_nurse_shark")) {
- LootTracker.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt();
+ FishingTracker.greatWhiteSharks = statsObject.get("kills_great_white_shark").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.greatWhiteSharks;
+ FishingTracker.seaCreatures += FishingTracker.greatWhiteSharks;
- LootTracker.scarecrows = 0;
+ FishingTracker.scarecrows = 0;
if (statsObject.has("kills_scarecrow")) {
- LootTracker.scarecrows = statsObject.get("kills_scarecrow").getAsInt();
+ FishingTracker.scarecrows = statsObject.get("kills_scarecrow").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.scarecrows;
+ FishingTracker.seaCreatures += FishingTracker.scarecrows;
- LootTracker.nightmares = 0;
+ FishingTracker.nightmares = 0;
if (statsObject.has("kills_nightmare")) {
- LootTracker.nightmares = statsObject.get("kills_nightmare").getAsInt();
+ FishingTracker.nightmares = statsObject.get("kills_nightmare").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.nightmares;
+ FishingTracker.seaCreatures += FishingTracker.nightmares;
- LootTracker.werewolfs = 0;
+ FishingTracker.werewolfs = 0;
if (statsObject.has("kills_werewolf")) {
- LootTracker.werewolfs = statsObject.get("kills_werewolf").getAsInt();
+ FishingTracker.werewolfs = statsObject.get("kills_werewolf").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.werewolfs;
+ FishingTracker.seaCreatures += FishingTracker.werewolfs;
- LootTracker.phantomFishers = 0;
+ FishingTracker.phantomFishers = 0;
if (statsObject.has("kills_phantom_fisherman")) {
- LootTracker.phantomFishers = statsObject.get("kills_phantom_fisherman").getAsInt();
+ FishingTracker.phantomFishers = statsObject.get("kills_phantom_fisherman").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.phantomFishers;
+ FishingTracker.seaCreatures += FishingTracker.phantomFishers;
- LootTracker.grimReapers = 0;
+ FishingTracker.grimReapers = 0;
if (statsObject.has("kills_grim_reaper")) {
- LootTracker.grimReapers = statsObject.get("kills_grim_reaper").getAsInt();
+ FishingTracker.grimReapers = statsObject.get("kills_grim_reaper").getAsInt();
}
- LootTracker.seaCreatures += LootTracker.grimReapers;
+ FishingTracker.seaCreatures += FishingTracker.grimReapers;
System.out.println("Writing to config...");
- ConfigHandler.writeIntConfig("fishing", "goodCatch", LootTracker.goodCatches);
- ConfigHandler.writeIntConfig("fishing", "greatCatch", LootTracker.greatCatches);
- ConfigHandler.writeIntConfig("fishing", "seaCreature", LootTracker.seaCreatures);
- ConfigHandler.writeIntConfig("fishing", "squid", LootTracker.squids);
- ConfigHandler.writeIntConfig("fishing", "seaWalker", LootTracker.seaWalkers);
- ConfigHandler.writeIntConfig("fishing", "nightSquid", LootTracker.nightSquids);
- ConfigHandler.writeIntConfig("fishing", "seaGuardian", LootTracker.seaGuardians);
- ConfigHandler.writeIntConfig("fishing", "seaWitch", LootTracker.seaWitches);
- ConfigHandler.writeIntConfig("fishing", "seaArcher", LootTracker.seaArchers);
- ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", LootTracker.monsterOfTheDeeps);
- ConfigHandler.writeIntConfig("fishing", "catfish", LootTracker.catfishes);
- ConfigHandler.writeIntConfig("fishing", "carrotKing", LootTracker.carrotKings);
- ConfigHandler.writeIntConfig("fishing", "seaLeech", LootTracker.seaLeeches);
- ConfigHandler.writeIntConfig("fishing", "guardianDefender", LootTracker.guardianDefenders);
- ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", LootTracker.deepSeaProtectors);
- ConfigHandler.writeIntConfig("fishing", "hydra", LootTracker.hydras);
- ConfigHandler.writeIntConfig("fishing", "seaEmperor", LootTracker.seaEmperors);
- ConfigHandler.writeIntConfig("fishing", "milestone", LootTracker.fishingMilestone);
- ConfigHandler.writeIntConfig("fishing", "frozenSteve", LootTracker.frozenSteves);
- ConfigHandler.writeIntConfig("fishing", "snowman", LootTracker.frostyTheSnowmans);
- ConfigHandler.writeIntConfig("fishing", "grinch", LootTracker.grinches);
- ConfigHandler.writeIntConfig("fishing", "yeti", LootTracker.yetis);
- ConfigHandler.writeIntConfig("fishing", "nurseShark", LootTracker.nurseSharks);
- ConfigHandler.writeIntConfig("fishing", "blueShark", LootTracker.blueSharks);
- ConfigHandler.writeIntConfig("fishing", "tigerShark", LootTracker.tigerSharks);
- ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", LootTracker.greatWhiteSharks);
- ConfigHandler.writeIntConfig("fishing", "scarecrow", LootTracker.scarecrows);
- ConfigHandler.writeIntConfig("fishing", "nightmare", LootTracker.nightmares);
- ConfigHandler.writeIntConfig("fishing", "werewolf", LootTracker.werewolfs);
- ConfigHandler.writeIntConfig("fishing", "phantomFisher", LootTracker.phantomFishers);
- ConfigHandler.writeIntConfig("fishing", "grimReaper", LootTracker.grimReapers);
+ ConfigHandler.writeIntConfig("fishing", "goodCatch", FishingTracker.goodCatches);
+ ConfigHandler.writeIntConfig("fishing", "greatCatch", FishingTracker.greatCatches);
+ ConfigHandler.writeIntConfig("fishing", "seaCreature", FishingTracker.seaCreatures);
+ ConfigHandler.writeIntConfig("fishing", "squid", FishingTracker.squids);
+ ConfigHandler.writeIntConfig("fishing", "seaWalker", FishingTracker.seaWalkers);
+ ConfigHandler.writeIntConfig("fishing", "nightSquid", FishingTracker.nightSquids);
+ ConfigHandler.writeIntConfig("fishing", "seaGuardian", FishingTracker.seaGuardians);
+ ConfigHandler.writeIntConfig("fishing", "seaWitch", FishingTracker.seaWitches);
+ ConfigHandler.writeIntConfig("fishing", "seaArcher", FishingTracker.seaArchers);
+ ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", FishingTracker.monsterOfTheDeeps);
+ ConfigHandler.writeIntConfig("fishing", "catfish", FishingTracker.catfishes);
+ ConfigHandler.writeIntConfig("fishing", "carrotKing", FishingTracker.carrotKings);
+ ConfigHandler.writeIntConfig("fishing", "seaLeech", FishingTracker.seaLeeches);
+ ConfigHandler.writeIntConfig("fishing", "guardianDefender", FishingTracker.guardianDefenders);
+ ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", FishingTracker.deepSeaProtectors);
+ ConfigHandler.writeIntConfig("fishing", "hydra", FishingTracker.hydras);
+ ConfigHandler.writeIntConfig("fishing", "seaEmperor", FishingTracker.seaEmperors);
+ ConfigHandler.writeIntConfig("fishing", "milestone", FishingTracker.fishingMilestone);
+ ConfigHandler.writeIntConfig("fishing", "frozenSteve", FishingTracker.frozenSteves);
+ ConfigHandler.writeIntConfig("fishing", "snowman", FishingTracker.frostyTheSnowmans);
+ ConfigHandler.writeIntConfig("fishing", "grinch", FishingTracker.grinches);
+ ConfigHandler.writeIntConfig("fishing", "yeti", FishingTracker.yetis);
+ ConfigHandler.writeIntConfig("fishing", "nurseShark", FishingTracker.nurseSharks);
+ ConfigHandler.writeIntConfig("fishing", "blueShark", FishingTracker.blueSharks);
+ ConfigHandler.writeIntConfig("fishing", "tigerShark", FishingTracker.tigerSharks);
+ ConfigHandler.writeIntConfig("fishing", "greatWhiteShark", FishingTracker.greatWhiteSharks);
+ ConfigHandler.writeIntConfig("fishing", "scarecrow", FishingTracker.scarecrows);
+ ConfigHandler.writeIntConfig("fishing", "nightmare", FishingTracker.nightmares);
+ ConfigHandler.writeIntConfig("fishing", "werewolf", FishingTracker.werewolfs);
+ ConfigHandler.writeIntConfig("fishing", "phantomFisher", FishingTracker.phantomFishers);
+ ConfigHandler.writeIntConfig("fishing", "grimReaper", FishingTracker.grimReapers);
player.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Fishing stats imported."));
}).start();