Add support for c2me-uncompressed chunks

This commit is contained in:
Lukas Rieger (Blue) 2023-07-07 13:15:17 +02:00
parent 838b22aa19
commit 83b81bcca6
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2

View File

@ -87,7 +87,9 @@ public Chunk loadChunk(int chunkX, int chunkZ, boolean ignoreMissingLightData) t
raf.seek(offset + 4); // +4 skip chunk size raf.seek(offset + 4); // +4 skip chunk size
byte compressionTypeByte = raf.readByte(); byte compressionTypeByte = raf.readByte();
CompressionType compressionType = CompressionType.getFromID(compressionTypeByte); CompressionType compressionType = compressionTypeByte == 3 ?
CompressionType.NONE :
CompressionType.getFromID(compressionTypeByte);
if (compressionType == null) { if (compressionType == null) {
throw new IOException("Invalid compression type " + compressionTypeByte); throw new IOException("Invalid compression type " + compressionTypeByte);
} }