-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Clarify that ModifyArgs.index is the absolute index, not relative #666
base: master
Are you sure you want to change the base?
Conversation
If the target method has the argument `(double a, double b, double c, float d, float e)` an index of 1 targets the `double b` argument, not `float e` as one might assume from the second paragraph.
What exactly do you mean with |
As the commit description says:
Relative means the index starts with the first matching argument (same type). If you look at the original doc:
This description doesn't make that clear, and if you read the second sentence you get the impression that the index is counted separately for each type (relative) which makes it extremely confusing when an inject like:
- doesn't work because from reading the docs you're led to expect |
I got the "absolute" vs "relative" descriptor from asking on the Fabric discord why the above injector doesn't work, and the answer I got was "it should be an absolute index". |
While I understand the semantics of |
I am open to a better way to describe it. IMO I still think it's better to have it than to not. |
I don't understand how you could possibly get confused with the existing documentation. Why on Earth would you assume that the index is relative? Generally indexes are absolute unless otherwise specified. |
I think there is a very simple typo in the original documentation. |
Except that Mixin is already consistent in its use of
Sure, I'll buy that for a dollar. |
If the target method has the argument
(double a, double b, double c, float d, float e)
an index of 1 targets thedouble b
argument, notfloat e
as one might assume from the second paragraph.