My sample mod has the refmap in the mixin json file as well as "add sourceSets.main" in the "mixin" block. It is like in the documentation.
mixin json:
{
"required": true,
"minVersion": "0.8",
"package": "com.example.examplemod.mixin",
"compatibilityLevel": "JAVA_17",
"refmap": "mixins.ExampleMod.refmap.json",
"mixins": [
"MinecraftMixin"
],
"injectors": {
"defaultRequire": 1
}
}
mixin block in build.gradle
mixin {
// MixinGradle Settings
add sourceSets.main, 'mixins.ExampleMod.refmap.json'
config 'mixins.ExampleMod.json'
}
I tried it on another Minecraft version (1.19.2 and 1.20.1) and it works.
As soon as I try Minecraft version 1.20.6 or higher it does not work anymore.