Skip to content

Commit

Permalink
Fix mixins on Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz authored May 5, 2024
1 parent 36ca40c commit f591271
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,17 @@ dependencies {

mixin {
add sourceSets.main, "${mod_id}.refmap.json"
config "${mod_id}.mixins.json"
config "${mod_id}_forge.mixins.json"
}

// As of 1.20.6 Forge no longer has reobf tasks. This has broken mixins adding configs correctly into the manifest file
// See: https://github.com/SpongePowered/MixinGradle/blob/f800b26d2b180d98d9aa9355e5b3086d71218508/src/main/groovy/org/spongepowered/asm/gradle/plugins/MixinExtension.groovy#L184
// Instead, we will do it ourselves.
jar {
manifest {
attributes([
'MixinConfigs': "${mod_id}.mixins.json" + "," + "${mod_id}_forge.mixins.json",
])
}
}

tasks.withType(JavaCompile) {
Expand Down

0 comments on commit f591271

Please sign in to comment.