getAllChunks needs to yield the relative position within the requested box instead of the absolute position

This commit is contained in:
David Vierra 2011-04-21 15:54:14 -10:00
parent 6d09499433
commit e2edef3ed5

View File

@ -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):