diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 346f196e4..0266407c9 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1325,10 +1325,12 @@ abstract class Entity{ } } - $vector = Vector3::sum(...$vectors); - if($vector->lengthSquared() > 0){ - $d = 0.014; - $this->motion = $this->motion->addVector($vector->normalize()->multiply($d)); + if(count($vectors) > 0){ + $vector = Vector3::sum(...$vectors); + if($vector->lengthSquared() > 0){ + $d = 0.014; + $this->motion = $this->motion->addVector($vector->normalize()->multiply($d)); + } } }