Skip to content

Commit

Permalink
support uncompressed data, closes #45
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Jun 1, 2024
1 parent d9db26b commit 799f804
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/main/java/net/pl3x/map/core/world/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 799f804

Please sign in to comment.