From 62644d66647c9403045ebd27461c52ff54f35478 Mon Sep 17 00:00:00 2001 From: Tom Martin Date: Tue, 17 Sep 2024 21:35:46 +0100 Subject: [PATCH] Fix negative scene minY inconsistent behaviour --- chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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