world regen clears all chunks

This commit is contained in:
2024-09-07 04:05:50 +10:00
parent c80e456d3e
commit ee54e011a1
4 changed files with 23 additions and 5 deletions

View File

@ -68,6 +68,11 @@ public class World {
}
}
func removeAllChunks() {
self._chunkGeneration.cancelAndClearAll()
self._chunks.removeAll()
}
func generate(width: Int, height: Int, depth: Int, seed: UInt64) {
self._generator.reset(seed: seed)
let orig = SIMD3(width, height, depth) / 2