-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
@WrapOperation parameter substitution is broken #5
Comments
Can you show your original code? |
.transformParams(builder -> builder
.targetType(ParamTransformTarget.INJECTION_POINT)
.inject(0, Type.getObjectType("net/minecraft/world/entity/Entity"))
.inject(1, Type.getObjectType("net/minecraft/world/item/ItemStack"))
.inject(4, Type.getObjectType("net/minecraft/world/entity/EquipmentSlot"))
) |
I know what causes the error of injecting a parameter with 0 index, and I fixed it in the adapter But now I encounter an error when trying to inject a parameter with index 1:
|
Looks like it's mistakenly trying to get the last element of an empty list. |
It is, but I don't know how to fix it |
Is there any progress? I can't write a mod because it is delayed by this bug... |
I will have a look as soon as I have time. If you'd like to speed things up, contributions are always welcome 😊 |
I'd like to, but I don't understand how to fix it |
I need to add a parameter with index 0 (at the very beginning), but when I do this I get an error:
So I thought a great solution would be to use swap, and my code started to look like this:
It works, but the order of the arguments in WrapOperation hasn't changed, so I think the code that adds the parameters there works, but it can't swap them around:
The text was updated successfully, but these errors were encountered: