mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
RegionWorldProvider: Show a more specific message on missing required ByteArrayTags
This commit is contained in:
parent
020cd7b966
commit
fb0eebc0dc
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user