diff --git a/src/world/format/io/region/RegionWorldProvider.php b/src/world/format/io/region/RegionWorldProvider.php index 3ac9132f6..df28c3ffe 100644 --- a/src/world/format/io/region/RegionWorldProvider.php +++ b/src/world/format/io/region/RegionWorldProvider.php @@ -173,6 +173,9 @@ abstract class RegionWorldProvider extends BaseWorldProvider{ protected static function readFixedSizeByteArray(CompoundTag $chunk, string $tagName, int $length) : string{ $tag = $chunk->getTag($tagName); if(!($tag instanceof ByteArrayTag)){ + if($tag === null){ + throw new CorruptedChunkException("'$tagName' key is missing from chunk NBT"); + } throw new CorruptedChunkException("Expected TAG_ByteArray for '$tagName'"); } $data = $tag->getValue();