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 remapping breaks wildcard targets #137

Open
jpenilla opened this issue Oct 15, 2024 · 0 comments · May be fixed by #139
Open

Mixin remapping breaks wildcard targets #137

jpenilla opened this issue Oct 15, 2024 · 0 comments · May be fixed by #139
Labels

Comments

@jpenilla
Copy link
Contributor

jpenilla commented Oct 15, 2024

The following Mixin to PalettedContainer works fine in-dev but doesn't work in production due to broken remapping:

    @Inject(
            method = "<init>*",
            at = @At(
                    value = "RETURN"
            ),
            require = 3 // Require matching all 3 constructors
    )
    private void constructorHook(final CallbackInfo ci) {
        this.updateData(this.data);
    }

It gets remapped to

    @Inject(
        method = {"<init>(Lnet/minecraft/class_2359;Lnet/minecraft/class_2841$class_6563;Lnet/minecraft/class_2841$class_6560;Lnet/minecraft/class_6490;Ljava/util/List;)V"},
        at = {@At("RETURN")},
        require = 3
    )
    private void constructorHook(CallbackInfo ci) {
        this.updateData(this.field_34560);
    }

which causes it to only match a single target.

For this case I could probably work around it with remap=false, but that wouldn't help with another Mixin I have targeting all three constructors with @Redirect that uses an MC type in its @At target.

@modmuss50 modmuss50 added the bug label Oct 15, 2024
jpenilla added a commit to Tuinity/Moonrise that referenced this issue Oct 15, 2024
@modmuss50 modmuss50 linked a pull request Nov 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants