Open jpenilla opened 1 month ago
The following Mixin to PalettedContainer works fine in-dev but doesn't work in production due to broken remapping:
PalettedContainer
@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.
remap=false
@Redirect
@At
The following Mixin to
PalettedContainer
works fine in-dev but doesn't work in production due to broken remapping:It gets remapped to
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.