From fe0f5eef18cde7307fbca977f72cb37ab842e3c4 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Sun, 21 Jan 2024 20:43:27 -0500 Subject: [PATCH] Use MutableBlockPos when copying biomes --- .../mods/sodium/client/world/cloned/ClonedChunkSection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/jellysquid/mods/sodium/client/world/cloned/ClonedChunkSection.java b/src/main/java/me/jellysquid/mods/sodium/client/world/cloned/ClonedChunkSection.java index 911f86d48..3da49f551 100644 --- a/src/main/java/me/jellysquid/mods/sodium/client/world/cloned/ClonedChunkSection.java +++ b/src/main/java/me/jellysquid/mods/sodium/client/world/cloned/ClonedChunkSection.java @@ -73,11 +73,12 @@ public void init(ChunkSectionPos pos) { } } + BlockPos.MutableBlockPos biomePos = new BlockPos.MutableBlockPos(); // Fill biome data for(int z = pos.getMinZ(); z <= pos.getMaxZ(); z++) { for(int x = pos.getMinX(); x <= pos.getMaxX(); x++) { - // TODO Check if correct - this.biomeData[((z & 15) << 4) | (x & 15)] = world.getBiome(new BlockPos(x, 100, z)); + biomePos.setPos(x, 100, z); + this.biomeData[((z & 15) << 4) | (x & 15)] = world.getBiome(biomePos); } } }