NearestAttackableEntityGoal 5.46.0
Extends Goal
Targets the nearest living entity in range accepted by the filter (vanilla behavior.nearest_attackable_target with entity filters: wolves hunting sheep, iron golems attacking monsters...). Players are only accepted when they can be targeted (survival or adventure). Looking for a target happens on average once every $interval ticks.
Properties
$condition
php
public ?\Closure $condition$filter
php
public \Closure $filter$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, \Closure $filter, 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