LlamaLad7 / MixinExtras

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

[Request] Be able to get a reference to the caller of non static methods in ModifyExpressionValue #4

Closed shaksternano closed 1 year ago

shaksternano commented 2 years ago

If targeting a non static method call with ModifyExpressionValue, it would be great if it was possible to get a reference to the object the method being called belongs to, similar to Redirect. A reference to the method arguments would also be nice if that is possible.

LlamaLad7 commented 2 years ago

This wouldn't be hugely straightforward given being able to capture the enclosing method's args (straight after the expression result) is already locked into the API. I'll definitely look into it though.

LlamaLad7 commented 2 years ago

https://github.com/LlamaLad7/MixinExtras/wiki/WrapOperation should cover this use-case now.

LlamaLad7 commented 1 year ago

And it's now stable, which I think marks the completion of this goal.