feat: Ensure stone layer chunks always render and remain visible
This commit is contained in:
@@ -527,9 +527,14 @@ function generateChunksAroundPlayer() {
|
||||
const chunkY = 1; // The chunk at y = 1 (moved from y = -1)
|
||||
const key = getChunkKey(chunkX, chunkY);
|
||||
|
||||
// Always generate and mark as dirty to ensure rendering
|
||||
// Always generate stone layer chunks
|
||||
getOrCreateChunk(chunkX, chunkY);
|
||||
dirtyChunks.add(key);
|
||||
|
||||
// Mark as dirty only if it's a new chunk or if it's visible
|
||||
if (!chunks.has(key) || visibleChunks.some(chunk =>
|
||||
chunk.chunkX === chunkX && chunk.chunkY === chunkY && chunk.isVisible)) {
|
||||
dirtyChunks.add(key);
|
||||
}
|
||||
}
|
||||
|
||||
// Generate visible chunks first
|
||||
|
||||
Reference in New Issue
Block a user