mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +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");
|
throw new \InvalidStateException("Cannot create entities in unloaded chunks");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->motion = new Vector3(0, 0, 0);
|
||||||
if($this->namedtag->hasTag("Motion", ListTag::class)){
|
if($this->namedtag->hasTag("Motion", ListTag::class)){
|
||||||
/** @var float[] $motion */
|
/** @var float[] $motion */
|
||||||
$motion = $this->namedtag->getListTag("Motion")->getAllValues();
|
$motion = $this->namedtag->getListTag("Motion")->getAllValues();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user