mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
fixed closestPlayerEID being not in entityList
This commit is contained in:
parent
0022bfb321
commit
236f641d6c
6 changed files with 12 additions and 6 deletions
|
|
@ -113,8 +113,8 @@ class TaskRangedAttack extends \TaskBase
|
|||
return true;
|
||||
}
|
||||
}
|
||||
//TODO fix closestPlayerEID being not in entityList
|
||||
$closestTarget = $e->closestPlayerDist <= $this->rangeSquared ? ($e->level->entityList[$e->closestPlayerEID] ?? null) : null;
|
||||
|
||||
$closestTarget = $e->closestPlayerDist <= $this->rangeSquared ? $e->level->entityList[$e->closestPlayerEID] : null;
|
||||
|
||||
if($closestTarget != null){
|
||||
$e->target = $closestTarget; //TODO dont save entity object ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue