SpongePowered / Mixin

Mixin is a trait/mixin and bytecode weaving framework for Java using ASM
MIT License
1.42k stars 193 forks source link

No refmap generated for args: @At(value = "CONSTANT", args = PathToSomeVanillaClass) #414

Open rikka0w0 opened 4 years ago

rikka0w0 commented 4 years ago

I'm doing a @ModifyVariable(method=..., @At(value = "CONSTANT", args = "classValue=PathToSomeVanillaClass")), I put the yarn name in the args and it works fine in the dev environment, however it fails in the reobfuscated environment. If I change args to the reobfuscated class path, then it works in reobfuscated environment but not in the dev. I had a look at the generated refmap.json, it does not contain the entry for this "args", even if I manually add an entry to the refmap.json, it won't work in the reobfuscated game, args just doesnt seem to perform look up in the refmap.json.

I'm not sure if this is my problem or it is a feature that currently unimplemented. I will be really appreciated if args reobj can be added to mixin!

Here is my code: https://github.com/rikka0w0/patchwork-api/blob/4fe0509e80ad39c1c7a655c82a0cf3e1d3298f50/patchwork-gui/src/main/java/net/patchworkmc/mixin/gui/MixinMinecraftClient.java#L66

Mumfrey commented 4 years ago

This honestly shouldn't be too hard to accomodate since all the scaffolding required to achieve it is basically already in place. I'll look into this.