SwimmingMoveControl 5.46.0
Extends MoveControl
Move control of swimming mobs (fish, dolphins, axolotls, turtles...): in water the mob moves straight towards the wanted position in three dimensions at its underwater speed (Bedrock "underwater_movement", blocks per tick at multiplier 1) without sinking; out of water it walks like any other mob (amphibious mobs), or flops (fish, handled by the mob).
Methods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, float $swimSpeed)getSwimSpeed()
php
public function getSwimSpeed() : floatgetVelocityY()
php
public function getVelocityY() : floatisThreeDimensional()
php
public function isThreeDimensional() : boolsetSwimSpeed()
php
public function setSwimSpeed(float $swimSpeed) : voidstop()
php
public function stop() : voidtick()
php
public function tick() : void