Odd shaped chunk sections are now forbidden. Begin removing special cases.
SchematicFileAdapter tries very hard to present uniformly shaped sections and so should you.
This commit is contained in:
parent
0d59ad9c95
commit
4d878c86c1
@ -125,13 +125,6 @@ def copyBlocksIter(destDim, sourceDim, sourceSelection, destinationPoint, blocks
|
||||
if destSection is None:
|
||||
continue
|
||||
|
||||
# Recompute destSectionBox and intersect using the shape of destSection.Blocks
|
||||
# after destChunk is loaded to work with odd shaped FakeChunkDatas XXXXXXXXXXXX
|
||||
destSectionBox = SectionBox(destCpos[0], destCy, destCpos[1], destSection)
|
||||
intersect = destSectionBox.intersect(destBox)
|
||||
if intersect.volume == 0:
|
||||
continue
|
||||
|
||||
destSlices = (
|
||||
slice(intersect.miny - (destCy << 4), intersect.maxy - (destCy << 4)),
|
||||
slice(intersect.minz - (destCpos[1] << 4), intersect.maxz - (destCpos[1] << 4)),
|
||||
|
@ -245,14 +245,8 @@ class DifferenceBox(CombinationBox):
|
||||
return self.oper(left, right)
|
||||
|
||||
|
||||
def SectionBox(cx, cy, cz, section=None):
|
||||
if section is None:
|
||||
shape = 16, 16, 16
|
||||
else:
|
||||
# XXX needed because FakeChunkedLevel returns odd sized sections - fix with storage adapter
|
||||
# still needed????
|
||||
shape = section.Blocks.shape
|
||||
shape = shape[2], shape[0], shape[1]
|
||||
def SectionBox(cx, cy, cz):
|
||||
shape = 16, 16, 16
|
||||
|
||||
return BoundingBox(Vector(cx, cy, cz) * 16, shape)
|
||||
|
||||
|
Reference in New Issue
Block a user