McRegion: skip chunks with TerrainGenerated=false

legacy PM used to save even ungenerated chunks, and omitted some tags when doing so which we expect to always be present.
This commit is contained in:
Dylan K. Taylor
2021-11-23 01:49:48 +00:00
parent fb0eebc0dc
commit d8f0fd0a7e
3 changed files with 12 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ trait LegacyAnvilChunkTrait{
/**
* @throws CorruptedChunkException
*/
protected function deserializeChunk(string $data) : ChunkData{
protected function deserializeChunk(string $data) : ?ChunkData{
$decompressed = @zlib_decode($data);
if($decompressed === false){
throw new CorruptedChunkException("Failed to decompress chunk NBT");