diff --git a/common/build.gradle.kts b/common/build.gradle.kts index dd01f6813..0d31aa04e 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -72,7 +72,6 @@ jarSets { dependencies { modCompileOnly("net.fabricmc:fabric-loader:${property("fabric_loader_version")}") - modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}") modCompileOnly(":sodium-fabric-1.20.1-0.6.0-intermediary-mappings") testImplementation("org.junit.jupiter:junit-jupiter:5.8.1") diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index 396e8d600..578af1fcf 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -33,6 +33,6 @@ }, "breaks": { "sodium": ["<0.5.0", "~0.6.0- <0.6.0-beta.2"], - "embeddium": "<0.3.25" + "embeddium": "*" } } diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 71cbbdff0..b5b43e6cd 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -83,7 +83,7 @@ loom { dependencies { forge("net.minecraftforge:forge:${property("minecraft_version")}-${property("forge_version")}") - + modCompileOnly("maven.modrinth:embeddium:${property("embeddium_version")}") modCompileOnly("maven.modrinth:oculus:${property("oculus_version")}") "forApi"(project(path = ":common", configuration = "commonApiOnly")) diff --git a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java index 205db0497..5e9918914 100644 --- a/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java +++ b/forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java @@ -1,5 +1,7 @@ package dev.engine_room.flywheel.impl; +import dev.engine_room.flywheel.impl.compat.CompatMods; +import dev.engine_room.flywheel.impl.compat.EmbeddiumCompat; import org.apache.maven.artifact.versioning.ArtifactVersion; import org.jetbrains.annotations.UnknownNullability; @@ -63,6 +65,9 @@ private static void clientInit(IEventBus forgeEventBus, IEventBus modEventBus) { CrashReportCallables.registerCrashCallable("Flywheel Backend", BackendManagerImpl::getBackendString); FlwImpl.init(); + + if (CompatMods.EMBEDDIUM.isLoaded()) + EmbeddiumCompat.init(); } private static void registerImplEventListeners(IEventBus forgeEventBus, IEventBus modEventBus) { diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/compat/EmbeddiumCompat.java b/forge/src/main/java/dev/engine_room/flywheel/impl/compat/EmbeddiumCompat.java similarity index 100% rename from common/src/main/java/dev/engine_room/flywheel/impl/compat/EmbeddiumCompat.java rename to forge/src/main/java/dev/engine_room/flywheel/impl/compat/EmbeddiumCompat.java