Closed NicBOMB closed 1 year ago
This is intended behavior. The example on the wiki wraps a method call, you're wrapping the field set. If it worked like your "expected code" then you wouldn't be able to prevent the field set happening and it wouldn't be a proper "wrapping". In this particular case you would have to make the field @Mutable
via a shadow.
This is intended behavior. The example on the wiki wraps a method call, you're wrapping the field set. If it worked like your "expected code" then you wouldn't be able to prevent the field set happening and it wouldn't be a proper "wrapping". In this particular case you would have to make the field
@Mutable
via a shadow.
Thanks, that's a great explanation for the behavior.
Source: https://github.com/Vivecraft/VivecraftMod/pull/191/files#diff-27b99287eb2f32e8c6825a339b936ebb9e82785501cfcb57774fd418b2dd813a Production:
Production Mixin:
Error:
I was expecting the mixin to be more like:
The example from the wiki keeps the left hand side out of the lambda: