Skip to content

SwimmingMoveControl 5.46.0 ​

class · pocketmine\entity\ai\control\SwimmingMoveControl · source

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() : float

getVelocityY() ​

php
public function getVelocityY() : float

isThreeDimensional() ​

php
public function isThreeDimensional() : bool

setSwimSpeed() ​

php
public function setSwimSpeed(float $swimSpeed) : void

stop() ​

php
public function stop() : void

tick() ​

php
public function tick() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.