fabric-loom
fabric-loom copied to clipboard
0.9 doesn't add refmap key to mixins.json if file is in another subproject
Dunno if this was incorrect behaviour with 0.8 (and hence this being an invalid issue), but with 0.8, loom added the "refmap":
key to the *.mixins.json
file even if the file resided in another subprojects' resources folder.
To clarify: our project has all of its resources in the resources
folder of the common
subproject (for ease of access), and the fabric
subproject doesn't have a resources folder. Loom 0.8 found the file from the other folder and correctly added the refmap
key to the file, but loom 0.9.x doesn't -> the server crashes when trying to load the mod.
This type of bugs shouldn't happen anymore after #451, but this might be yet another regression.
Although, since you mentioned a "common" and a "fabric" subproject, are you perhaps using Architectury's Loom fork (dev.architectury.loom
)? It's still outdated and doesn't include the latest changes on the 0.9 branch.
are you perhaps using Architectury's Loom fork
Negative, we're using fabric's loom. We very recently added support for fabric, so this stuff is pretty new to us 😄
Hmm, okay. Do you have a link to the project source code? Loom's refmap adder should pick up all mixin JSON files that are declared in the fabric.mod.json, so I'd like to have a closer look.
Here ya go: https://github.com/plan-player-analytics/Plan/tree/master/Plan/fabric
JSON files used to be under https://github.com/plan-player-analytics/Plan/tree/master/Plan/common/src/main/resources, now they reside under the fabric subproject.
The Loom's refmap adder will pick all mixin JSON declared in the fabric.mod.json that are actually present in the resource
folder of the declared source set. If no source set is declared by hand, by default all sources set within the current project are declared automatically.
The idea behind mentioned behaviour is that people should put the mixin JSON file and mixin class java file in the same resource set.
Is there any sort of updated way to do this. I have a Forge, Fabric and common module in my project. I use Mixins in both forge and fabric so was hoping to have just a single file.
I notice on build the "refmap" section is missing from the mixin json when compiled.