diff --git a/chunky/src/java/se/llbit/chunky/renderer/scene/biome/BiomeBlendingUtility.java b/chunky/src/java/se/llbit/chunky/renderer/scene/biome/BiomeBlendingUtility.java index 4048ba8e6e..e8e1b2a6ea 100644 --- a/chunky/src/java/se/llbit/chunky/renderer/scene/biome/BiomeBlendingUtility.java +++ b/chunky/src/java/se/llbit/chunky/renderer/scene/biome/BiomeBlendingUtility.java @@ -121,7 +121,7 @@ static public void chunk2DBlur(ChunkPosition cp, int blurRadius, int samplingY, SummedAreaTable table = new SummedAreaTable(blurRadius); for(int x = -blurRadius; x < 16 + blurRadius; ++x) { for(int z = -blurRadius; z < 16 + blurRadius; ++z) { - ChunkPosition ccp = new ChunkPosition((cp.x * 16 + x) / 16, (cp.z * 16 + z) / 16); + ChunkPosition ccp = new ChunkPosition(Math.floorDiv(cp.x * 16 + x, 16), Math.floorDiv(cp.z * 16 + z, 16)); if (nonEmptyChunks.contains(ccp)) { int biomeId = biomeIdx.get(cp.x * 16 + x, samplingY, cp.z * 16 + z); if(biomeId != -1) { @@ -298,7 +298,7 @@ static public void chunk3DBlur(ChunkPosition cp, int blurRadius, int minY, int m for(int y = minY - blurRadius; y < maxY + blurRadius; ++y) { for(int x = -blurRadius; x < 16 + blurRadius; ++x) { for(int z = -blurRadius; z < 16 + blurRadius; ++z) { - ChunkPosition ccp = new ChunkPosition((cp.x * 16 + x) / 16, (cp.z * 16 + z) / 16); + ChunkPosition ccp = new ChunkPosition(Math.floorDiv(cp.x * 16 + x, 16), Math.floorDiv(cp.z * 16 + z, 16)); if (nonEmptyChunks.contains(ccp)) { int biomeId = biomeIdx.get(cp.x * 16 + x, y, cp.z * 16 + z); if(biomeId != -1) {