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 some remapping quirk #261

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

Mixin count wildcard * not working because of some remapping quirk #261

fayer3 opened this issue Dec 30, 2024 · 2 comments

Comments

@fayer3
Copy link

fayer3 commented Dec 30, 2024

using architectury-loom 1.9, but also happened with 1.7

having an inject like this, for mc 1.21.4

@Inject(method = "addMainPass*", at = @At("HEAD"))
private void vivecraft$addMainPass(CallbackInfo ci) {}

will not work as expected
this should match all methods with name addMainPass and any parameters. but when arch is doing the remapping it adds parameters, which breaks it
below the what arch put in the compiled mixin classes
fabric

@Inject(method = {"addMainPass*"},at = {@At("HEAD")})
private void vivecraft$addMainPass(CallbackInfo ci) {}

and the refmap of that

"addMainPass*": "Lnet/minecraft/class_761;method_62202(Lnet/minecraft/class_9909;Lnet/minecraft/class_4604;Lnet/minecraft/class_4184;Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;Lnet/minecraft/class_9958;ZZLnet/minecraft/class_9779;Lnet/minecraft/class_3695;)V"

forge

@Inject(method = {"addMainPass*(Lcom/mojang/blaze3d/framegraph/FrameGraphBuilder;Lnet/minecraft/client/renderer/culling/Frustum;Lnet/minecraft/client/Camera;Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;Lnet/minecraft/client/renderer/FogParameters;ZZLnet/minecraft/client/DeltaTracker;Lnet/minecraft/util/profiling/ProfilerFiller;)V"}, at = {@At("HEAD")} )
private void vivecraft$addMainPass(CallbackInfo ci) {}

neoforge

@Inject(method = {"addMainPass*(Lcom/mojang/blaze3d/framegraph/FrameGraphBuilder;Lnet/minecraft/client/renderer/culling/Frustum;Lnet/minecraft/client/Camera;Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;Lnet/minecraft/client/renderer/FogParameters;ZZLnet/minecraft/client/DeltaTracker;Lnet/minecraft/util/profiling/ProfilerFiller;)V"}, at = {@At("HEAD")})
private void vivecraft$addMainPass(CallbackInfo ci) {}
@fayer3
Copy link
Author

fayer3 commented Dec 30, 2024

this could be a loom issue maybe. fabric-loom produces the same refmap as here for fabric, if arch loom just takes the refmap and uses that for remapping

@fayer3
Copy link
Author

fayer3 commented Dec 30, 2024

made an issue there aswell FabricMC#1239
when that get's fixed and merged into architectury loom, I'll report back if it still is an 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

No branches or pull requests

1 participant