DelayedMeleeAttackGoal 5.47.0
Extends MeleeAttackGoal
Melee attack with a wind-up (vanilla behavior.delayed_attack, the ravager's): when the target is in reach the attack starts, the hit lands $hitDelay ticks later if the target is still in reach, and the attack ends after $attackDuration ticks. A new attack starts at most every $attackInterval ticks.
Clients animate the attack from its start to its end (the DELAYED_ATTACKING flag, query.is_delayed_attacking), so the mob shows it through the $onAttackingChange callback.
Methods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier, float $damage, float $followRange, int $attackDuration, int $hitDelay, int $attackInterval, ?\Closure $onAttackingChange = null, ?float $reachMultiplier = null)isAttacking()
php
public function isAttacking() : boolperformAttack() protected
php
protected function performAttack(\pocketmine\entity\Living $target) : voidstop()
php
public function stop() : voidtick()
php
public function tick() : void