Implemented new Anvil saving format, fixed old chunk saving format.

- Added 'Chunk' Interface.
 - Moved old 'Chunk' to 'OldChunk' and replaced dynamic world height reference with '128.
 - Added 'AnvilChunk' implementing the new anvil chunk format.
 - Added temp fixes to FileMcRegionChunkStore.java, TrueZipMcRegionChunkStore.java and ZippedMcRegionChunkStore.java too allow them to read .mca files.
 - Added the new 'IntArrayTag' since the new heightmap tag wasn't recognized.
 - Moved 'getChildTag' to 'NBTUtils'.
This commit is contained in:
Meaglin
2012-03-05 07:05:17 +01:00
committed by TomyLobo
parent 19b353f6b5
commit 8aabfb0c67
17 changed files with 647 additions and 253 deletions

View File

@@ -199,6 +199,13 @@ public final class NBTInputStream implements Closeable {
}
return new CompoundTag(name, tagMap);
case NBTConstants.TYPE_INT_ARRAY:
length = is.readInt();
int[] data = new int[length];
for (int i = 0; i < length; i++) {
data[i] = is.readInt();
}
return new IntArrayTag(name, data);
default:
throw new IOException("Invalid tag type: " + type + ".");
}