Skip to content

Commit

Permalink
Fix negative scene minY inconsistent behaviour (#1765)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotStirred authored Sep 18, 2024
1 parent b1e28ab commit 3a1f78a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ public synchronized void loadChunks(TaskTracker taskTracker, World world, Collec

entities.loadEntitiesInChunk(this, chunkData);

int yCubeMin = yMin / 16;
int yCubeMin = Math.floorDiv(yMin, 16); // round towards -infinity
int yCubeMax = (yMax+15) / 16;
for(int yCube = yCubeMin; yCube < yCubeMax; ++yCube) {
// Reset the cubes
Expand Down

0 comments on commit 3a1f78a

Please sign in to comment.