BegGoal 5.47.0
Extends Goal
A wolf looks at the nearest player within 8 blocks holding a bone or meat (main hand or off hand) with its head tilted (vanilla behavior.beg: look_distance 8, look_time 20-40 ticks; the INTERESTED flag, see Wolf::setInterested()), as long as the player keeps holding it.
Looking for a player is one pass over the world's players on goal evaluations (see \pocketmine\entity\ai\sensing\Sensing::getNearestPlayer()), most of them skipped by their distance.
Constants
LOOK_DISTANCE
php
public const LOOK_DISTANCE = 8.0MAX_LOOK_TICKS
php
public const MAX_LOOK_TICKS = 40MIN_LOOK_TICKS
php
public const MIN_LOOK_TICKS = 20Properties
$range
php
public float $range$wolf
php
public \pocketmine\entity\animal\Wolf $wolfMethods
__construct()
php
public function __construct(\pocketmine\entity\animal\Wolf $wolf, float $range = self::LOOK_DISTANCE)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