Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] be able to use 'Object... args' for @WrapOperation #19

Closed
KingContaria opened this issue Nov 23, 2022 · 1 comment
Closed

Comments

@KingContaria
Copy link

Hi,

sometimes you just want to wrap the method without really worrying about any of the args, in which case just having the method parameters be Object... args, Operation<?> original could be useful.
I know that this alone doesnt seem like a big benefit but it can allow for more compatibility between different mc versions (where you may want to wrap the same method but it has different args) by using different this + multiple @At's.

Similar would also be useful for @WrapWithCondition (although in that case just having no args would also do the job, especially if you want to wrap multiple @At's with the same condition.

This isn't something super necessary but could be neat for making mods that work for lots of different versions.

@KingContaria
Copy link
Author

actually, the parameters would still be in the @At so it wouldnt actually help compatibility, so i'll close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant