From 8ab44088546bf3360564e1a09f0831fea7659d2e Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sat, 26 Oct 2024 18:55:30 +0200 Subject: Isolate modmenu compat [no changelog] --- build.gradle.kts | 4 +++- .../nea/firmament/compat/modmenu/FirmamentModMenuPlugin.kt | 11 +++++++++++ src/main/kotlin/modmenu/FirmamentModMenuPlugin.kt | 14 -------------- src/main/resources/fabric.mod.json | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 src/compat/modmenu/java/moe/nea/firmament/compat/modmenu/FirmamentModMenuPlugin.kt delete mode 100644 src/main/kotlin/modmenu/FirmamentModMenuPlugin.kt diff --git a/build.gradle.kts b/build.gradle.kts index 31952d6..244b01d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -184,6 +184,7 @@ val citResewnSourceSet = createIsolatedSourceSet("citresewn") val yaclSourceSet = createIsolatedSourceSet("yacl") val explosiveEnhancementSourceSet = createIsolatedSourceSet("explosiveEnhancement") val wildfireGenderSourceSet = createIsolatedSourceSet("wildfireGender") +val modmenuSourceSet = createIsolatedSourceSet("modmenu") dependencies { // Minecraft dependencies @@ -196,9 +197,9 @@ dependencies { // Fabric dependencies modImplementation(libs.fabric.loader) modImplementation(libs.fabric.kotlin) - modImplementation(libs.modmenu) modImplementation(libs.moulconfig) modImplementation(libs.manninghamMills) + (modmenuSourceSet.modImplementationConfigurationName)(libs.modmenu) (explosiveEnhancementSourceSet.modImplementationConfigurationName)(libs.explosiveenhancement) modImplementation(libs.hypixelmodapi) include(libs.hypixelmodapi.fabric) @@ -251,6 +252,7 @@ dependencies { modLocalRuntime(libs.bundles.runtime.required) modLocalRuntime(libs.bundles.runtime.optional) modLocalRuntime(libs.jarvis.fabric) + modLocalRuntime(libs.modmenu) transInclude.resolvedConfiguration.resolvedArtifacts.forEach { include(it.moduleVersion.id.toString()) diff --git a/src/compat/modmenu/java/moe/nea/firmament/compat/modmenu/FirmamentModMenuPlugin.kt b/src/compat/modmenu/java/moe/nea/firmament/compat/modmenu/FirmamentModMenuPlugin.kt new file mode 100644 index 0000000..b734e2c --- /dev/null +++ b/src/compat/modmenu/java/moe/nea/firmament/compat/modmenu/FirmamentModMenuPlugin.kt @@ -0,0 +1,11 @@ +package moe.nea.firmament.compat.modmenu + +import com.terraformersmc.modmenu.api.ConfigScreenFactory +import com.terraformersmc.modmenu.api.ModMenuApi +import moe.nea.firmament.gui.config.AllConfigsGui + +class FirmamentModMenuPlugin : ModMenuApi { + override fun getModConfigScreenFactory(): ConfigScreenFactory<*> { + return ConfigScreenFactory { AllConfigsGui.makeScreen(it) } + } +} diff --git a/src/main/kotlin/modmenu/FirmamentModMenuPlugin.kt b/src/main/kotlin/modmenu/FirmamentModMenuPlugin.kt deleted file mode 100644 index f889bf3..0000000 --- a/src/main/kotlin/modmenu/FirmamentModMenuPlugin.kt +++ /dev/null @@ -1,14 +0,0 @@ - - -package moe.nea.firmament.modmenu - -import com.terraformersmc.modmenu.api.ConfigScreenFactory -import com.terraformersmc.modmenu.api.ModMenuApi -import moe.nea.firmament.gui.config.AllConfigsGui - -class FirmamentModMenuPlugin : ModMenuApi { - override fun getModConfigScreenFactory(): ConfigScreenFactory<*> { - return ConfigScreenFactory { AllConfigsGui.makeScreen(it) } - } -} - diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index cb623dc..08072ef 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,7 +34,7 @@ "moe.nea.firmament.rei.FirmamentReiPlugin" ], "modmenu": [ - "moe.nea.firmament.modmenu.FirmamentModMenuPlugin" + "moe.nea.firmament.compat.modmenu.FirmamentModMenuPlugin" ], "jarvis": [ "moe.nea.firmament.jarvis.JarvisIntegration" -- cgit