aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/misc
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-16 21:36:38 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-16 21:36:38 +0200
commit39f48f7cb127719ccfe84543198223b05de936b8 (patch)
tree4e8b6caf005a8cbf571b38f94fb3383b64354921 /src/main/java/at/hannibal2/skyhanni/features/misc
parentfe505fc83c2e608e6c30e36568bb6a1f2ecfade0 (diff)
downloadskyhanni-39f48f7cb127719ccfe84543198223b05de936b8.tar.gz
skyhanni-39f48f7cb127719ccfe84543198223b05de936b8.tar.bz2
skyhanni-39f48f7cb127719ccfe84543198223b05de936b8.zip
migrate ghost counter and damage splash config into combat
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/HideDamageSplash.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt8
2 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/HideDamageSplash.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/HideDamageSplash.kt
index 97448c316..e2512007c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/HideDamageSplash.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/HideDamageSplash.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.features.damageindicator.DamageIndicatorManager
import at.hannibal2.skyhanni.utils.LorenzUtils
import net.minecraft.entity.EntityLivingBase
@@ -13,10 +14,15 @@ class HideDamageSplash {
@SubscribeEvent(priority = EventPriority.HIGH)
fun onRenderDamage(event: RenderLivingEvent.Specials.Pre<EntityLivingBase>) {
if (!LorenzUtils.inSkyBlock) return
- if (!SkyHanniMod.feature.misc.hideDamageSplash) return
+ if (!SkyHanniMod.feature.combat.hideDamageSplash) return
if (DamageIndicatorManager.isDamageSplash(event.entity)) {
event.isCanceled = true
}
}
+
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(2, "misc.hideDamageSplash", "combat.hideDamageSplash")
+ }
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt
index 19482141d..355ce6ffa 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ghostcounter/GhostCounter.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.misc.ghostcounter
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.ProfileStorageData
import at.hannibal2.skyhanni.data.SkillExperience
@@ -50,7 +51,7 @@ import kotlin.math.roundToLong
object GhostCounter {
- val config get() = SkyHanniMod.feature.ghostCounter
+ val config get() = SkyHanniMod.feature.combat.ghostCounter
val hidden get() = ProfileStorageData.profileSpecific?.ghostCounter
private var display = emptyList<List<Any>>()
var ghostCounterV3File =
@@ -477,6 +478,11 @@ object GhostCounter {
}
}
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(2, "ghostCounter", "combat.ghostCounter")
+ }
+
fun isEnabled(): Boolean {
return LorenzUtils.inSkyBlock && config.enabled && LorenzUtils.skyBlockIsland == IslandType.DWARVEN_MINES
}