aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/itemabilities
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-03-28 10:07:28 +0100
committerGitHub <noreply@github.com>2024-03-28 10:07:28 +0100
commit07a41cc61d1aa4373e925d240e067d720580b486 (patch)
tree185d8a6c4ccfe6e2811511f35c67d39aec129202 /src/main/java/at/hannibal2/skyhanni/features/itemabilities
parent0beb9e3b3132bcc14c99759628732625ee97d6a8 (diff)
downloadskyhanni-07a41cc61d1aa4373e925d240e067d720580b486.tar.gz
skyhanni-07a41cc61d1aa4373e925d240e067d720580b486.tar.bz2
skyhanni-07a41cc61d1aa4373e925d240e067d720580b486.zip
Improvement: Config Move (#1300)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/itemabilities')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt8
3 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt
index 643e15623..88a44640a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt
@@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import kotlin.time.Duration.Companion.seconds
class ChickenHeadTimer {
- private val config get() = SkyHanniMod.feature.itemAbilities.chickenHead
+ private val config get() = SkyHanniMod.feature.inventory.itemAbilities.chickenHead
private var hasChickenHead = false
private var lastTime = SimpleTimeMark.farPast()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
index b5e7fc313..8e6b92bed 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt
@@ -22,7 +22,7 @@ import kotlin.time.Duration.Companion.seconds
class FireVeilWandParticles {
- private val config get() = SkyHanniMod.feature.itemAbilities.fireVeilWands
+ private val config get() = SkyHanniMod.feature.inventory.itemAbilities.fireVeilWands
private val item by lazy { "FIRE_VEIL_WAND".asInternalName() }
private var lastClick = SimpleTimeMark.farPast()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
index 180a09ca2..c7c146ffc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.itemabilities.abilitycooldown
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.data.ItemRenderBackground.Companion.background
import at.hannibal2.skyhanni.events.ActionBarUpdateEvent
import at.hannibal2.skyhanni.events.ItemClickEvent
@@ -34,7 +35,7 @@ import kotlin.math.max
class ItemAbilityCooldown {
- private val config get() = SkyHanniMod.feature.itemAbilities
+ private val config get() = SkyHanniMod.feature.inventory.itemAbilities
private val patternGroup = RepoPattern.group("item.abilities.cooldown")
private val youAlignedOthersPattern by patternGroup.pattern(
@@ -348,6 +349,11 @@ class ItemAbilityCooldown {
}
}
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(31, "itemAbilities", "inventory.itemAbilities")
+ }
+
private fun hasAbility(stack: ItemStack): MutableList<ItemAbility> {
val itemName: String = stack.cleanName()
val internalName = stack.getInternalName()