Open ejektaflex opened 6 months ago
Do you have Architectury Plugin installed? It should fix this issue, which really isn't a Loom issue (the mixin config is in the common Gradle project, so its refmap
property would need to be added in :common:remapJar
, which isn't run here due to the project structure).
What would I have to set in my remapJar task? Here is my current remapJar, but it doesn't run for common: https://github.com/ejektaflex/Bountiful/blob/96f85f641b2d0c42f7de77834482deaee21789e3/build.gradle.kts#L111
You can't fix it by tweaking remapJar
settings since remapJar
only does the refmap name adding for a mixin config from the current Gradle project. Architectury Plugin does it separately with its custom task.
The easiest solutions are using Architectury Plugin (in compile-only mode if needed) or specifying the refmap name manually in the mixin config.
Cool, I've fixed this by doing:
loom {
mixin {
defaultRefmapName.set("Bountiful-common-refmap.json")
}
}
Do you have an example of how this is done using Architectury Plugin? I'm depending on it in my gradle setup, but I don't exactly know how to utilize it.
Thanks so much!
If you include the common classes in the Fabric jar by bundling :common
's transformProductionFabric
configuration, it'll apply the transformers. Example from Arch API's code:
https://github.com/architectury/architectury-api/blob/cd74016d85b562affb21890cb8796b1e34ac2ca9/fabric/build.gradle#L33
It's my understanding that I'm already doing this. Could the problem arise because I'm not including transitive dependencies?
No, I don't think it affects anything since that project dependency won't even have any transitive deps. As far as I can tell, the code should already work 🤔
I also don't think this is directly related to Loom, so I'm moving the issue to Arch Plugin's repo.
When I try to build my JAR file for Fabric, I get this error:
StructurePoolAccessor is a Mixin in Kambrik, my mod.
I noticed that the .jar file contains a
Kambrik-common-refmap.json
. It's unused inkambrik.mixins.json
. If I add the following line tokambrik.mixins.json
:The mod will launch successfully. As such, it seems that refmaps aren't being linked properly. I don't know much about how refmaps work, or how they're supposed to work, but this is what seems to be happening. It happens with ArchLoom 1.4-SNAPSHOT and 1.5-SNAPSHOT.