From 87b97ab157aa6988a88202f56b1397df6b0138e1 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Mon, 8 Oct 2012 19:08:27 -1000 Subject: [PATCH] Fix server generator when using MC Server 1.3.2. MCServerChunkGenerator.copyChunkAtPosition copies the compressed chunk data instead of the uncompressed tag. This is because AnvilChunk removes parts of the tag when emulating the older chunk format. --- infiniteworld.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/infiniteworld.py b/infiniteworld.py index 849aaf1..96713fd 100644 --- a/infiniteworld.py +++ b/infiniteworld.py @@ -440,20 +440,17 @@ class MCServerChunkGenerator(object): except ChunkNotPresent, e: raise ChunkNotPresent("While generating a world in {0} using server {1} ({2!r})".format(tempWorld, self.serverJarFile, e), sys.exc_traceback) - tempChunk.decompress() - tempChunk.unpackChunkData() - root_tag = tempChunk.root_tag + tempChunk.compress() + data = tempChunk.compressedTag if not level.containsChunk(cx, cz): level.createChunk(cx, cz) chunk = level.getChunk(cx, cz) - chunk.decompress() - chunk.unpackChunkData() - chunk.root_tag = root_tag # xxx tag swap, could copy blocks and entities and chunk attrs instead? + chunk.compress() + chunk.compressedTag = data # xxx tag swap, could copy blocks and entities and chunk attrs instead? chunk.dirty = True - chunk.compress() chunk.save() chunk.unload() tempChunk.compress()