LlamaLad7 / MixinExtras

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

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

Closed kikugie closed 2 weeks ago

kikugie commented 2 months 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 months ago

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

kikugie commented 2 months ago

ElytraSlotLayer.zip

LlamaLad7 commented 2 months ago

Try explicitly specifying the full lambda descriptor in your mixin

LlamaLad7 commented 2 weeks ago

Closing due to inactivity + I don't think it's related to mixinextras in the first place. Feel free to reopen with more information if you disagree.