mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
NetworkBinaryStream: bail on unknown entity data types
This commit is contained in:
parent
5552704922
commit
86c27953ec
@ -160,7 +160,7 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
$value = $this->getVector3();
|
||||
break;
|
||||
default:
|
||||
$value = [];
|
||||
throw new \UnexpectedValueException("Invalid data type " . $type);
|
||||
}
|
||||
if($types){
|
||||
$data[$key] = [$type, $value];
|
||||
@ -214,6 +214,9 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
break;
|
||||
case Entity::DATA_TYPE_VECTOR3F:
|
||||
$this->putVector3Nullable($d[1]);
|
||||
break;
|
||||
default:
|
||||
throw new \UnexpectedValueException("Invalid data type " . $d[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user