fix ghost chunks and wait for generation on startup

This commit is contained in:
Alex Zenla
2024-09-05 21:16:29 -04:00
parent 57b97148a4
commit 54ed81b15d
4 changed files with 15 additions and 3 deletions

View File

@ -106,6 +106,10 @@ public class World {
self._chunkGeneration.acceptReadyChunks()
}
public func waitForActiveOperations() {
self._chunkGeneration.waitForActiveOperations()
}
func handleRenderDamagedChunks(_ body: (_ id: ChunkID, _ chunk: Chunk) -> Void) {
for id in self._chunkDamage {
body(id, self._chunks[id]!)