Skip to content

Commit

Permalink
Fix logic error in distance culling for chunk sections
Browse files Browse the repository at this point in the history
  • Loading branch information
jellysquid3 committed Jan 27, 2024
1 parent 6af3d20 commit 6bd085a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private static boolean isWithinRenderDistance(CameraTransform camera, RenderSect

// vanilla's "cylindrical fog" algorithm
// max(length(distance.xz), abs(distance.y))
return (((dx * dx) + (dz * dz)) < (maxDistance * maxDistance)) || (Math.abs(dy) < maxDistance);
return (((dx * dx) + (dz * dz)) < (maxDistance * maxDistance)) && (Math.abs(dy) < maxDistance);
}

@SuppressWarnings("ManualMinMaxCalculation") // we know what we are doing.
Expand Down

0 comments on commit 6bd085a

Please sign in to comment.