Skip to content

Commit

Permalink
Fix clouds still being rendered if height is NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Nov 1, 2023
1 parent 93a632f commit bed4d1e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ public void render(@Nullable ClientWorld world, ClientPlayerEntity player, Matri
return;
}

Vec3d color = world.getCloudsColor(tickDelta);

float cloudHeight = world.getDimensionEffects().getCloudsHeight();

if (Float.isNaN(cloudHeight)) {
return;
}

Vec3d color = world.getCloudsColor(tickDelta);

double cloudTime = (ticks + tickDelta) * 0.03F;
double cloudCenterX = (cameraX + cloudTime);
double cloudCenterZ = (cameraZ) + 0.33D;
Expand Down

0 comments on commit bed4d1e

Please sign in to comment.