Skip to content

Commit

Permalink
Use MutableBlockPos when copying biomes
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Jan 22, 2024
1 parent 85fc3ae commit fe0f5ee
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit fe0f5ee

Please sign in to comment.