aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt2
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java6
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt9
4 files changed, 15 insertions, 7 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
index 64a158d10..f779fb282 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt
@@ -10,7 +10,7 @@ import com.google.gson.JsonPrimitive
object ConfigUpdaterMigrator {
val logger = LorenzLogger("ConfigMigration")
- const val CONFIG_VERSION = 23
+ const val CONFIG_VERSION = 24
fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? {
if (chain.isEmpty()) return this
if (this !is JsonObject) return null
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java
index 995d61528..968c551cf 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/crimsonisle/CrimsonIsleConfig.java
@@ -20,11 +20,6 @@ public class CrimsonIsleConfig {
@Expose
public ReputationHelperConfig reputationHelper = new ReputationHelperConfig();
- @ConfigOption(name = "Sulphur Skitter Box", desc = "")
- @Accordion
- @Expose
- public SulphurSkitterBoxConfig sulphurSkitterBoxConfig = new SulphurSkitterBoxConfig();
-
@Expose
@ConfigOption(name = "Pablo NPC Helper", desc = "Shows a clickable message that grabs the flower needed from your sacks.")
@ConfigEditorBoolean
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java
index 1b180efc9..2b5195797 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/fishing/trophyfishing/TrophyFishingConfig.java
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.config.features.fishing.trophyfishing;
import at.hannibal2.skyhanni.config.FeatureToggle;
+import at.hannibal2.skyhanni.config.features.crimsonisle.SulphurSkitterBoxConfig;
import com.google.gson.annotations.Expose;
import io.github.moulberry.moulconfig.annotations.Accordion;
import io.github.moulberry.moulconfig.annotations.ConfigEditorBoolean;
@@ -18,6 +19,11 @@ public class TrophyFishingConfig {
@Accordion
public GeyserFishingConfig geyserOptions = new GeyserFishingConfig();
+ @ConfigOption(name = "Sulphur Skitter Box", desc = "")
+ @Accordion
+ @Expose
+ public SulphurSkitterBoxConfig sulphurSkitterBox = new SulphurSkitterBoxConfig();
+
@Expose
@ConfigOption(name = "Fillet Tooltip", desc = "Show fillet value of Trophy Fish in tooltip.")
@ConfigEditorBoolean
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt
index 6ffabfa0e..5db95b246 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.features.nether
import at.hannibal2.skyhanni.SkyHanniMod
+import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator
import at.hannibal2.skyhanni.config.features.crimsonisle.SulphurSkitterBoxConfig
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.data.jsonobjects.repo.ItemsJson
@@ -27,7 +28,7 @@ import java.awt.Color
class SulphurSkitterBox {
- private val config get() = SkyHanniMod.feature.crimsonIsle.sulphurSkitterBoxConfig
+ private val config get() = SkyHanniMod.feature.fishing.trophyFishing.sulphurSkitterBox
private var rods = listOf<NEUInternalName>()
private var spongeBlocks = listOf<BlockPos>()
private var closestBlock: BlockPos? = null
@@ -113,4 +114,10 @@ class SulphurSkitterBox {
fun isEnabled() =
IslandType.CRIMSON_ISLE.isInIsland() && config.enabled && (!config.onlyWithRods || InventoryUtils.itemInHandId in rods)
+
+
+ @SubscribeEvent
+ fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) {
+ event.move(24, "crimsonIsle.sulphurSkitterBoxConfig", "fishing.trophyFishing.sulphurSkitterBox")
+ }
}