Mixin
Mixin copied to clipboard
Refmap remapping on modlauncher in dev
Legacy FML agent has this code https://github.com/SpongePowered/Mixin/blob/4585277f9f4b026065ce749f279ea1ad4919c4f1/src/launchwrapper/java/org/spongepowered/asm/launch/platform/MixinPlatformAgentFMLLegacy.java#L314-L324 and this allows remapping refmap to work. Modlauncher specific agent doesn't have an equivalent.
While this wouldn't allow mods using mixin to work in dev just by putting them into mods folder (because that's not supported at all), this should allow dependencies added with fg.deobf
to work (since the dependency remaping uses this code https://github.com/MinecraftForge/InstallerTools/blob/9147fcae6e088daf02d31a01ce6724ce91361ffa/src/main/java/net/minecraftforge/installertools/SrgMcpRenamer.java#L99-L112 which would remap shadows and overwrites correctly).
You're right this was an oversight when I was making the modlauncher agent, I had intended to do this once I figured out what mapping provider is available in modlauncher or fml but it slipped my mind. Thanks for opening an issue, will look into this.
This can be solved by adding Java system properties,
minecraft {
runs {
client {
property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg"
}
}
}
then re-run genIntellijRuns
and refresh gradle project
The fix @BloCamLimb suggested doesn't work for me, and I can't figure out why.
build.gradle: https://gist.github.com/GingerIndustries/03efeaed0b2ced30c648c9c33d00df3a
I may be listing Supplementaries as a dependency wrong.
This can be solved by adding Java system properties,
minecraft { runs { client { property 'mixin.env.remapRefMap', 'true' property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" } } }
then re-run
genIntellijRuns
and refresh gradle project
It seems you also need to add those properties to the other runs in 1.18.2 I don't know about earlier ones. without them runData for datagen purposes failed.
This can be solved by adding Java system properties,
minecraft { runs { client { property 'mixin.env.remapRefMap', 'true' property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" } } }
then re-run
genIntellijRuns
and refresh gradle projectIt seems you also need to add those properties to the other runs in 1.18.2 I don't know about earlier ones. without them runData for datagen purposes failed.
Yes, you're right. Generally, you should also apply these to server
and data
. But if you add MixinGradle plugin, you don't need these setups.
The fix BloCamLimb suggested doesn't work for me, and I can't figure out why.
It won't work correctly if they don't use the same mappings, but that may not be the issue here anyways but that is something to note.
can someone please give tutorial to little mod author who can barely lambda how i can depend a mod that depends Architectury
@19Phin Don't bump unrelated issues for your support query. I don't really see how that question is related to Mixin in the first place either -- you probably want to talk to the Architectury people or the original mod developer if anything.