Fix depth export while spectating on 1.12.2 and below (fixes #785)

This commit is contained in:
Jonas Herzig
2022-12-07 14:32:16 +01:00
parent ffcca61b5b
commit 000ff19749
2 changed files with 7 additions and 6 deletions

View File

@@ -10,13 +10,16 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
@Mixin(GameRenderer.class)
public abstract class Mixin_PreserveDepthDuringHandRendering {
@ModifyArg(
// FIXME preprocessor bug: 1.8.9 uses method with `(FJ)V` when just name would be enough
//#if MC>=10809
//#if MC>=11400
method = "renderWorld",
//#else
//$$ method = "updateCameraAndRender(F)V",
//$$ method = "renderWorldPass",
//#endif
//#if MC>=11400
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"),
//#else
//$$ at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;clear(I)V", ordinal = 1),
//#endif
index = 0
)
private int replayModRender_skipClearWhenRecordingDepth(int mask) {