AvoidEntityGoal 5.46.0
Extends Goal
Runs away from nearby entities accepted by the filter (vanilla behavior.avoid_mob_type: fish from players, rabbits from wolves, villagers from zombies...): walks at $walkSpeed, and sprints at $sprintSpeed when the threat is within 7 blocks. Spectators and creative players are ignored.
Properties
$filter
php
public \Closure $filter$maxDistance
php
public float $maxDistance$mob
php
public \pocketmine\entity\Mob $mob$sprintSpeed
php
public float $sprintSpeed$walkSpeed
php
public float $walkSpeedMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, \Closure $filter, float $maxDistance, float $walkSpeed = 1.0, float $sprintSpeed = 1.0)canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intstop()
php
public function stop() : voidtick()
php
public function tick() : void