diff --git a/chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java b/chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java index a9f59a684..54a69d051 100644 --- a/chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java +++ b/chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java @@ -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