Seamless chunk borders #4

Merged
EmaMaker merged 3 commits from chunkborders into main 2023-06-01 21:37:19 +02:00

3 Commits (main)

Author SHA1 Message Date
EmaMaker 393e5ca9b2 chunkmesher: seamless chunkborders by checking neighbouring chunks 2023-06-01 21:31:18 +02:00
EmaMaker f798575cac chunkmanager: add function getBlockAtPos, returns block at world pos
Returns Block::NULLBLK only to signal an invalid position
2023-06-01 21:31:18 +02:00
EmaMaker 0ebbb897dc chunk: handle special cases for getBlocks
Returning Block::AIR when chunk is not yet generated (CHUNK_STATE_GENERATED set to false) is also a way to avoid thread-unsafe concurrent
access to the IntervalMaps data structure, since CHUNK_STATE_GENERATED is set to false before
generating the Chunk and set again to true after generation is complete
2023-06-01 21:31:18 +02:00