diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 926ed02850e8..61f240fd4d36 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] libautoupdate = "1.3.1" -moulconfig = "3.0.0-beta.7" +moulconfig = "3.0.0-beta.15" headlessLwjgl = "1.7.2" jbAnnotations = "24.1.0" diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt index 2aad75a40e3e..c16f04843317 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigGuiManager.kt @@ -9,7 +9,21 @@ object ConfigGuiManager { var editor: MoulConfigEditor? = null - fun getEditorInstance() = editor ?: MoulConfigEditor(SkyHanniMod.configManager.processor).also { editor = it } + private val replacedSearchTerms = mapOf( + "color" to "colour", + "armor" to "armour", + "endermen" to "enderman", + "enderman" to "endermen", + "hotkey" to "keybind", + "gray" to "grey" + ) + + fun getEditorInstance() = editor ?: MoulConfigEditor(SkyHanniMod.configManager.processor).also { + it.setSearchFunction { optionEditor, word -> + return@setSearchFunction optionEditor.fulfillsSearch(replacedSearchTerms[word] ?: word) + } + editor = it + } fun openConfigGui(search: String? = null) { val editor = getEditorInstance() diff --git a/src/main/java/at/hannibal2/skyhanni/config/Features.java b/src/main/java/at/hannibal2/skyhanni/config/Features.java index 06eb5c57eff9..7f1676f402e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/Features.java +++ b/src/main/java/at/hannibal2/skyhanni/config/Features.java @@ -23,6 +23,7 @@ import io.github.notenoughupdates.moulconfig.Config; import io.github.notenoughupdates.moulconfig.Social; import io.github.notenoughupdates.moulconfig.annotations.Category; +import io.github.notenoughupdates.moulconfig.common.MyResourceLocation; import io.github.notenoughupdates.moulconfig.gui.HorizontalAlign; import io.github.notenoughupdates.moulconfig.processor.ProcessedCategory; import net.minecraft.util.ResourceLocation; @@ -32,9 +33,9 @@ public class Features extends Config { - public static final ResourceLocation DISCORD = new ResourceLocation("notenoughupdates:social/discord.png"); - public static final ResourceLocation GITHUB = new ResourceLocation("notenoughupdates:social/github.png"); - public static final ResourceLocation PATREON = new ResourceLocation("notenoughupdates:social/patreon.png"); + public static final MyResourceLocation DISCORD = new MyResourceLocation("notenoughupdates", "social/discord.png"); + public static final MyResourceLocation GITHUB = new MyResourceLocation("notenoughupdates", "social/github.png"); + public static final MyResourceLocation PATREON = new MyResourceLocation("notenoughupdates", "social/patreon.png"); @Override public boolean shouldAutoFocusSearchbar() { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/FeatureToggleProcessor.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/FeatureToggleProcessor.kt index 020004648531..d3896d946f13 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/FeatureToggleProcessor.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/FeatureToggleProcessor.kt @@ -85,7 +85,4 @@ class FeatureToggleProcessor : ConfigStructureReader { ) ) } - - @Suppress("EmptyFunctionBlock") - override fun emitGuiOverlay(baseObject: Any?, field: Field?, option: ConfigOption?) {} } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt index 9f2d2ac595d4..ebad0743c6cd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/GuiOptionEditorUpdateCheck.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.misc.update import at.hannibal2.skyhanni.SkyHanniMod import io.github.moulberry.notenoughupdates.itemeditor.GuiElementButton +import io.github.notenoughupdates.moulconfig.common.RenderContext import io.github.notenoughupdates.moulconfig.gui.GuiOptionEditor import io.github.notenoughupdates.moulconfig.internal.TextRenderUtils import io.github.notenoughupdates.moulconfig.processor.ProcessedOption @@ -15,7 +16,7 @@ class GuiOptionEditorUpdateCheck(option: ProcessedOption) : GuiOptionEditor(opti val button = GuiElementButton("", -1) { } - override fun render(x: Int, y: Int, width: Int) { + override fun render(context: RenderContext?, x: Int, y: Int, width: Int) { val fr = Minecraft.getMinecraft().fontRendererObj GlStateManager.pushMatrix()