MoveToLiquidGoal 5.47.0
Extends MoveToBlockGoal
Goes back to water (vanilla behavior.move_to_water: axolotls, turtles, stranded dolphins, pregnant frogs) or lava (behavior.move_to_liquid with material_type Lava: striders) when out of it. Lava is looked for at its surface (the mob walks onto it), and the mob counts as being in it when $isInLiquid says so (default: its feet in water, its box in lava).
Constants
LAVA
php
public const LAVA = \pocketmine\entity\ai\navigation\BlockSearch::LAVAWATER
php
public const WATER = \pocketmine\entity\ai\navigation\BlockSearch::WATERProperties
$isInLiquid
php
public ?\Closure $isInLiquid$liquid
php
public int $liquidMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, int $liquid = self::WATER, float $speedMultiplier = 1.0, int $searchRange = 16, int $searchHeight = 5, float $goalRadius = 0.5, ?\Closure $condition = null, ?\Closure $isInLiquid = null)findTarget() protected
php
protected function findTarget(int $x, int $y, int $z) : ?\pocketmine\math\Vector3wantsToMove() protected
php
protected function wantsToMove() : bool