mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Introduce dedicated NBT data exceptions, fix up some corrupted chunk handling
This commit is contained in:
@ -31,6 +31,7 @@ use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\nbt\LittleEndianNbtSerializer;
|
||||
use pocketmine\nbt\NbtDataException;
|
||||
use pocketmine\network\BadPacketException;
|
||||
use pocketmine\network\mcpe\protocol\types\CommandOriginData;
|
||||
use pocketmine\network\mcpe\protocol\types\EntityLink;
|
||||
@ -105,7 +106,7 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
}
|
||||
try{
|
||||
$compound = self::$itemNbtSerializer->read($this->get($nbtLen));
|
||||
}catch(\UnexpectedValueException $e){
|
||||
}catch(NbtDataException $e){
|
||||
throw new BadPacketException($e->getMessage(), 0, $e);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user