diff --git a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php index 64084152c..fb32c4f0c 100644 --- a/src/pocketmine/network/mcpe/protocol/StartGamePacket.php +++ b/src/pocketmine/network/mcpe/protocol/StartGamePacket.php @@ -211,7 +211,11 @@ class StartGamePacket extends DataPacket{ $this->enchantmentSeed = $this->getVarInt(); - $this->blockTable = (new NetworkLittleEndianNBTStream())->read($this->buffer, false, $this->offset, 512); + $blockTable = (new NetworkLittleEndianNBTStream())->read($this->buffer, false, $this->offset, 512); + if(!($blockTable instanceof ListTag)){ + throw new \UnexpectedValueException("Wrong block table root NBT tag type"); + } + $this->blockTable = $blockTable; $this->itemTable = []; for($i = 0, $count = $this->getUnsignedVarInt(); $i < $count; ++$i){