summaryrefslogtreecommitdiff
path: root/mcmap
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-16 12:40:59 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-16 12:40:59 +0200
commit2d7bcaa82a5cd2c228f9ff65f9168cff708c5afd (patch)
tree818b9ecd403b43bc0f23a37042d69e4033fbd11f /mcmap
parent49d1214ca12d9463102fa48d74e0b9bd3853dc5e (diff)
downloadgomcmap-2d7bcaa82a5cd2c228f9ff65f9168cff708c5afd.tar.gz
gomcmap-2d7bcaa82a5cd2c228f9ff65f9168cff708c5afd.tar.bz2
gomcmap-2d7bcaa82a5cd2c228f9ff65f9168cff708c5afd.zip
Fixed BlockToChunk... Again...
Totally not embarassing...
Diffstat (limited to 'mcmap')
-rw-r--r--mcmap/chunk.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcmap/chunk.go b/mcmap/chunk.go
index 45ab75c..6f78fdc 100644
--- a/mcmap/chunk.go
+++ b/mcmap/chunk.go
@@ -25,8 +25,8 @@ func offsetToPos(off int) (x, y, z int) {
func BlockToChunk(bx, bz int) (cx, cz, rbx, rbz int) {
cx = bx >> 4
cz = bz >> 4
- rbx = ((cx % ChunkSizeXZ) + ChunkSizeXZ) % ChunkSizeXZ
- rbz = ((cz % ChunkSizeXZ) + ChunkSizeXZ) % ChunkSizeXZ
+ rbx = ((bx % ChunkSizeXZ) + ChunkSizeXZ) % ChunkSizeXZ
+ rbz = ((bz % ChunkSizeXZ) + ChunkSizeXZ) % ChunkSizeXZ
return
}