Skip to content

Commit

Permalink
Forge: fix mod loading (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakambda authored May 14, 2024
1 parent 65fb6f6 commit b679608
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down Expand Up @@ -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 {
Expand All @@ -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
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b679608

Please sign in to comment.