diff options
author | bowser0000 <bowser0000@gmail.com> | 2021-08-28 02:56:06 -0400 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2021-08-28 02:56:06 -0400 |
commit | ea8413504f2a6663608367ad6ab5fbcad7e6c029 (patch) | |
tree | ff19616c49487a4c7ea338c46f5319e6f2c47555 /src/main/java/me/Danker/handlers | |
parent | 4ea49e306ca14e2f4045045f7895e2c1c5d51d6d (diff) | |
download | SkyblockMod-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/handlers')
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 341 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/PacketHandler.java | 33 |
2 files changed, 187 insertions, 187 deletions
diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 98368e1..6655d43 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -5,8 +5,7 @@ import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; import me.Danker.features.*; -import me.Danker.features.loot.LootDisplay; -import me.Danker.features.loot.LootTracker; +import me.Danker.features.loot.*; import me.Danker.features.puzzlesolvers.*; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; @@ -295,196 +294,196 @@ public class ConfigHandler { if (!hasKey("api", "APIKey")) writeStringConfig("api", "APIKey", ""); // Wolf - LootTracker.wolfSvens = initInt("wolf", "svens", 0); - LootTracker.wolfTeeth = initInt("wolf", "teeth", 0); - LootTracker.wolfWheels = initInt("wolf", "wheel", 0); - LootTracker.wolfWheelsDrops = initInt("wolf", "wheelDrops", 0); - LootTracker.wolfSpirits = initInt("wolf", "spirit", 0); - LootTracker.wolfBooks = initInt("wolf", "book", 0); - LootTracker.wolfEggs = initInt("wolf", "egg", 0); - LootTracker.wolfCoutures = initInt("wolf", "couture", 0); - LootTracker.wolfBaits = initInt("wolf", "bait", 0); - LootTracker.wolfFluxes = initInt("wolf", "flux", 0); - LootTracker.wolfTime = initDouble("wolf", "timeRNG", -1); - LootTracker.wolfBosses = initInt("wolf", "bossRNG", -1); + WolfTracker.wolfSvens = initInt("wolf", "svens", 0); + WolfTracker.wolfTeeth = initInt("wolf", "teeth", 0); + WolfTracker.wolfWheels = initInt("wolf", "wheel", 0); + WolfTracker.wolfWheelsDrops = initInt("wolf", "wheelDrops", 0); + WolfTracker.wolfSpirits = initInt("wolf", "spirit", 0); + WolfTracker.wolfBooks = initInt("wolf", "book", 0); + WolfTracker.wolfEggs = initInt("wolf", "egg", 0); + WolfTracker.wolfCoutures = initInt("wolf", "couture", 0); + WolfTracker.wolfBaits = initInt("wolf", "bait", 0); + WolfTracker.wolfFluxes = initInt("wolf", "flux", 0); + WolfTracker.wolfTime = initDouble("wolf", "timeRNG", -1); + WolfTracker.wolfBosses = initInt("wolf", "bossRNG", -1); // Spider - LootTracker.spiderTarantulas = initInt("spider", "tarantulas", 0); - LootTracker.spiderWebs = initInt("spider", "web", 0); - LootTracker.spiderTAP = initInt("spider", "tap", 0); - LootTracker.spiderTAPDrops = initInt("spider", "tapDrops", 0); - LootTracker.spiderBites = initInt("spider", "bite", 0); - LootTracker.spiderCatalysts = initInt("spider", "catalyst", 0); - LootTracker.spiderBooks = initInt("spider", "book", 0); - LootTracker.spiderSwatters = initInt("spider", "swatter", 0); - LootTracker.spiderTalismans = initInt("spider", "talisman", 0); - LootTracker.spiderMosquitos = initInt("spider", "mosquito", 0); - LootTracker.spiderTime = initDouble("spider", "timeRNG", -1); - LootTracker.spiderBosses = initInt("spider", "bossRNG", -1); + SpiderTracker.spiderTarantulas = initInt("spider", "tarantulas", 0); + SpiderTracker.spiderWebs = initInt("spider", "web", 0); + SpiderTracker.spiderTAP = initInt("spider", "tap", 0); + SpiderTracker.spiderTAPDrops = initInt("spider", "tapDrops", 0); + SpiderTracker.spiderBites = initInt("spider", "bite", 0); + SpiderTracker.spiderCatalysts = initInt("spider", "catalyst", 0); + SpiderTracker.spiderBooks = initInt("spider", "book", 0); + SpiderTracker.spiderSwatters = initInt("spider", "swatter", 0); + SpiderTracker.spiderTalismans = initInt("spider", "talisman", 0); + SpiderTracker.spiderMosquitos = initInt("spider", "mosquito", 0); + SpiderTracker.spiderTime = initDouble("spider", "timeRNG", -1); + SpiderTracker.spiderBosses = initInt("spider", "bossRNG", -1); // Zombie - LootTracker.zombieRevs = initInt("zombie", "revs", 0); - LootTracker.zombieRevFlesh = initInt("zombie", "revFlesh", 0); - LootTracker.zombieRevViscera = initInt("zombie", "revViscera", 0); - LootTracker.zombieFoulFlesh = initInt("zombie", "foulFlesh", 0); - LootTracker.zombieFoulFleshDrops = initInt("zombie", "foulFleshDrops", 0); - LootTracker.zombiePestilences = initInt("zombie", "pestilence", 0); - LootTracker.zombieUndeadCatas = initInt("zombie", "undeadCatalyst", 0); - LootTracker.zombieBooks = initInt("zombie", "book", 0); - LootTracker.zombieBeheadeds = initInt("zombie", "beheaded", 0); - LootTracker.zombieRevCatas = initInt("zombie", "revCatalyst", 0); - LootTracker.zombieSnakes = initInt("zombie", "snake", 0); - LootTracker.zombieScythes = initInt("zombie", "scythe", 0); - LootTracker.zombieShards = initInt("zombie", "shard", 0); - LootTracker.zombieWardenHearts = initInt("zombie", "heart", 0); - LootTracker.zombieTime = initDouble("zombie", "timeRNG", -1); - LootTracker.zombieBosses = initInt("zombie", "bossRNG", -1); + ZombieTracker.zombieRevs = initInt("zombie", "revs", 0); + ZombieTracker.zombieRevFlesh = initInt("zombie", "revFlesh", 0); + ZombieTracker.zombieRevViscera = initInt("zombie", "revViscera", 0); + ZombieTracker.zombieFoulFlesh = initInt("zombie", "foulFlesh", 0); + ZombieTracker.zombieFoulFleshDrops = initInt("zombie", "foulFleshDrops", 0); + ZombieTracker.zombiePestilences = initInt("zombie", "pestilence", 0); + ZombieTracker.zombieUndeadCatas = initInt("zombie", "undeadCatalyst", 0); + ZombieTracker.zombieBooks = initInt("zombie", "book", 0); + ZombieTracker.zombieBeheadeds = initInt("zombie", "beheaded", 0); + ZombieTracker.zombieRevCatas = initInt("zombie", "revCatalyst", 0); + ZombieTracker.zombieSnakes = initInt("zombie", "snake", 0); + ZombieTracker.zombieScythes = initInt("zombie", "scythe", 0); + ZombieTracker.zombieShards = initInt("zombie", "shard", 0); + ZombieTracker.zombieWardenHearts = initInt("zombie", "heart", 0); + ZombieTracker.zombieTime = initDouble("zombie", "timeRNG", -1); + ZombieTracker.zombieBosses = initInt("zombie", "bossRNG", -1); // Enderman - LootTracker.endermanVoidglooms = initInt("enderman", "voidglooms", 0); - LootTracker.endermanNullSpheres = initInt("enderman", "nullSpheres", 0); - LootTracker.endermanTAP = initInt("enderman", "tap", 0); - LootTracker.endermanTAPDrops = initInt("enderman", "tapDrops", 0); - LootTracker.endermanEndersnakes = initInt("enderman", "endersnakes", 0); - LootTracker.endermanSummoningEyes = initInt("enderman", "summoningEyes", 0); - LootTracker.endermanManaBooks = initInt("enderman", "manaBooks", 0); - LootTracker.endermanTuners = initInt("enderman", "tuners", 0); - LootTracker.endermanAtoms = initInt("enderman", "atoms", 0); - LootTracker.endermanEspressoMachines = initInt("enderman", "espressoMachines", 0); - LootTracker.endermanSmartyBooks = initInt("enderman", "smartyBooks", 0); - LootTracker.endermanEndRunes = initInt("enderman", "endRunes", 0); - LootTracker.endermanChalices = initInt("enderman", "chalices", 0); - LootTracker.endermanDice = initInt("enderman", "dice", 0); - LootTracker.endermanArtifacts = initInt("enderman", "artifacts", 0); - LootTracker.endermanSkins = initInt("enderman", "skins", 0); - LootTracker.endermanMergers = initInt("enderman", "mergers", 0); - LootTracker.endermanCores = initInt("enderman", "cores", 0); - LootTracker.endermanEnchantRunes = initInt("enderman", "enchantRunes", 0); - LootTracker.endermanEnderBooks = initInt("enderman", "enderBooks", 0); - LootTracker.endermanTime = initDouble("enderman", "timeRNG", -1); - LootTracker.endermanBosses = initInt("enderman", "bossRNG", -1); + EndermanTracker.endermanVoidglooms = initInt("enderman", "voidglooms", 0); + EndermanTracker.endermanNullSpheres = initInt("enderman", "nullSpheres", 0); + EndermanTracker.endermanTAP = initInt("enderman", "tap", 0); + EndermanTracker.endermanTAPDrops = initInt("enderman", "tapDrops", 0); + EndermanTracker.endermanEndersnakes = initInt("enderman", "endersnakes", 0); + EndermanTracker.endermanSummoningEyes = initInt("enderman", "summoningEyes", 0); + EndermanTracker.endermanManaBooks = initInt("enderman", "manaBooks", 0); + EndermanTracker.endermanTuners = initInt("enderman", "tuners", 0); + EndermanTracker.endermanAtoms = initInt("enderman", "atoms", 0); + EndermanTracker.endermanEspressoMachines = initInt("enderman", "espressoMachines", 0); + EndermanTracker.endermanSmartyBooks = initInt("enderman", "smartyBooks", 0); + EndermanTracker.endermanEndRunes = initInt("enderman", "endRunes", 0); + EndermanTracker.endermanChalices = initInt("enderman", "chalices", 0); + EndermanTracker.endermanDice = initInt("enderman", "dice", 0); + EndermanTracker.endermanArtifacts = initInt("enderman", "artifacts", 0); + EndermanTracker.endermanSkins = initInt("enderman", "skins", 0); + EndermanTracker.endermanMergers = initInt("enderman", "mergers", 0); + EndermanTracker.endermanCores = initInt("enderman", "cores", 0); + EndermanTracker.endermanEnchantRunes = initInt("enderman", "enchantRunes", 0); + EndermanTracker.endermanEnderBooks = initInt("enderman", "enderBooks", 0); + EndermanTracker.endermanTime = initDouble("enderman", "timeRNG", -1); + EndermanTracker.endermanBosses = initInt("enderman", "bossRNG", -1); // Fishing - LootTracker.seaCreatures = initInt("fishing", "seaCreature", 0); - LootTracker.goodCatches = initInt("fishing", "goodCatch", 0); - LootTracker.greatCatches = initInt("fishing", "greatCatch", 0); - LootTracker.squids = initInt("fishing", "squid", 0); - LootTracker.seaWalkers = initInt("fishing", "seaWalker", 0); - LootTracker.nightSquids = initInt("fishing", "nightSquid", 0); - LootTracker.seaGuardians = initInt("fishing", "seaGuardian", 0); - LootTracker.seaWitches = initInt("fishing", "seaWitch", 0); - LootTracker.seaArchers = initInt("fishing", "seaArcher", 0); - LootTracker.monsterOfTheDeeps = initInt("fishing", "monsterOfDeep", 0); - LootTracker.catfishes = initInt("fishing", "catfish", 0); - LootTracker.carrotKings = initInt("fishing", "carrotKing", 0); - LootTracker.seaLeeches = initInt("fishing", "seaLeech", 0); - LootTracker.guardianDefenders = initInt("fishing", "guardianDefender", 0); - LootTracker.deepSeaProtectors = initInt("fishing", "deepSeaProtector", 0); - LootTracker.hydras = initInt("fishing", "hydra", 0); - LootTracker.seaEmperors = initInt("fishing", "seaEmperor", 0); - LootTracker.empTime = initDouble("fishing", "empTime", -1); - LootTracker.empSCs = initInt("fishing", "empSC", -1); - LootTracker.fishingMilestone = initInt("fishing", "milestone", 0); + FishingTracker.seaCreatures = initInt("fishing", "seaCreature", 0); + FishingTracker.goodCatches = initInt("fishing", "goodCatch", 0); + FishingTracker.greatCatches = initInt("fishing", "greatCatch", 0); + FishingTracker.squids = initInt("fishing", "squid", 0); + FishingTracker.seaWalkers = initInt("fishing", "seaWalker", 0); + FishingTracker.nightSquids = initInt("fishing", "nightSquid", 0); + FishingTracker.seaGuardians = initInt("fishing", "seaGuardian", 0); + FishingTracker.seaWitches = initInt("fishing", "seaWitch", 0); + FishingTracker.seaArchers = initInt("fishing", "seaArcher", 0); + FishingTracker.monsterOfTheDeeps = initInt("fishing", "monsterOfDeep", 0); + FishingTracker.catfishes = initInt("fishing", "catfish", 0); + FishingTracker.carrotKings = initInt("fishing", "carrotKing", 0); + FishingTracker.seaLeeches = initInt("fishing", "seaLeech", 0); + FishingTracker.guardianDefenders = initInt("fishing", "guardianDefender", 0); + FishingTracker.deepSeaProtectors = initInt("fishing", "deepSeaProtector", 0); + FishingTracker.hydras = initInt("fishing", "hydra", 0); + FishingTracker.seaEmperors = initInt("fishing", "seaEmperor", 0); + FishingTracker.empTime = initDouble("fishing", "empTime", -1); + FishingTracker.empSCs = initInt("fishing", "empSC", -1); + FishingTracker.fishingMilestone = initInt("fishing", "milestone", 0); // Fishing Winter - LootTracker.frozenSteves = initInt("fishing", "frozenSteve", 0); - LootTracker.frostyTheSnowmans = initInt("fishing", "snowman", 0); - LootTracker.grinches = initInt("fishing", "grinch", 0); - LootTracker.yetis = initInt("fishing", "yeti", 0); - LootTracker.yetiTime = initDouble("fishing", "yetiTime", -1); - LootTracker.yetiSCs = initInt("fishing", "yetiSC", -1); + FishingTracker.frozenSteves = initInt("fishing", "frozenSteve", 0); + FishingTracker.frostyTheSnowmans = initInt("fishing", "snowman", 0); + FishingTracker.grinches = initInt("fishing", "grinch", 0); + FishingTracker.yetis = initInt("fishing", "yeti", 0); + FishingTracker.yetiTime = initDouble("fishing", "yetiTime", -1); + FishingTracker.yetiSCs = initInt("fishing", "yetiSC", -1); // Fishing Festival - LootTracker.nurseSharks = initInt("fishing", "nurseShark", 0); - LootTracker.blueSharks = initInt("fishing", "blueShark", 0); - LootTracker.tigerSharks = initInt("fishing", "tigerShark", 0); - LootTracker.greatWhiteSharks = initInt("fishing", "greatWhiteShark", 0); + FishingTracker.nurseSharks = initInt("fishing", "nurseShark", 0); + FishingTracker.blueSharks = initInt("fishing", "blueShark", 0); + FishingTracker.tigerSharks = initInt("fishing", "tigerShark", 0); + FishingTracker.greatWhiteSharks = initInt("fishing", "greatWhiteShark", 0); // Spooky Fishing - LootTracker.scarecrows = initInt("fishing", "scarecrow", 0); - LootTracker.nightmares = initInt("fishing", "nightmare", 0); - LootTracker.werewolfs = initInt("fishing", "werewolf", 0); - LootTracker.phantomFishers = initInt("fishing", "phantomFisher", 0); - LootTracker.grimReapers = initInt("fishing", "grimReaper", 0); + FishingTracker.scarecrows = initInt("fishing", "scarecrow", 0); + FishingTracker.nightmares = initInt("fishing", "nightmare", 0); + FishingTracker.werewolfs = initInt("fishing", "werewolf", 0); + FishingTracker.phantomFishers = initInt("fishing", "phantomFisher", 0); + FishingTracker.grimReapers = initInt("fishing", "grimReaper", 0); // Mythological - LootTracker.mythCoins = initDouble("mythological", "coins", 0); - LootTracker.griffinFeathers = initInt("mythological", "griffinFeather", 0); - LootTracker.crownOfGreeds = initInt("mythological", "crownOfGreed", 0); - LootTracker.washedUpSouvenirs = initInt("mythological", "washedUpSouvenir", 0); - LootTracker.minosHunters = initInt("mythological", "minosHunter", 0); - LootTracker.siameseLynxes = initInt("mythological", "siameseLynx", 0); - LootTracker.minotaurs = initInt("mythological", "minotaur", 0); - LootTracker.gaiaConstructs = initInt("mythological", "gaiaConstruct", 0); - LootTracker.minosChampions = initInt("mythological", "minosChampion", 0); - LootTracker.minosInquisitors = initInt("mythological", "minosInquisitor", 0); + MythologicalTracker.mythCoins = initDouble("mythological", "coins", 0); + MythologicalTracker.griffinFeathers = initInt("mythological", "griffinFeather", 0); + MythologicalTracker.crownOfGreeds = initInt("mythological", "crownOfGreed", 0); + MythologicalTracker.washedUpSouvenirs = initInt("mythological", "washedUpSouvenir", 0); + MythologicalTracker.minosHunters = initInt("mythological", "minosHunter", 0); + MythologicalTracker.siameseLynxes = initInt("mythological", "siameseLynx", 0); + MythologicalTracker.minotaurs = initInt("mythological", "minotaur", 0); + MythologicalTracker.gaiaConstructs = initInt("mythological", "gaiaConstruct", 0); + MythologicalTracker.minosChampions = initInt("mythological", "minosChampion", 0); + MythologicalTracker.minosInquisitors = initInt("mythological", "minosInquisitor", 0); // Dungeons - LootTracker.recombobulators = initInt("catacombs", "recombobulator", 0); - LootTracker.fumingPotatoBooks = initInt("catacombs", "fumingBooks", 0); + CatacombsTracker.recombobulators = initInt("catacombs", "recombobulator", 0); + CatacombsTracker.fumingPotatoBooks = initInt("catacombs", "fumingBooks", 0); // F1 - LootTracker.bonzoStaffs = initInt("catacombs", "bonzoStaff", 0); - LootTracker.f1CoinsSpent = initDouble("catacombs", "floorOneCoins", 0); - LootTracker.f1TimeSpent = initDouble("catacombs", "floorOneTime", 0); + CatacombsTracker.bonzoStaffs = initInt("catacombs", "bonzoStaff", 0); + CatacombsTracker.f1CoinsSpent = initDouble("catacombs", "floorOneCoins", 0); + CatacombsTracker.f1TimeSpent = initDouble("catacombs", "floorOneTime", 0); // F2 - LootTracker.scarfStudies = initInt("catacombs", "scarfStudies", 0); - LootTracker.f2CoinsSpent = initDouble("catacombs", "floorTwoCoins", 0); - LootTracker.f2TimeSpent = initDouble("catacombs", "floorTwoTime", 0); + CatacombsTracker.scarfStudies = initInt("catacombs", "scarfStudies", 0); + CatacombsTracker.f2CoinsSpent = initDouble("catacombs", "floorTwoCoins", 0); + CatacombsTracker.f2TimeSpent = initDouble("catacombs", "floorTwoTime", 0); // F3 - LootTracker.adaptiveHelms = initInt("catacombs", "adaptiveHelm", 0); - LootTracker.adaptiveChests = initInt("catacombs", "adaptiveChest", 0); - LootTracker.adaptiveLegs = initInt("catacombs", "adaptiveLegging", 0); - LootTracker.adaptiveBoots = initInt("catacombs", "adaptiveBoot", 0); - LootTracker.adaptiveSwords = initInt("catacombs", "adaptiveSword", 0); - LootTracker.f3CoinsSpent = initDouble("catacombs", "floorThreeCoins", 0); - LootTracker.f3TimeSpent = initDouble("catacombs", "floorThreeTime", 0); + CatacombsTracker.adaptiveHelms = initInt("catacombs", "adaptiveHelm", 0); + CatacombsTracker.adaptiveChests = initInt("catacombs", "adaptiveChest", 0); + CatacombsTracker.adaptiveLegs = initInt("catacombs", "adaptiveLegging", 0); + CatacombsTracker.adaptiveBoots = initInt("catacombs", "adaptiveBoot", 0); + CatacombsTracker.adaptiveSwords = initInt("catacombs", "adaptiveSword", 0); + CatacombsTracker.f3CoinsSpent = initDouble("catacombs", "floorThreeCoins", 0); + CatacombsTracker.f3TimeSpent = initDouble("catacombs", "floorThreeTime", 0); // F4 - LootTracker.spiritWings = initInt("catacombs", "spiritWing", 0); - LootTracker.spiritBones = initInt("catacombs", "spiritBone", 0); - LootTracker.spiritBoots = initInt("catacombs", "spiritBoot", 0); - LootTracker.spiritSwords = initInt("catacombs", "spiritSword", 0); - LootTracker.spiritBows = initInt("catacombs", "spiritBow", 0); - LootTracker.epicSpiritPets = initInt("catacombs", "spiritPetEpic", 0); - LootTracker.legSpiritPets = initInt("catacombs", "spiritPetLeg", 0); - LootTracker.f4CoinsSpent = initDouble("catacombs", "floorFourCoins", 0); - LootTracker.f4TimeSpent = initDouble("catacombs", "floorFourTime", 0); + CatacombsTracker.spiritWings = initInt("catacombs", "spiritWing", 0); + CatacombsTracker.spiritBones = initInt("catacombs", "spiritBone", 0); + CatacombsTracker.spiritBoots = initInt("catacombs", "spiritBoot", 0); + CatacombsTracker.spiritSwords = initInt("catacombs", "spiritSword", 0); + CatacombsTracker.spiritBows = initInt("catacombs", "spiritBow", 0); + CatacombsTracker.epicSpiritPets = initInt("catacombs", "spiritPetEpic", 0); + CatacombsTracker.legSpiritPets = initInt("catacombs", "spiritPetLeg", 0); + CatacombsTracker.f4CoinsSpent = initDouble("catacombs", "floorFourCoins", 0); + CatacombsTracker.f4TimeSpent = initDouble("catacombs", "floorFourTime", 0); // F5 - LootTracker.warpedStones = initInt("catacombs", "warpedStone", 0); - LootTracker.shadowAssHelms = initInt("catacombs", "shadowAssassinHelm", 0); - LootTracker.shadowAssChests = initInt("catacombs", "shadowAssassinChest", 0); - LootTracker.shadowAssLegs = initInt("catacombs", "shadowAssassinLegging", 0); - LootTracker.shadowAssBoots = initInt("catacombs", "shadowAssassinBoot", 0); - LootTracker.lastBreaths = initInt("catacombs", "lastBreath", 0); - LootTracker.lividDaggers = initInt("catacombs", "lividDagger", 0); - LootTracker.shadowFurys = initInt("catacombs", "shadowFury", 0); - LootTracker.f5CoinsSpent = initDouble("catacombs", "floorFiveCoins", 0); - LootTracker.f5TimeSpent = initDouble("catacombs", "floorFiveTime", 0); + CatacombsTracker.warpedStones = initInt("catacombs", "warpedStone", 0); + CatacombsTracker.shadowAssHelms = initInt("catacombs", "shadowAssassinHelm", 0); + CatacombsTracker.shadowAssChests = initInt("catacombs", "shadowAssassinChest", 0); + CatacombsTracker.shadowAssLegs = initInt("catacombs", "shadowAssassinLegging", 0); + CatacombsTracker.shadowAssBoots = initInt("catacombs", "shadowAssassinBoot", 0); + CatacombsTracker.lastBreaths = initInt("catacombs", "lastBreath", 0); + CatacombsTracker.lividDaggers = initInt("catacombs", "lividDagger", 0); + CatacombsTracker.shadowFurys = initInt("catacombs", "shadowFury", 0); + CatacombsTracker.f5CoinsSpent = initDouble("catacombs", "floorFiveCoins", 0); + CatacombsTracker.f5TimeSpent = initDouble("catacombs", "floorFiveTime", 0); // F6 - LootTracker.ancientRoses = initInt("catacombs", "ancientRose", 0); - LootTracker.precursorEyes = initInt("catacombs", "precursorEye", 0); - LootTracker.giantsSwords = initInt("catacombs", "giantsSword", 0); - LootTracker.necroLordHelms = initInt("catacombs", "necroLordHelm", 0); - LootTracker.necroLordChests = initInt("catacombs", "necroLordChest", 0); - LootTracker.necroLordLegs = initInt("catacombs", "necroLordLegging", 0); - LootTracker.necroLordBoots = initInt("catacombs", "necroLordBoot", 0); - LootTracker.necroSwords = initInt("catacombs", "necroSword", 0); - LootTracker.f6CoinsSpent = initDouble("catacombs", "floorSixCoins", 0); - LootTracker.f6TimeSpent = initDouble("catacombs", "floorSixTime", 0); + CatacombsTracker.ancientRoses = initInt("catacombs", "ancientRose", 0); + CatacombsTracker.precursorEyes = initInt("catacombs", "precursorEye", 0); + CatacombsTracker.giantsSwords = initInt("catacombs", "giantsSword", 0); + CatacombsTracker.necroLordHelms = initInt("catacombs", "necroLordHelm", 0); + CatacombsTracker.necroLordChests = initInt("catacombs", "necroLordChest", 0); + CatacombsTracker.necroLordLegs = initInt("catacombs", "necroLordLegging", 0); + CatacombsTracker.necroLordBoots = initInt("catacombs", "necroLordBoot", 0); + CatacombsTracker.necroSwords = initInt("catacombs", "necroSword", 0); + CatacombsTracker.f6CoinsSpent = initDouble("catacombs", "floorSixCoins", 0); + CatacombsTracker.f6TimeSpent = initDouble("catacombs", "floorSixTime", 0); // F7 - LootTracker.witherBloods = initInt("catacombs", "witherBlood", 0); - LootTracker.witherCloaks = initInt("catacombs", "witherCloak", 0); - LootTracker.implosions = initInt("catacombs", "implosion", 0); - LootTracker.witherShields = initInt("catacombs", "witherShield", 0); - LootTracker.shadowWarps = initInt("catacombs", "shadowWarp", 0); - LootTracker.necronsHandles = initInt("catacombs", "necronsHandle", 0); - LootTracker.autoRecombs = initInt("catacombs", "autoRecomb", 0); - LootTracker.witherHelms = initInt("catacombs", "witherHelm", 0); - LootTracker.witherChests = initInt("catacombs", "witherChest", 0); - LootTracker.witherLegs = initInt("catacombs", "witherLegging", 0); - LootTracker.witherBoots = initInt("catacombs", "witherBoot", 0); - LootTracker.f7CoinsSpent = initDouble("catacombs", "floorSevenCoins", 0); - LootTracker.f7TimeSpent = initDouble("catacombs", "floorSevenTime", 0); + CatacombsTracker.witherBloods = initInt("catacombs", "witherBlood", 0); + CatacombsTracker.witherCloaks = initInt("catacombs", "witherCloak", 0); + CatacombsTracker.implosions = initInt("catacombs", "implosion", 0); + CatacombsTracker.witherShields = initInt("catacombs", "witherShield", 0); + CatacombsTracker.shadowWarps = initInt("catacombs", "shadowWarp", 0); + CatacombsTracker.necronsHandles = initInt("catacombs", "necronsHandle", 0); + CatacombsTracker.autoRecombs = initInt("catacombs", "autoRecomb", 0); + CatacombsTracker.witherHelms = initInt("catacombs", "witherHelm", 0); + CatacombsTracker.witherChests = initInt("catacombs", "witherChest", 0); + CatacombsTracker.witherLegs = initInt("catacombs", "witherLegging", 0); + CatacombsTracker.witherBoots = initInt("catacombs", "witherBoot", 0); + CatacombsTracker.f7CoinsSpent = initDouble("catacombs", "floorSevenCoins", 0); + CatacombsTracker.f7TimeSpent = initDouble("catacombs", "floorSevenTime", 0); // Ghost - LootTracker.sorrows = initInt("ghosts", "sorrow", 0); - LootTracker.voltas = initInt("ghosts", "volta", 0); - LootTracker.plasmas = initInt("ghosts", "plasma", 0); - LootTracker.ghostlyBoots = initInt("ghosts", "ghostlyBoots", 0); - LootTracker.bagOfCashs = initInt("ghosts", "bagOfCash", 0); + GhostTracker.sorrows = initInt("ghosts", "sorrow", 0); + GhostTracker.voltas = initInt("ghosts", "volta", 0); + GhostTracker.plasmas = initInt("ghosts", "plasma", 0); + GhostTracker.ghostlyBoots = initInt("ghosts", "ghostlyBoots", 0); + GhostTracker.bagOfCashs = initInt("ghosts", "bagOfCash", 0); // Misc LootDisplay.display = initString("misc", "display", "off"); diff --git a/src/main/java/me/Danker/handlers/PacketHandler.java b/src/main/java/me/Danker/handlers/PacketHandler.java index a4fd85e..a5a858b 100644 --- a/src/main/java/me/Danker/handlers/PacketHandler.java +++ b/src/main/java/me/Danker/handlers/PacketHandler.java @@ -2,29 +2,30 @@ package me.Danker.handlers; import io.netty.channel.ChannelDuplexHandler; import io.netty.channel.ChannelHandlerContext; -import me.Danker.utils.Utils; -import net.minecraft.client.Minecraft; +import io.netty.channel.ChannelPromise; +import me.Danker.events.PacketReadEvent; +import me.Danker.events.PacketWriteEvent; import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S04PacketEntityEquipment; - -import java.lang.reflect.Field; +import net.minecraftforge.common.MinecraftForge; public class PacketHandler extends ChannelDuplexHandler { - - // Spirit boots fix + @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { - if (Utils.inSkyblock && msg instanceof Packet && msg.getClass().getName().endsWith("S04PacketEntityEquipment")) { // Inventory packet name - S04PacketEntityEquipment packet = (S04PacketEntityEquipment) msg; - if (packet.getEntityID() == Minecraft.getMinecraft().thePlayer.getEntityId()) { - Field slot = packet.getClass().getDeclaredField("field_149392_b"); // equipmentSlot - slot.setAccessible(true); - slot.setInt(packet, slot.getInt(packet) + 1); - msg = packet; - } + if (msg instanceof Packet) { + if (MinecraftForge.EVENT_BUS.post(new PacketReadEvent((Packet) msg))) return; } - + super.channelRead(ctx, msg); } + + @Override + public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception { + if (msg instanceof Packet) { + if (MinecraftForge.EVENT_BUS.post(new PacketWriteEvent((Packet) msg))) return; + } + + super.write(ctx, msg, promise); + } } |