NearestAttackableTargetGoal 5.46.0
Extends Goal
Targets the nearest survival/adventure player in range (vanilla behavior.nearest_attackable_target). Looking for a target only happens on average once every $interval ticks (vanilla random interval: 10), and the target is dropped after it has been out of sight for a while (when $mustSee).
Properties
$condition
php
public ?\Closure $condition$interval
php
public int $interval$mob
php
public \pocketmine\entity\Mob $mob$mustSee
php
public bool $mustSee$range
php
public float $rangeMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, float $range = 16.0, bool $mustSee = true, int $interval = 10, ?\Closure $condition = null)canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intstart()
php
public function start() : voidstop()
php
public function stop() : void