Skip to content

Commit

Permalink
DidObfuscate
Browse files Browse the repository at this point in the history
- Fix RenderSystemMixin on fabric
- setShaderFogShape's arguments need to be remapped, but the name of the
  function should not be. Fortunately mixin allows matching by function
  name alone
  • Loading branch information
Jozufozu committed Oct 28, 2024
1 parent 03f94fe commit 84e2786
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ abstract class RenderSystemMixin {
FogUniforms.update();
}

@Inject(method = "setShaderFogShape(Lcom/mojang/blaze3d/shaders/FogShape;)V", at = @At("RETURN"))
// Fabric fails to resolve the mixin in prod when the full signature is specified.
// I suspect it's because this method references a class name in its signature,
// and that needs to be remapped while the function names in RenderSystem are marked with @DontObfuscate.
@Inject(method = "setShaderFogShape", at = @At("RETURN"))
private static void flywheel$onSetFogShape(CallbackInfo ci) {
FogUniforms.update();
}
Expand Down

0 comments on commit 84e2786

Please sign in to comment.