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

Fabric Loader V 0.16.0 does not appear to accept name= for @ModifyVariable nor @Local #957

Open
HydraheadHunter opened this issue Jul 28, 2024 · 2 comments

Comments

@HydraheadHunter
Copy link

So, I was building a mod for 0.15.11 and someone slides into my issues section that it won't compile on FL 0.16.0..

Initial diagnosis is that this method is the problem:

@ModifyVariable(method= "internalOnSlotClick", at=@At("STORE"), name="n")
private int modifyItemStack2(int stackMaxCount, @Local(name="slot2") Slot slot, @Local(name="itemStack2") ItemStack stack )

After some fiddling, it turns out that the use of name="[name]" is the apparent problem as swapping it out for ordinals allowed the mod to function correctly (at least on my end: still waiting on confirmation for close the issue):

@ModifyVariable(method = "internalOnSlotClick", at = @At("STORE"), ordinal = 5)
private int modifyItemStack2(int stackMaxCount, @Local Slot slot, @Local(ordinal=0) ItemStack stack )

So to me, it appears that this mixin feature appears to be non-functional in FL 0.16.0.

@LlamaLad7
Copy link
Contributor

LVT names are debug info only and should not be used for MC code, as is explained in the @Local javadocs.

@HydraheadHunter
Copy link
Author

Well, if that's the intended limitations of the code, I guess I'll have to live wit it not working. Tho it's weird that it worked perfectly well for me in v0.15.11.

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

2 participants