summary refs log tree commit diff
path: root/src/World/Chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/Chunk.cpp')
-rw-r--r--src/World/Chunk.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/World/Chunk.cpp b/src/World/Chunk.cpp
index 94e757e..ab727bd 100644
--- a/src/World/Chunk.cpp
+++ b/src/World/Chunk.cpp
@@ -3,16 +3,16 @@
 
 namespace MC::World {
 
-void Chunk::set(U32 x, U32 y, U32 z, BlockData data) {
-    m_blocks.at(pos(x, y, z)) = data;
+const Chunk::BlockData& Chunk::at(U32 x, U32 y, U32 z) const {
+    return m_blocks.at(pos(x, y, z));
 }
 
-Chunk::BlockData Chunk::get(U32 x, U32 y, U32 z) const {
+Chunk::BlockData& Chunk::at(U32 x, U32 y, U32 z) {
     return m_blocks.at(pos(x, y, z));
 }
 
 Bool Chunk::is_empty(U32 x, U32 y, U32 z) const {
-    return get(x, y, z).empty();
+    return at(x, y, z).empty();
 }
 
 Vector<3> Chunk::position() const {