getAllChunks needs to yield the relative position within the requested box instead of the absolute position
This commit is contained in:
parent
6d09499433
commit
e2edef3ed5
@ -530,6 +530,8 @@ class MCLevel(object):
|
|||||||
|
|
||||||
def getAllChunkSlices(self):
|
def getAllChunkSlices(self):
|
||||||
slices = ( slice(None),slice(None),slice(None), )
|
slices = ( slice(None),slice(None),slice(None), )
|
||||||
|
box = self.bounds
|
||||||
|
x, y, z = box.origin
|
||||||
|
|
||||||
for cpos in self.allChunks:
|
for cpos in self.allChunks:
|
||||||
xPos, zPos = cpos
|
xPos, zPos = cpos
|
||||||
@ -539,7 +541,7 @@ class MCLevel(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
yield ( chunk, slices, (xPos * 16, 0, zPos * 16) )
|
yield ( chunk, slices, (xPos * 16 - x, 0, zPos * 16 - z) )
|
||||||
|
|
||||||
|
|
||||||
def getChunkSlices(self, box):
|
def getChunkSlices(self, box):
|
||||||
|
Reference in New Issue
Block a user