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

Closed
fayer3 opened this issue Dec 30, 2024 · 1 comment · Fixed by #1245
Closed

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

fayer3 opened this issue Dec 30, 2024 · 1 comment · Fixed by #1245

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"
      }
    }
  }
}
@modmuss50
Copy link
Member

This will be fixed in the next tiny remapper update.

@modmuss50 modmuss50 linked a pull request Jan 26, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants