Skip to content

PhantomAttackGoal 5.46.0 ​

class · pocketmine\entity\ai\hostile\goal\PhantomAttackGoal · source

Extends Goal

Phantom flight (vanilla behavior.circle_around_anchor and behavior.swoop_attack, Java Phantom attack strategy): phantoms circle around an anchor point (20-40 blocks above their target, or above where they spawned) and every 8-11 seconds swoop down at the target, bite it once and climb back. A cat or ocelot within 16 blocks of the phantom (behavior.avoid_mob_type) stops it from swooping: checked when a swoop would start and every second of a swoop.

Constants ​

CIRCLE_SPEED ​

php
public const CIRCLE_SPEED = 0.35

SWOOP_SPEED ​

php
public const SWOOP_SPEED = 0.6

Properties ​

$phantom ​

php
public \pocketmine\entity\monster\Phantom $phantom

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\monster\Phantom $phantom)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

isSwooping() ​

php
public function isSwooping() : bool

start() ​

php
public function start() : void

tick() ​

php
public function tick() : void

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