aboutsummaryrefslogtreecommitdiff
path: root/src/compat/configured/java/ConfiguredConfigScreenProvider.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat/configured/java/ConfiguredConfigScreenProvider.kt')
-rw-r--r--src/compat/configured/java/ConfiguredConfigScreenProvider.kt22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/compat/configured/java/ConfiguredConfigScreenProvider.kt b/src/compat/configured/java/ConfiguredConfigScreenProvider.kt
new file mode 100644
index 0000000..c0095bf
--- /dev/null
+++ b/src/compat/configured/java/ConfiguredConfigScreenProvider.kt
@@ -0,0 +1,22 @@
+package moe.nea.firmament.compat.configured
+
+import com.google.auto.service.AutoService
+import com.mrcrayfish.configured.integration.CatalogueConfigFactory
+import net.fabricmc.loader.api.FabricLoader
+import net.minecraft.client.gui.screen.Screen
+import moe.nea.firmament.Firmament
+import moe.nea.firmament.gui.config.FirmamentConfigScreenProvider
+
+@AutoService(FirmamentConfigScreenProvider::class)
+class ConfiguredConfigScreenProvider : FirmamentConfigScreenProvider {
+ override val key: String
+ get() = "configured"
+ override val isEnabled: Boolean
+ get() = FabricLoader.getInstance().isModLoaded("configured")
+
+ override fun open(parent: Screen?): Screen {
+ return CatalogueConfigFactory.createConfigScreen(
+ parent,
+ FabricLoader.getInstance().getModContainer(Firmament.MOD_ID).get())
+ }
+}