diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/clouds/MixinCloudRenderer.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/clouds/MixinCloudRenderer.java index 8dd40149be..f21b4b35df 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/clouds/MixinCloudRenderer.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/clouds/MixinCloudRenderer.java @@ -69,10 +69,15 @@ public void renderIris(@Nullable ClientLevel world, LocalPlayer player, PoseStac return; } - Vec3 color = world.getCloudColor(tickDelta); - float cloudHeight = world.effects().getCloudHeight(); + // Vanilla uses NaN height as a way to disable cloud rendering + if (Float.isNaN(cloudHeight)) { + return; + } + + Vec3 color = world.getCloudColor(tickDelta); + double cloudTime = (ticks + tickDelta) * 0.03F; double cloudCenterX = (cameraX + cloudTime); double cloudCenterZ = (cameraZ) + 0.33D;