update pocketmine/math, adapt to add() changes

This commit is contained in:
Dylan K. Taylor
2020-05-19 12:26:18 +01:00
parent f0fefecf40
commit 148228e360
8 changed files with 13 additions and 13 deletions

View File

@ -190,7 +190,7 @@ class ExperienceOrb extends Entity{
$this->setTargetPlayer($currentTarget);
if($currentTarget !== null){
$vector = $currentTarget->getPosition()->add(0, $currentTarget->getEyeHeight() / 2, 0)->subtract($this->location)->divide(self::MAX_TARGET_DISTANCE);
$vector = $currentTarget->getPosition()->add(0, $currentTarget->getEyeHeight() / 2, 0)->subtractVector($this->location)->divide(self::MAX_TARGET_DISTANCE);
$distance = $vector->lengthSquared();
if($distance < 1){