Skip to content

GuardianAttackGoal 5.46.0 ​

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

Extends Goal

The guardian's laser (vanilla behavior.guardian_attack, Java GuardianAttackGoal): the guardian stops, locks its beam on the target (TARGET_EID metadata, which makes the client draw the beam) and, if it keeps seeing it, hits it when the beam is fully charged: Guardian::getAttackDuration() ticks after a 10 tick warm-up (80 ticks for guardians, 60 for elder guardians).

Constants ​

WARMUP_TICKS ​

php
public const WARMUP_TICKS = 10

Properties ​

$guardian ​

php
public \pocketmine\entity\monster\Guardian $guardian

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\monster\Guardian $guardian)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getAttackTime() ​

php
public function getAttackTime() : int

Ticks since the beam locked on, minus the warm-up (negative while warming up).

getFlags() ​

php
public function getFlags() : int

start() ​

php
public function start() : void

stop() ​

php
public function stop() : 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.