diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/fishing')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt index c2f8c508d..c2f4e64fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt @@ -1,8 +1,6 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.data.ProfileStorageData -import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent -import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.jsonobjects.TrophyFishJson @@ -12,29 +10,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class TrophyFishManager { @SubscribeEvent - fun onProfileJoin(event: ProfileJoinEvent) { - hasLoadedTrophyFish = false - } - - @SubscribeEvent - fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) { - if (hasLoadedTrophyFish) return - val trophyFishes = fishes ?: return - val profileData = event.profileData - trophyFishes.clear() - for ((rawName, value) in profileData["trophy_fish"].asJsonObject.entrySet()) { - val rarity = TrophyRarity.getByName(rawName) ?: continue - val text = rawName.replace("_", "") - val displayName = text.substring(0, text.length - rarity.name.length) - - val amount = value.asInt - val rarities = trophyFishes.getOrPut(displayName) { mutableMapOf() } - rarities[rarity] = amount - hasLoadedTrophyFish = true - } - } - - @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { try { val json = event.getConstant<TrophyFishJson>("TrophyFish") @@ -48,8 +23,6 @@ class TrophyFishManager { } companion object { - private var hasLoadedTrophyFish = false - val fishes: MutableMap<String, MutableMap<TrophyRarity, Int>>? get() = ProfileStorageData.profileSpecific?.crimsonIsle?.trophyFishes |
