0

Working rendering with the new McRegion format.

Notes:
 * Currently only works with -p 1
 * Caching is mostly compatible with existing caches, but not completly.
   This needs more testing and more code reviews
 * There are probably many code paths that will throw exceptions.
 * Not ready for general use yet, but is OK for testing
This commit is contained in:
Andrew Chin
2011-02-23 22:13:35 -05:00
parent 5f5bda948e
commit 05ea562060
4 changed files with 142 additions and 85 deletions

3
nbt.py
View File

@@ -34,7 +34,8 @@ def load(fileobj):
def load_from_region(fileobj, x, y):
nbt = MCRFileReader(fileobj).load_chunk(x, y)
if not nbt:
raise IOError("No such chunk in region: (%i, %i)" % (x, y))
return None ## return none. I think this is who we should indicate missing chunks
#raise IOError("No such chunk in region: (%i, %i)" % (x, y))
return nbt.read_all()
class NBTFileReader(object):