RandomBreachGoal 5.47.0
Extends Goal
Leaps out of the water (Bedrock behavior.random_breach, dolphins): about once every $interval ticks, when the mob swims just below the surface with open water and air above it for $xzDistance blocks ahead (Java DolphinJumpGoal), it jumps forward with its jump power (Bedrock jump.static) and dives back in. It can't breach again for $cooldownTicks after that. The surface check only runs when the interval roll succeeds.
Constants
FORWARD_SPEED
php
public const FORWARD_SPEED = 0.6Forward push of the leap (Java DolphinJumpGoal).
Properties
$cooldownTicks
php
public int $cooldownTicks$interval
php
public int $interval$jumpPower
php
public float $jumpPower$mob
php
public \pocketmine\entity\Mob $mob$xzDistance
php
public int $xzDistanceMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, int $interval = 50, int $xzDistance = 6, int $cooldownTicks = 40, float $jumpPower = 0.6)canBreachHere()
php
public function canBreachHere() : boolWhether the mob is in water just below the surface, with water at its level and two blocks of air above it for $xzDistance blocks in the direction it faces.
canContinue()
php
public function canContinue() : boolcanStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intisBreaching()
php
public function isBreaching() : boolReturns whether the mob is leaping right now.
isInterruptible()
php
public function isInterruptible() : boolstart()
php
public function start() : voidstop()
php
public function stop() : voidtick()
php
public function tick() : void