aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-17 13:14:52 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-17 13:14:52 +0200
commit6114bfe2dfca96e48d19df2725b2912a165bcd58 (patch)
treed6f41d5f1b4230ef4f559f4fb0905263cfa89b85 /src/main/java/at/hannibal2/skyhanni/features
parentdc337e273420fbc987fabdfb07f42a78116da164 (diff)
downloadskyhanni-6114bfe2dfca96e48d19df2725b2912a165bcd58.tar.gz
skyhanni-6114bfe2dfca96e48d19df2725b2912a165bcd58.tar.bz2
skyhanni-6114bfe2dfca96e48d19df2725b2912a165bcd58.zip
migrate Ender Node Tracker config into combat
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
index 133e12ab4..c6fbf9e70 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/EnderNodeTracker.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.misc
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.config.Storage
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ProfileStorageData
@@ -20,7 +21,7 @@ import net.minecraft.client.Minecraft
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class EnderNodeTracker {
- private val config get() = SkyHanniMod.feature.misc.enderNodeTracker
+ private val config get() = SkyHanniMod.feature.combat.enderNodeTracker
private val storage get() = ProfileStorageData.profileSpecific?.enderNodeTracker
private var totalEnderArmor = 0
@@ -140,6 +141,11 @@ class EnderNodeTracker {
update()
}
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(2, "misc.enderNodeTracker", "combat.enderNodeTracker")
+ }
+
private fun calculateProfit(storage: Storage.ProfileSpecific.EnderNodeTracker): Map<EnderNode, Double> {
if (!ProfileStorageData.loaded) return emptyMap()