DidObfuscate

- 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
This commit is contained in:
Jozufozu 2024-10-28 13:36:39 -07:00
parent 03f94fe88c
commit 84e27867d3

View File

@ -27,7 +27,10 @@ abstract class RenderSystemMixin {
FogUniforms.update(); 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) { private static void flywheel$onSetFogShape(CallbackInfo ci) {
FogUniforms.update(); FogUniforms.update();
} }