Skip to content

Phantom 5.46.0 ​

class · pocketmine\entity\monster\Phantom · source

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.0

CAT_AVOID_RANGE ​

php
public const CAT_AVOID_RANGE = 16.0

Methods ​

burnsInDaylight() ​

php
public function burnsInDaylight() : bool

canBreathe() ​

php
public function canBreathe() : bool

destroyCycles() protected ​

php
protected function destroyCycles() : void

getDrops() ​

php
public function getDrops() : array

getFlightAcceleration() protected ​

php
protected function getFlightAcceleration() : float

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getPickedItem() ​

php
public function getPickedItem() : ?\pocketmine\item\Item

getXpDropAmount() ​

php
public function getXpDropAmount() : int

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

isScaredByCats() ​

php
public function isScaredByCats() : bool

Whether 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() : bool

onSwoop() ​

php
public function onSwoop() : void

Called when the phantom starts a swoop.

registerGoals() protected ​

php
protected function registerGoals() : void

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