From 07a41cc61d1aa4373e925d240e067d720580b486 Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal002@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:07:28 +0100 Subject: Improvement: Config Move (#1300) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../skyhanni/features/stranded/HighlightPlaceableNpcs.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/features/stranded') diff --git a/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt b/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt index 75cadeef5..0ce2d0cb5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/stranded/HighlightPlaceableNpcs.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.stranded import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent @@ -16,7 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class HighlightPlaceableNpcs { - private val config get() = SkyHanniMod.feature.stranded + private val config get() = SkyHanniMod.feature.misc.stranded private val locationPattern by RepoPattern.pattern( "stranded.highlightplacement.location", @@ -59,6 +60,11 @@ class HighlightPlaceableNpcs { } } + @SubscribeEvent + fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { + event.move(31, "stranded", "misc.stranded") + } + private fun isPlaceableNpc(lore: List): Boolean { // Checking if NPC & placeable if (lore.isEmpty() || !(lore.last() == "§ethis NPC!" || lore.last() == "§eyour location!")) { -- cgit