FindCoverGoal 5.47.0
Extends Goal
Walks from under the open sky into the shade (vanilla behavior.find_cover of foxes: by day, and at once during thunderstorms; Java FoxSeekShelterGoal): picks one of 10 random spots up to 10 blocks away horizontally and 3 vertically with no sky above it, and walks there.
The goal tries at most once every $cooldown ticks (and at most once a second), and only while $condition allows it and the mob sees the sky: a sky light lookup when it is already in the shade.
Properties
$condition
php
public \Closure $condition$cooldown
php
public int $cooldown$mob
php
public \pocketmine\entity\Mob $mob$speedMultiplier
php
public float $speedMultiplierMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, \Closure $condition, float $speedMultiplier = 1.0, int $cooldown = 100)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