summary refs log tree commit diff
path: root/src/World/Position.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/World/Position.hpp')
-rw-r--r--src/World/Position.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/World/Position.hpp b/src/World/Position.hpp
index 49cbbb6..b603ee4 100644
--- a/src/World/Position.hpp
+++ b/src/World/Position.hpp
@@ -9,9 +9,9 @@ namespace MC::World::Position {
 using World = Vector<3>;
 
 // Offset between block positions within single chunk.
-class OffsetBlock : public Vector<3, I8> {
+class BlockOffset : public Vector<3, I16> {
 public:
-    OffsetBlock(I8 x, I8 y, I8 z) : Vector(x, y, z) {}
+    BlockOffset(I16 x, I16 y, I16 z) : Vector(x, y, z) {}
     Bool fits_within_chunk() const {
         using namespace ChunkDimensions;
         return x() >= 0 && x() < Width && y() >= 0 && y() < Height && z() >= 0 && z() < Width;
@@ -28,8 +28,8 @@ public:
 class BlockLocal : public Vector<3, U8> {
 public:
     BlockLocal(U8 x, U8 y, U8 z) : Vector(x, y, z) {}
-    BlockLocal(OffsetBlock offset) : BlockLocal(offset.x(), offset.y(), offset.z()) {}
-    OffsetBlock offset(OffsetBlock by) {
+    BlockLocal(BlockOffset offset) : BlockLocal(offset.x(), offset.y(), offset.z()) {}
+    BlockOffset offset(BlockOffset by) {
         return {
             static_cast<I8>(x() + by.x()),
             static_cast<I8>(y() + by.y()),
@@ -38,7 +38,7 @@ public:
     }
 };
 
-const std::array<OffsetBlock, 6> axis_directions = {{
+const std::array<BlockOffset, 6> axis_directions = {{
     {1, 0, 0}, {-1, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 1}, {0, 0, -1},
 }};