diff options
Diffstat (limited to 'src/World/Chunk.cpp')
| -rw-r--r-- | src/World/Chunk.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/World/Chunk.cpp b/src/World/Chunk.cpp index ab727bd..31a2c90 100644 --- a/src/World/Chunk.cpp +++ b/src/World/Chunk.cpp @@ -11,10 +11,22 @@ Chunk::BlockData& Chunk::at(U32 x, U32 y, U32 z) { return m_blocks.at(pos(x, y, z)); } +const Chunk::BlockData& Chunk::at(Position::BlockLocal pos) const { + return at(pos.x(), pos.y(), pos.z()); +} + +Chunk::BlockData& Chunk::at(Position::BlockLocal pos) { + return at(pos.x(), pos.y(), pos.z()); +} + Bool Chunk::is_empty(U32 x, U32 y, U32 z) const { return at(x, y, z).empty(); } +ChunkIndex Chunk::index() const { + return m_index; +} + Vector<3> Chunk::position() const { return m_position; } |
