Closed Earthcomputer closed 3 years ago
Nesting is supported from Java 11 onwards so should be able to handle this with the current version of ASM, good catch.
@Earthcomputer this should be fixed in current 0.8.4 snapshot now that nesting is properly supported, can you verify please.
This appears to work as intended on 0.8.4, thanks! For the benefit of anyone reading this in the future, to use inner classes in mixins in Java 11+, you need to remember to set the compatibility level to JAVA_11 in the mixin config.
I was updating my mod to the latest snapshot, which changed Minecraft's minimum Java version from Java 8 to Java 16. I am now encountering an error in this mixin that I wasn't encountering before:
This mixin merges an anonymous class which accesses the private field
stats
in the target class via a@Shadow
. My guess is that Mixin needs to declare the target class as a nest mate, rather than the mixin class, when merging anonymous classes.