diff options
Diffstat (limited to 'src/World/Generation/ChunkNeighbors.hpp')
| -rw-r--r-- | src/World/Generation/ChunkNeighbors.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/World/Generation/ChunkNeighbors.hpp b/src/World/Generation/ChunkNeighbors.hpp index 1207c60..83fca4c 100644 --- a/src/World/Generation/ChunkNeighbors.hpp +++ b/src/World/Generation/ChunkNeighbors.hpp @@ -1,13 +1,22 @@ #pragma once #include "../Chunk.hpp" +#include "../ChunkRegistry.hpp" namespace MC::World::Generation { struct ChunkNeighbors { Chunk *north, *east, *south, *west; Chunk *north_east, *south_east, *south_west, *north_west; + + Bool all_exist() const { return north && east && south && west && north_east && south_east && south_west && north_west; } }; -Chunk::BlockData get_block_wrapping(const Chunk& chunk, const ChunkNeighbors& neighbors, Vector<3, I32> pos); +ChunkNeighbors find_chunk_neighbors(ChunkIndex chunk, ChunkRegistry& chunks); + +struct GetBlockWrappingResult { + bool does_exist; + Chunk::BlockData block; +}; +GetBlockWrappingResult get_block_wrapping(const Chunk& chunk, const ChunkNeighbors& neighbors, Vector<3, I32> pos); -} \ No newline at end of file +} |
