From b1d5dee84d674ea439684b4334facdcbd6bf3ca4 Mon Sep 17 00:00:00 2001 From: Andrew Chin Date: Sun, 1 Jan 2012 17:56:31 -0500 Subject: [PATCH] Remove unused function --- contrib/rerenderBlocks.py | 2 +- overviewer_core/chunk.py | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/contrib/rerenderBlocks.py b/contrib/rerenderBlocks.py index 56f6bcf..9b16ceb 100644 --- a/contrib/rerenderBlocks.py +++ b/contrib/rerenderBlocks.py @@ -26,7 +26,7 @@ if not hasattr(sys, "frozen"): from overviewer_core import nbt from overviewer_core import world -from overviewer_core.chunk import get_blockarray_fromfile, get_blockarray +from overviewer_core.chunk import get_blockarray parser = OptionParser() parser.add_option("--ids", dest="ids", type="string") diff --git a/overviewer_core/chunk.py b/overviewer_core/chunk.py index 56cfd8f..0df9464 100644 --- a/overviewer_core/chunk.py +++ b/overviewer_core/chunk.py @@ -75,24 +75,6 @@ def get_blockarray(level): Block array, which just contains all the block ids""" return level['Blocks'] -def get_blockarray_fromfile(filename, north_direction='lower-left'): - """Same as get_blockarray except takes a filename. This is a shortcut""" - d = nbt.load_from_region(filename, x, y, north_direction) - level = d[1]['Level'] - chunk_data = level - rots = 0 - if self.north_direction == 'upper-left': - rots = 1 - elif self.north_direction == 'upper-right': - rots = 2 - elif self.north_direction == 'lower-right': - rots = 3 - - chunk_data['Blocks'] = numpy.rot90(numpy.frombuffer( - level['Blocks'], dtype=numpy.uint8).reshape((16,16,128)), - rots) - return get_blockarray(chunk_data) - def get_skylight_array(level): """Returns the skylight array. This is 4 bits per block, but it is expanded for you so you may index it normally."""