mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Entity: fixed motion not being initialized when Motion
NBT tag is missing
fixes CA 2355485
This commit is contained in:
parent
d850a84d0d
commit
d7a35a5302
@ -593,6 +593,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
throw new \InvalidStateException("Cannot create entities in unloaded chunks");
|
||||
}
|
||||
|
||||
$this->motion = new Vector3(0, 0, 0);
|
||||
if($this->namedtag->hasTag("Motion", ListTag::class)){
|
||||
/** @var float[] $motion */
|
||||
$motion = $this->namedtag->getListTag("Motion")->getAllValues();
|
||||
|
Loading…
x
Reference in New Issue
Block a user