summary refs log tree commit diff
path: root/src/World/Chunk.cpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-22 17:35:00 +0200
committerMel <einebeere@gmail.com>2023-07-22 17:35:00 +0200
commit2eef7cf49b7a15559ee7bb6719411bcf67386213 (patch)
tree11eb7a4f437da7bfdde620c10a043960fd423cfb /src/World/Chunk.cpp
parent23d88e5f1c8f0c8652a07050fcfa8ff126e85d4a (diff)
downloadmeowcraft-2eef7cf49b7a15559ee7bb6719411bcf67386213.tar.zst
meowcraft-2eef7cf49b7a15559ee7bb6719411bcf67386213.zip
Propagation in lighting system
Diffstat (limited to 'src/World/Chunk.cpp')
-rw-r--r--src/World/Chunk.cpp12
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;
 }