diff --git a/forge/build.gradle b/forge/build.gradle index 08d89fdc..d31f0b51 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -5,6 +5,7 @@ plugins { minecraft { mappings channel: "official", version: "${libs.versions.minecraftVersion.get()}" copyIdeResources = true + reobf = false accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') @@ -57,6 +58,9 @@ dependencies { library(project(":common")) //implementation(fg.deobf("me.shedaniel.cloth:cloth-config-forge:${libs.versions.clothConfigVersion.get()}")) + + // Hack fix for now, force jopt-simple to be exactly 5.0.4 because Mojang ships that version, but some transitive dependencies request 6.0+ + implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } } } ext { @@ -73,4 +77,12 @@ processResources { } } -jar.finalizedBy('reobfJar') +// Merge the resources and classes into the same directory. +// This is done because java expects modules to be in a single directory. +// And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem +// This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later. +sourceSets.each { + def dir = layout.buildDirectory.dir("sourcesSets/$it.name") + it.output.resourcesDir = dir + it.java.destinationDirectory = dir +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 96de5610..6aa29caa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -10,7 +10,7 @@ log4j2-version = "2.23.1" minecraftVersion = "1.20.6" fabric-loader-version = "0.15.10" fabric-api-version = "0.97.8+1.20.6" -forge-version = "1.20.6-50.0.9" +forge-version = "1.20.6-50.0.19" neoforge-version = "20.6.7-beta" # Mod dependencies