Building the mod without the ElytraSlot jar in the classpath results in a broken mixin, where the @Share value is not written.
With ElytraSlot added by modCompileOnly and no changes to the mixin class, the built mixin works.
This issue is exclusive to Neoforge from my testing, as the same mixin works fine on Fabric.
The exact mixin in question: https://github.com/kikugie/elytra-trims/blob/kotlin/src/main/java/dev/kikugie/elytratrims/mixin/compat/render/ElytraSlotMixin.java
Building the mod without the ElytraSlot jar in the classpath results in a broken mixin, where the
@Share
value is not written. With ElytraSlot added bymodCompileOnly
and no changes to the mixin class, the built mixin works. This issue is exclusive to Neoforge from my testing, as the same mixin works fine on Fabric.Bytecode of the broken mixin class: ElytraSlotMixinBroken.txt
Bytecode of the working mixin class: ElytraSlotMixinWorking.txt
Source
.class
files and jars: Samples.zip