Treat not existent region files as empty (not generated) chunks. Fixes #57

This commit is contained in:
Blue (Lukas Rieger) 2020-07-29 16:36:38 +02:00
parent 71c165fe53
commit 6e123e1c3f

View File

@ -253,6 +253,8 @@ private Chunk loadChunk(Vector2i chunkPos) throws IOException {
} else {
throw new IOException("invalid data tag: " + (tag == null ? "null" : tag.getClass().getName()));
}
} catch (FileNotFoundException ex) {
return Chunk.empty(this, chunkPos);
}
}