mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-30 07:09:56 +00:00
World: fix bug in getNearestEntity()
fuck you PhpStorm
This commit is contained in:
parent
7e5193355e
commit
aa60aa69ee
@ -1889,7 +1889,7 @@ class World implements ChunkManager{
|
||||
if(!($entity instanceof $entityType) or $entity->isFlaggedForDespawn() or (!$includeDead and !$entity->isAlive())){
|
||||
continue;
|
||||
}
|
||||
$distSq = $entity->distanceSquared($pos);
|
||||
$distSq = $entity->getPosition()->distanceSquared($pos);
|
||||
if($distSq < $currentTargetDistSq){
|
||||
$currentTargetDistSq = $distSq;
|
||||
$currentTarget = $entity;
|
||||
|
Loading…
x
Reference in New Issue
Block a user