From 1fe572dbebfd45e6cf95c465f1c898d620112109 Mon Sep 17 00:00:00 2001 From: Cal Date: Thu, 16 May 2024 08:25:02 +1000 Subject: [PATCH] remove up to 17 --- .../java/at/hannibal2/skyhanni/data/RenderData.kt | 11 ----------- .../java/at/hannibal2/skyhanni/data/TrackerManager.kt | 10 ---------- .../features/garden/farming/GardenBestCropTime.kt | 11 ----------- .../skyhanni/features/inventory/ChestValue.kt | 9 --------- .../skyhanni/features/misc/BetterSignEditing.kt | 6 ------ 5 files changed, 47 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt index 82e9e9ac44dc..d9e40ff25a59 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt @@ -1,12 +1,9 @@ package at.hannibal2.skyhanni.data -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.features.chroma.ChromaConfig import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.features.misc.visualwords.VisualWordGui import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests -import at.hannibal2.skyhanni.utils.ConfigUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.gui.inventory.GuiInventory @@ -59,12 +56,4 @@ object RenderData { if (!SkyHanniDebugsAndTests.globalRender) return LorenzRenderWorldEvent(event.partialTicks).postAndCatch() } - - // TODO find better spot for this - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(17, "chroma.chromaDirection") { element -> - ConfigUtils.migrateIntToEnum(element, ChromaConfig.Direction::class.java) - } - } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt b/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt index b59d31394920..40be0c188723 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt @@ -1,12 +1,9 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.config.features.misc.TrackerConfig.PriceFromEntry import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.utils.ConditionalUtils -import at.hannibal2.skyhanni.utils.ConfigUtils import net.minecraftforge.fml.common.eventhandler.EventPriority import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -37,11 +34,4 @@ object TrackerManager { hasChanged = false } } - - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(17, "misc.tracker.priceFrom") { element -> - ConfigUtils.migrateIntToEnum(element, PriceFromEntry::class.java) - } - } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt index 72cc5a25b7f7..6579abae0835 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBestCropTime.kt @@ -1,8 +1,6 @@ package at.hannibal2.skyhanni.features.garden.farming -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.garden.cropmilestones.NextConfig -import at.hannibal2.skyhanni.config.features.garden.cropmilestones.NextConfig.BestTypeEntry import at.hannibal2.skyhanni.data.GardenCropMilestones import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter import at.hannibal2.skyhanni.data.GardenCropMilestones.isMaxed @@ -13,10 +11,8 @@ import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.getSpeed import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.CollectionUtils.sorted -import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.datetime.TimeUnit import at.hannibal2.skyhanni.utils.datetime.TimeUtils.format -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds object GardenBestCropTime { @@ -133,11 +129,4 @@ object GardenBestCropTime { } private fun getGardenExpForTier(gardenLevel: Int) = if (gardenLevel > 30) 300 else gardenLevel * 10 - - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(17, "garden.cropMilestones.next.bestType") { element -> - ConfigUtils.migrateIntToEnum(element, BestTypeEntry::class.java) - } - } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt index 8022cfd0431c..f8187e318631 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt @@ -1,7 +1,6 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.inventory.ChestValueConfig.NumberFormatEntry import at.hannibal2.skyhanni.config.features.inventory.ChestValueConfig.SortingTypeEntry import at.hannibal2.skyhanni.data.IslandType @@ -13,7 +12,6 @@ import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValueCalculator import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList -import at.hannibal2.skyhanni.utils.ConfigUtils import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.itemName @@ -270,11 +268,4 @@ object ChestValue { ) private fun isEnabled() = LorenzUtils.inSkyBlock && config.enabled - - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.transform(17, "inventory.chestValueConfig.formatType") { element -> - ConfigUtils.migrateIntToEnum(element, NumberFormatEntry::class.java) - } - } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt index 2d7f2fb09785..d3d9ee0c6eb7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt @@ -1,7 +1,6 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiEditSign import at.hannibal2.skyhanni.utils.KeyboardManager @@ -63,9 +62,4 @@ object BetterSignEditing { } pasteLastClicked = pasteClicked } - - @SubscribeEvent - fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.move(16, "misc.pasteIntoSigns", "misc.betterSignEditing") - } }