fixed rotations
This commit is contained in:
@@ -490,8 +490,10 @@ class RotatedRegionSet(RegionSetWrapper):
|
|||||||
def get_chunk(self, x, z):
|
def get_chunk(self, x, z):
|
||||||
x,z = self.unrotate(x,z)
|
x,z = self.unrotate(x,z)
|
||||||
chunk_data = dict(super(RotatedRegionSet, self).get_chunk(x,z))
|
chunk_data = dict(super(RotatedRegionSet, self).get_chunk(x,z))
|
||||||
|
newsections = []
|
||||||
for section in chunk_data['Sections']:
|
for section in chunk_data['Sections']:
|
||||||
section = dict(section)
|
section = dict(section)
|
||||||
|
newsections.append(section)
|
||||||
for arrayname in ['Blocks', 'Data', 'SkyLight', 'BlockLight']:
|
for arrayname in ['Blocks', 'Data', 'SkyLight', 'BlockLight']:
|
||||||
array = section[arrayname]
|
array = section[arrayname]
|
||||||
# Since the anvil change, arrays are arranged with axes Y,Z,X
|
# Since the anvil change, arrays are arranged with axes Y,Z,X
|
||||||
@@ -501,6 +503,7 @@ class RotatedRegionSet(RegionSetWrapper):
|
|||||||
array = numpy.rot90(array, self.north_dir)
|
array = numpy.rot90(array, self.north_dir)
|
||||||
array = numpy.swapaxes(array, 0,2)
|
array = numpy.swapaxes(array, 0,2)
|
||||||
section[arrayname] = array
|
section[arrayname] = array
|
||||||
|
chunk_data['Sections'] = newsections
|
||||||
return chunk_data
|
return chunk_data
|
||||||
|
|
||||||
def get_chunk_mtime(self, x, z):
|
def get_chunk_mtime(self, x, z):
|
||||||
|
|||||||
Reference in New Issue
Block a user