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 08:50:12 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-17 08:50:12 +0200
commitf00efbd001ab2c00e6ff9054235efc27bd36a526 (patch)
tree935804b7a00a1fceedc6f765d2b5142b61fa57e1 /src/main/java/at/hannibal2/skyhanni/features
parent95a5958b1297090f367573fdbe3883031b2445bf (diff)
downloadskyhanni-f00efbd001ab2c00e6ff9054235efc27bd36a526.tar.gz
skyhanni-f00efbd001ab2c00e6ff9054235efc27bd36a526.tar.bz2
skyhanni-f00efbd001ab2c00e6ff9054235efc27bd36a526.zip
migrate powder tracker and misc mining config into mining
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt8
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/powdertracker/PowderTracker.kt8
4 files changed, 17 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
index 46e96f0c5..70d105a26 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/HighlightMiningCommissionMobs.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.mining
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
import at.hannibal2.skyhanni.events.LorenzTickEvent
@@ -19,7 +20,7 @@ import net.minecraft.entity.monster.EntitySlime
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class HighlightMiningCommissionMobs {
- private val config get() = SkyHanniMod.feature.misc.mining
+ private val config get() = SkyHanniMod.feature.mining
private var active = listOf<MobType>()
enum class MobType(val commissionName: String, val isMob: (EntityLivingBase) -> Boolean) {
@@ -83,6 +84,11 @@ class HighlightMiningCommissionMobs {
}
}
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(2, "misc.mining", "mining")
+ }
+
fun isEnabled() = config.highlightCommissionMobs &&
(IslandType.DWARVEN_MINES.isInIsland() || IslandType.CRYSTAL_HOLLOWS.isInIsland())
}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
index 3031e021e..0bc239c34 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt
@@ -19,7 +19,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.util.*
class KingTalismanHelper {
- private val config get() = SkyHanniMod.feature.misc.mining
+ private val config get() = SkyHanniMod.feature.mining
private val kingLocation = LorenzVec(129.6, 196.5, 194.1)
private val kingCircles = listOf(
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt
index f8b8618d7..8a2e67741 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt
@@ -12,8 +12,8 @@ import net.minecraftforge.client.event.RenderWorldLastEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
class CrystalHollowsNamesInCore {
- val config get() = SkyHanniMod.feature.misc.mining
- val coreLocations = mapOf(
+ val config get() = SkyHanniMod.feature.mining
+ private val coreLocations = mapOf(
LorenzVec(550, 116, 550) to "§8Precursor City",
LorenzVec(552, 116, 474) to "§bMithril Deposits",
LorenzVec(477, 116, 476) to "§aJungle",
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/powdertracker/PowderTracker.kt
index ce3d4a1c1..e16470b9b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/powdertracker/PowderTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/powdertracker/PowderTracker.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.misc.powdertracker
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
@@ -21,7 +22,7 @@ import kotlin.concurrent.fixedRateTimer
class PowderTracker {
- private val config get() = SkyHanniMod.feature.misc.powderTrackerConfig
+ private val config get() = SkyHanniMod.feature.mining.powderTracker
private var display = emptyList<List<Any>>()
private val picked = "§6You have successfully picked the lock on this chest!".toPattern()
private val uncovered = "§aYou uncovered a treasure chest!".toPattern()
@@ -153,6 +154,11 @@ class PowderTracker {
saveAndUpdate()
}
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(2, "misc.powderTrackerConfig", "mining.powderTracker")
+ }
+
private fun saveAndUpdate() {
calculateGemstone()
calculateMithril()