From e2edef3ed52d4db5756046bc9405c7ea55e3984d Mon Sep 17 00:00:00 2001 From: David Vierra Date: Thu, 21 Apr 2011 15:54:14 -1000 Subject: [PATCH] getAllChunks needs to yield the relative position within the requested box instead of the absolute position --- mclevel.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mclevel.py b/mclevel.py index e12b34f..7906afa 100644 --- a/mclevel.py +++ b/mclevel.py @@ -530,6 +530,8 @@ class MCLevel(object): def getAllChunkSlices(self): slices = ( slice(None),slice(None),slice(None), ) + box = self.bounds + x, y, z = box.origin for cpos in self.allChunks: xPos, zPos = cpos @@ -539,7 +541,7 @@ class MCLevel(object): continue - yield ( chunk, slices, (xPos * 16, 0, zPos * 16) ) + yield ( chunk, slices, (xPos * 16 - x, 0, zPos * 16 - z) ) def getChunkSlices(self, box):