From 799f8045e6f7318c245ae9ddf156350161dfb6dc Mon Sep 17 00:00:00 2001 From: granny Date: Fri, 31 May 2024 17:26:22 -0700 Subject: [PATCH] support uncompressed data, closes #45 --- core/src/main/java/net/pl3x/map/core/world/Region.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/net/pl3x/map/core/world/Region.java b/core/src/main/java/net/pl3x/map/core/world/Region.java index 10cfceda6..256e48a09 100644 --- a/core/src/main/java/net/pl3x/map/core/world/Region.java +++ b/core/src/main/java/net/pl3x/map/core/world/Region.java @@ -126,6 +126,12 @@ public void loadChunks() throws IOException { byte compressionTypeByte = raf.readByte(); CompressionType compressionType = CompressionType.getFromID(compressionTypeByte); + + // TODO: hotfix until querz' nbt library supports id as 3 for uncompressed + if (compressionType == null && compressionTypeByte == 3) { + compressionType = CompressionType.NONE; + } + if (compressionTypeByte != 4 && compressionType == null) { throw new IOException("Invalid compression type " + compressionTypeByte); }