Phantom 5.46.0
Extends FlyingMonster
Implements Undead
Bedrock values (phantom.json): 20 health, 0.9x0.5, attack 6, undead, burns in daylight, targets players within 64 blocks (scanning 80 blocks down). Circles high above and swoops at its target (see PhantomAttackGoal). Loot: 0-1 phantom membrane (+0-1 per Looting level) when killed by a player. Experience 5. Cats and ocelots within 16 blocks keep it from swooping (behavior.avoid_mob_type). Not implemented: insomnia (phantoms don't spawn naturally yet: players don't track the time since they last slept), sizes.
Constants
ATTACK_DAMAGE
php
public const ATTACK_DAMAGE = 6.0CAT_AVOID_RANGE
php
public const CAT_AVOID_RANGE = 16.0Methods
burnsInDaylight()
php
public function burnsInDaylight() : boolcanBreathe()
php
public function canBreathe() : booldestroyCycles() protected
php
protected function destroyCycles() : voidgetDrops()
php
public function getDrops() : arraygetFlightAcceleration() protected
php
protected function getFlightAcceleration() : floatgetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetPickedItem()
php
public function getPickedItem() : ?\pocketmine\item\ItemgetXpDropAmount()
php
public function getXpDropAmount() : intinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisScaredByCats()
php
public function isScaredByCats() : boolWhether a cat or an ocelot is within 16 blocks (phantoms don't swoop near them, whether they can see them or not).
isSwooping()
php
public function isSwooping() : boolonSwoop()
php
public function onSwoop() : voidCalled when the phantom starts a swoop.
registerGoals() protected
php
protected function registerGoals() : void