FleeBlockGoal 5.46.0
Extends Goal
Walks away from a block the mob is afraid of (vanilla behavior.avoid_block: hoglins avoiding warped fungus, portals and respawn anchors, piglins avoiding soul fire). The finder looks for the block and should cache its result, since it is asked every goal evaluation.
Properties
$finder
php
public \Closure $finder$mob
php
public \pocketmine\entity\Mob $mob$onFlee
php
public ?\Closure $onFlee$speedMultiplier
php
public float $speedMultiplierMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, \Closure $finder, float $speedMultiplier, ?\Closure $onFlee = null)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