FreeAvoidEntityGoal 5.47.0
Extends Goal
Swims (or flies) away from a dangerous entity that comes closer than $distance (vanilla behavior.avoid_mob_type of a free moving mob: guardians keeping away from players within 8 blocks while they are guardian_passive). Picks a point of the mob's medium (water) 4 to 8 blocks away, roughly opposite the danger, and moves to it in a straight line.
Properties
$control
php
public \pocketmine\entity\ai\hostile\FreeMoveControl $control$distance
php
public float $distance$finder
php
public \Closure $finder$mob
php
public \pocketmine\entity\Mob $mob$speed
php
public float $speedMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, \pocketmine\entity\ai\hostile\FreeMoveControl $control, \Closure $finder, float $distance, float $speed)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