LlamaLad7 / MixinExtras

Companion library to SpongePowered Mixin with many custom injectors for a more expressive experience.
MIT License
304 stars 17 forks source link

`@Share` doesn't save values for pseudo mixins on Neoforge #93

Open kikugie opened 2 weeks ago

kikugie commented 2 weeks ago

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 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.

Bytecode of the broken mixin class: ElytraSlotMixinBroken.txt

Bytecode of the working mixin class: ElytraSlotMixinWorking.txt

Source .class files and jars: Samples.zip

LlamaLad7 commented 2 weeks ago

Can you send the exported target class with the "broken" mixin?

kikugie commented 2 weeks ago

ElytraSlotLayer.zip

LlamaLad7 commented 2 weeks ago

Try explicitly specifying the full lambda descriptor in your mixin