RandomSwimGoal 5.47.0
Extends RandomStrollGoal
Swims to a random spot in the water (vanilla behavior.random_swim). With interval 0 (fish) the mob starts a new swim as soon as the previous one ends, so it never stops; when no spot is found (a small pond, out of the water) it waits RandomSwimGoal::RETRY_TICKS ticks before trying again instead of searching on every evaluation.
Constants
RETRY_TICKS
php
public const RETRY_TICKS = 10Methods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier = 1.0, int $interval = 0, int $horizontalRange = 16, int $verticalRange = 4)canStart()
php
public function canStart() : bool