FollowOwnerGoal 5.46.0
Extends Goal
Follows the owner (or another leader given by the callback) when it gets farther than $startDistance, stopping at $stopDistance, and teleports next to it beyond $teleportDistance (vanilla behavior.follow_owner and teleport_to_owner; also used by allays following the player who gave them an item).
Properties
$flying
php
public bool $flying$mob
php
public \pocketmine\entity\Mob $mob$ownerGetter
php
public \Closure $ownerGetter$speedMultiplier
php
public float $speedMultiplier$startDistance
php
public float $startDistance$stopDistance
php
public float $stopDistance$teleportDistance
php
public float $teleportDistanceMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, \Closure $ownerGetter, float $speedMultiplier = 1.0, float $startDistance = 10.0, float $stopDistance = 2.0, float $teleportDistance = 12.0, bool $flying = false)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() : voidtick()
php
public function tick() : void