FreeMeleeAttackGoal 5.46.0
Extends Goal
Flies or swims straight at the attack target and hits it when their bounding boxes (grown by $reach) touch (vanilla charge_attack of vexes, aquatic charges, drowned swimming at their target).
Properties
$attackInterval
php
public int $attackInterval$condition
php
public ?\Closure $condition$control
php
public \pocketmine\entity\ai\hostile\FreeMoveControl $control$damage
php
public float $damage$followRange
php
public float $followRange$mob
php
public \pocketmine\entity\Mob $mob$onHit
php
public ?\Closure $onHit$reach
php
public float $reach$speed
php
public float $speedMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, \pocketmine\entity\ai\hostile\FreeMoveControl $control, float $speed, float $damage, float $reach = 0.2, int $attackInterval = 20, float $followRange = 32.0, ?\Closure $condition = null, ?\Closure $onHit = null)canStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intstop()
php
public function stop() : voidtick()
php
public function tick() : void