aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-15 14:14:19 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-15 14:14:19 +0200
commitceef1d3be403db7ee5f8cbda8c49f3370d35df78 (patch)
treef271d2b943e37331a6f87b352dd3e670af65b7c6 /src/main/java/at/hannibal2/skyhanni/features
parentecb40c801ab44118059c1ef07438dfacd75e3927 (diff)
downloadskyhanni-ceef1d3be403db7ee5f8cbda8c49f3370d35df78.tar.gz
skyhanni-ceef1d3be403db7ee5f8cbda8c49f3370d35df78.tar.bz2
skyhanni-ceef1d3be403db7ee5f8cbda8c49f3370d35df78.zip
removed hypixel api
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt17
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishManager.kt27
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt18
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt14
4 files changed, 0 insertions, 76 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
index b71b4f4a4..5ee7dfb1d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoNextStepHelper.kt
@@ -6,7 +6,6 @@ import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.SkillExperience
import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
-import at.hannibal2.skyhanni.events.ProfileApiDataLoadedEvent
import at.hannibal2.skyhanni.features.bingo.nextstep.*
import at.hannibal2.skyhanni.utils.InventoryUtils
import at.hannibal2.skyhanni.utils.ItemUtils.name
@@ -279,22 +278,6 @@ class BingoNextStepHelper {
return this
}
- @SubscribeEvent
- fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) {
- val profileData = event.profileData
-
- val visitedZones = profileData["visited_zones"]?.asJsonArray ?: return
- for (element in visitedZones) {
- val zoneName = element.asString
- for (step in islands.values) {
- val island = step.island
- if (island.apiName == zoneName) {
- step.done(true)
- }
- }
- }
- }
-
private infix fun <T : NextStep> T.withItemIslandRequirement(itemName: String): T {
itemIslandRequired[itemName]?.let { this requires it }
return this
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
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
index d6e429fa0..1a37cb8ee 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt
@@ -214,24 +214,6 @@ class NonGodPotEffectDisplay {
)
}
- @SubscribeEvent
- fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) {
- val profileData = event.profileData
- val effects = profileData["active_effects"]?.asJsonArray ?: return
- for (element in effects) {
- val effectJson = element.asJsonObject
- val name = effectJson["effect"].asString
- val effect = NonGodPotEffect.entries.find { it.apiName == name } ?: continue
-
- val time = effectJson["ticks_remaining"].asLong / 20
- val newValue = System.currentTimeMillis() + time * 1000
-
- effectDuration[effect] = if (effect == NonGodPotEffect.INVISIBILITY) {
- System.currentTimeMillis() + 1000 * 60 * 60 * 24
- } else newValue
- }
- }
-
private fun isEnabled(): Boolean {
return LorenzUtils.inSkyBlock && config.nonGodPotEffectDisplay && !LorenzUtils.inDungeons && !LorenzUtils.inKuudraFight
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
index 6c9692a18..827ed137a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt
@@ -177,20 +177,6 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) {
}
@SubscribeEvent
- fun onProfileDataLoad(event: ProfileApiDataLoadedEvent) {
- val profileData = event.profileData
- val sacks = profileData["sacks_counts"]?.asJsonObject ?: return
-
- sacksCache.clear()
-
- for ((name, v) in sacks.entrySet()) {
- val amount = v.asLong
- sacksCache[name] = amount
- }
- update()
- }
-
- @SubscribeEvent
fun onRenderWorld(event: RenderWorldLastEvent) {
if (!isEnabled()) return
if (!SkyHanniMod.feature.misc.crimsonIsleReputationLocation) return