FleeSunGoal 5.47.0
Extends Goal
A mob burning in the sun runs for the shade (vanilla behavior.flee_sun of skeletons, strays, bogged, parched and drowned; Java FleeSunGoal): by day, when it is on fire under the open sky with nothing on its head, it picks one of 10 random spots up to 10 blocks away horizontally and 3 vertically that is out of the sun, and walks there.
Only burning mobs look for a spot (a few flag checks otherwise), and a mob which found none waits a second before looking again.
Methods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier = 1.0)canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intisDay()
php
public static function isDay(\pocketmine\world\World $world) : boolWhether it is day in the world for the undead (vanilla isBrightOutside(): the overworld, sky light reduced by less than 4).
seesSky()
php
public static function seesSky(\pocketmine\world\World $world, int $x, int $y, int $z) : boolWhether the block is under the open sky (full sky light, the light the sun burns the undead in).
start()
php
public function start() : voidstop()
php
public function stop() : void