From c930cbb877e12417adb3d1463b192ddf99490bd7 Mon Sep 17 00:00:00 2001 From: Asek3 <64613894+Asek3@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:20:33 +0300 Subject: [PATCH] Some clouds fixes --- .../java/net/coderbot/iris/mixin/MixinLevelRenderer.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/coderbot/iris/mixin/MixinLevelRenderer.java b/src/main/java/net/coderbot/iris/mixin/MixinLevelRenderer.java index 641b2ae662..dcddaf4938 100644 --- a/src/main/java/net/coderbot/iris/mixin/MixinLevelRenderer.java +++ b/src/main/java/net/coderbot/iris/mixin/MixinLevelRenderer.java @@ -154,17 +154,16 @@ public class MixinLevelRenderer { pipeline.setPhase(WorldRenderingPhase.NONE); } - @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = RENDER_CLOUDS)) - private void iris$beginClouds(PoseStack poseStack, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projection, CallbackInfo callback) { + @Inject(method = RENDER_CLOUDS, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/DimensionSpecialEffects;renderClouds(Lnet/minecraft/client/multiplayer/ClientLevel;IFLcom/mojang/blaze3d/vertex/PoseStack;DDDLcom/mojang/math/Matrix4f;)Z", shift = At.Shift.AFTER)) + private void iris$beginClouds(PoseStack poseStack, Matrix4f projection, float tickDelta, double x, double y, double z, CallbackInfo ci) { pipeline.setPhase(WorldRenderingPhase.CLOUDS); } - @Inject(method = "renderLevel", at = @At(value = "INVOKE", target = RENDER_CLOUDS, shift = At.Shift.AFTER)) - private void iris$endClouds(PoseStack poseStack, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f projection, CallbackInfo callback) { + @Inject(method = RENDER_CLOUDS, at = @At(value = "RETURN")) + private void iris$endClouds(PoseStack poseStack, Matrix4f projection, float tickDelta, double x, double y, double z, CallbackInfo ci) { pipeline.setPhase(WorldRenderingPhase.NONE); } - @Inject(method = "renderChunkLayer", at = @At("HEAD")) private void iris$beginTerrainLayer(RenderType renderType, PoseStack poseStack, double d, double e, double f, Matrix4f projectionMatrix, CallbackInfo ci) { pipeline.setPhase(WorldRenderingPhase.fromTerrainRenderType(renderType));