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

Mixin count wildcard * not working because of remapping issue #1239

Open
fayer3 opened this issue Dec 30, 2024 · 0 comments
Open

Mixin count wildcard * not working because of remapping issue #1239

fayer3 opened this issue Dec 30, 2024 · 0 comments

Comments

@fayer3
Copy link

fayer3 commented Dec 30, 2024

using the * wildcard in mixin method targets doesn't work, because the remapping step always adds some method args to the method name, even when not specifying them

an example with mc 1.21.4 and yarn:
having this mixin, I would expect it to inject into all 3 available constructors

@Mixin(PersistentProjectileEntity.class)
public class ArrowMixin {
    @Inject(method = "<init>*", at = @At("TAIL"))
    private void atEnd(CallbackInfo ci) {}
}

instead it only injects into one of them, because the generated refmap removed the * and added method args

{
  "mappings": {
    "com/fayer3/test/mixin/client/ProjectileMixin": {
      "<init>*": "Lnet/minecraft/class_1665;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V"
    }
  },
  "data": {
    "named:intermediary": {
      "com/fayer3/test/mixin/client/ProjectileMixin": {
        "<init>*": "Lnet/minecraft/class_1665;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V"
      }
    }
  }
}
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

1 participant