diff --git a/forge/build.gradle.kts b/forge/build.gradle.kts index 54ac740..7a05910 100644 --- a/forge/build.gradle.kts +++ b/forge/build.gradle.kts @@ -4,4 +4,17 @@ dependencies { implementation(project(path = ":common")) { isTransitive = false } add("developmentForge", project(path = ":common")) { isTransitive = false } shadowC(project(path = ":common", configuration = "transformProductionForge")) { isTransitive = false } -}; loom { useFabricMixin = true } +}; loom { + useFabricMixin = true + if (JavaVersion.current().isJava9Compatible) { + runs { + val args: List = listOf("--illegal-access=permit") + if (JavaVersion.current() < JavaVersion.VERSION_17) { + listOf("--add-exports java.base/sun.security.util=ALL-UNNAMED", "--add-opens java.base/java.util.jar=ALL-UNNAMED") + } + this.forEach { + it.vmArgs(args) + } + } + } +} \ No newline at end of file