Only load the biome once when needed
@@ -51,9 +51,12 @@ public void generateChunkMesh(ChunkView view, ChunkMesh chunkMesh, int x, int y,
adjacentBlocks.put(side, blockToCheck);
}
+ Biome selfBiome = null;
for (final Side side : Side.getAllSides()) {
if (isSideVisibleForBlockTypes(adjacentBlocks.get(side), selfBlock, side)) {
- final Biome selfBiome = view.getBiome(x, y, z);
+ if (selfBiome == null) {
+ selfBiome = view.getBiome(x, y, z);
+ }
final ChunkMesh.RenderType renderType = getRenderType(selfBlock);
final BlockAppearance blockAppearance = selfBlock.getPrimaryAppearance();
final ChunkVertexFlag vertexFlag = getChunkVertexFlag(view, x, y, z, selfBlock);
