FlyingMobTrait 5.46.0
trait · pocketmine\entity\ai\FlyingMobTrait · source
Flying mob (bat, bee, parrot, allay, happy ghast): flying move control, straight line navigation, wandering targets in the air, and no gravity or fall damage. Mobs using it must be \pocketmine\entity\Mobs and call FlyingMobTrait::initFlying() from initEntity().
Methods
calculateFallDamage() protected
php
protected function calculateFallDamage(float $fallDistance) : floatcreateMoveControl() protected
php
protected function createMoveControl() : \pocketmine\entity\ai\control\MoveControlcreateNavigation() protected
php
protected function createNavigation() : \pocketmine\entity\ai\navigation\PathNavigatorfindWanderPos()
php
public function findWanderPos(int $horizontal, int $vertical, ?\pocketmine\math\Vector3 $awayFrom = null) : ?\pocketmine\math\Vector3getFlyingSpeed() protected
php
abstract protected function getFlyingSpeed() : floatFlying speed in blocks per tick at speed multiplier 1 (Bedrock "flying_speed").
initFlying() protected
php
protected function initFlying() : void