-
-
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
In dev env, @ModifyVariable doesn't check the entire method descriptor #677
Comments
Can you check if this still happens on 0.8.6? It reminds me of #515 which was fixed a few months ago. |
How do you change the Mixin version in Fabric? I tried adding 0.8.6 to the My loader version is Looking through the commit that fixed the issue you mentioned, it seems like it only changes |
Also do note that fabric is running their own fork of mixin, meaning that the issues you are experiencing are potentially regressions in fabric's variant. |
This behaviour is deliberate, if the descriptor doesn't match anything then mixin does a separate pass with just the name. |
Doesn't that mean that it should have the same problem outside of the development environment in 1.20.6? Because it doesn't happen in that case. |
Wait what? That's very silly imo. Is there a way to make it not do that? |
I've just had the same issue with a
Causes:
(Note that I haven't tested this case outside of the development environment yet) |
In the development environment,
@ModifyVariable
doesn't check that the arguments of the target method matches. (The return value may also not be checked, I haven't tested that.) For example:When running in Minecraft 1.20.6 with Fabric and Mixin version 0.8.5, both print statements are called, even though there isn't a constructor with 3 int arguments. This doesn't happen when running in either 1.17 or 1.20.6 outside of the development environment.
Since I haven't encountered any similar issues before, I assume that the fact that both named and intermediary yarn mappings use the same method name is what allows this to happen (or more specifically, both are
<init>
). Otherwise, the second@ModifyVariable
would fail to find a target method.The text was updated successfully, but these errors were encountered: