Mixin
Mixin copied to clipboard
Modify multiple local variables
Is there a way to modify multiple local variables at once? Say I have a method that returns an array
float[] fall = EntityEvents.onLivingFall(entity, distance, damageMultiplier);
I would like to change the local variables to those values in the array.
Not currently, though this is a good idea. It could actually be done in a similar way to how @ModifyArgs is done vs. @ModifyArg. Effectively adding a new @ModifyVariables which would be less efficient but more flexible.
Local variable detection is much improved in 0.8 so adding more local variable functionality is definitely more viable.