Skip to content

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

createMoveControl() protected ​

php
protected function createMoveControl() : \pocketmine\entity\ai\control\MoveControl

createNavigation() protected ​

php
protected function createNavigation() : \pocketmine\entity\ai\navigation\PathNavigator

findWanderPos() ​

php
public function findWanderPos(int $horizontal, int $vertical, ?\pocketmine\math\Vector3 $awayFrom = null) : ?\pocketmine\math\Vector3

getFlyingSpeed() protected ​

php
abstract protected function getFlyingSpeed() : float

Flying speed in blocks per tick at speed multiplier 1 (Bedrock "flying_speed").

initFlying() protected ​

php
protected function initFlying() : void

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