HopControl 5.46.0
Movement of mobs that only move by hopping (slimes, magma cubes, sulfur cubes; vanilla movement.jump and the slime_* behaviours): they face a direction and, every jump delay, leap forward. They don't move on the ground between hops.
Methods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, array $calmDelay, array $aggressiveDelay)computeMotion()
php
public function computeMotion(\pocketmine\math\Vector3 $motion, float $hopSpeed, float $jumpVelocity, bool $inWater) : \pocketmine\math\Vector3Returns the motion of the mob for this tick (gravity and drag included).
getDirection()
php
public function getDirection() : floathasLanded()
php
public function hasLanded() : boolWhether the mob touched the ground at the end of a hop during the last movement update.
isAggressive()
php
public function isAggressive() : boolsetDirection()
php
public function setDirection(float $yaw, bool $aggressive) : voidsetWantsToMove()
php
public function setWantsToMove(bool $wantsToMove) : void