From f5912711bb469b184b40424105650a1ed7255ba2 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sun, 5 May 2024 13:57:49 +1000 Subject: [PATCH] Fix mixins on Forge --- Forge/build.gradle | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Forge/build.gradle b/Forge/build.gradle index 721d99d..8a01fca 100644 --- a/Forge/build.gradle +++ b/Forge/build.gradle @@ -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) {