summary refs log tree commit diff
path: root/src/World/ChunkIndex.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-02-02 16:16:25 +0100
committerMel <einebeere@gmail.com>2024-02-02 16:16:25 +0100
commita4a61ac2e6389af0968ac4fb305b82c6eb90bf0e (patch)
tree800749ed6a5d503837a6bf0c389c133fcb59143d /src/World/ChunkIndex.hpp
parent250e37c742f3ad46f093f4534098cdf8f68a29a9 (diff)
downloadmeowcraft-a4a61ac2e6389af0968ac4fb305b82c6eb90bf0e.tar.zst
meowcraft-a4a61ac2e6389af0968ac4fb305b82c6eb90bf0e.zip
Placing blocks
Diffstat (limited to 'src/World/ChunkIndex.hpp')
-rw-r--r--src/World/ChunkIndex.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/World/ChunkIndex.hpp b/src/World/ChunkIndex.hpp
index da23e3d..1e2b9ac 100644
--- a/src/World/ChunkIndex.hpp
+++ b/src/World/ChunkIndex.hpp
@@ -18,7 +18,7 @@ struct ChunkIndex {
 
     Position::BlockWorld local_to_world_position(Position::BlockLocal local) const {
         using namespace ChunkDimensions;
-        return {x * Width + local.x(), local.y(), y * Width + local.z()};
+        return {TO(I64, x) * Width + local.x(), local.y(), TO(I64, y) * Width + local.z()};
     }
 
     Position::BlockWorld world_position() const {