Fix build for 1.8

This commit is contained in:
Jonas Herzig
2021-11-29 16:21:00 +01:00
parent 6e1febdab8
commit dd055e5c5b
2 changed files with 10 additions and 4 deletions

View File

@@ -27,14 +27,15 @@ import net.minecraft.client.render.WorldRenderer;
public abstract class Mixin_ChromaKeyForceSky { public abstract class Mixin_ChromaKeyForceSky {
@Shadow @Final private MinecraftClient client; @Shadow @Final private MinecraftClient client;
// FIXME preprocessor bug: should be able to remap these
//#if MC>=11500 //#if MC>=11500
@ModifyConstant(method = "render", constant = @Constant(intValue = 4)) @ModifyConstant(method = "render", constant = @Constant(intValue = 4))
//#else //#elseif MC>=11400
//#if MC>=11400
//$$ @ModifyConstant(method = "renderCenter", constant = @Constant(intValue = 4)) //$$ @ModifyConstant(method = "renderCenter", constant = @Constant(intValue = 4))
//#else //#elseif MC>=10809
//$$ @ModifyConstant(method = "updateCameraAndRender(FJ)V", constant = @Constant(intValue = 4)) //$$ @ModifyConstant(method = "updateCameraAndRender(FJ)V", constant = @Constant(intValue = 4))
//#endif //#else
//$$ @ModifyConstant(method = "updateCameraAndRender(F)V", constant = @Constant(intValue = 4))
//#endif //#endif
private int forceSkyWhenChromaKeying(int value) { private int forceSkyWhenChromaKeying(int value) {
EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) this.client.gameRenderer).replayModRender_getHandler(); EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) this.client.gameRenderer).replayModRender_getHandler();

View File

@@ -10,7 +10,12 @@ import org.spongepowered.asm.mixin.injection.ModifyArg;
@Mixin(GameRenderer.class) @Mixin(GameRenderer.class)
public abstract class Mixin_PreserveDepthDuringHandRendering { public abstract class Mixin_PreserveDepthDuringHandRendering {
@ModifyArg( @ModifyArg(
// FIXME preprocessor bug: 1.8.9 uses method with `(FJ)V` when just name would be enough
//#if MC>=10809
method = "renderWorld", method = "renderWorld",
//#else
//$$ method = "updateCameraAndRender(F)V",
//#endif
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"), at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"),
index = 0 index = 0
) )