CrossbowAttackGoal 5.46.0
Extends Goal
Crossbow users (pillagers, piglins): load the crossbow (25 ticks, vanilla charge_held_item), wait 1-2 seconds, then shoot; walk to the target while it's out of range or out of sight and back off when it's too close.
Constants
CHARGE_TICKS
php
public const CHARGE_TICKS = 25Properties
$attackRange
php
public float $attackRange$minRange
php
public float $minRange$mob
php
public \pocketmine\entity\Mob $mob$onChargingChange
php
public \Closure $onChargingChange$shoot
php
public \Closure $shoot$speedMultiplier
php
public float $speedMultiplierMethods
__construct()
php
public function __construct(\pocketmine\entity\Mob $mob, float $speedMultiplier, float $attackRange, float $minRange, \Closure $onChargingChange, \Closure $shoot)canStart()
php
public function canStart() : boolgetFlags()
php
public function getFlags() : intisCharged()
php
public function isCharged() : boolstop()
php
public function stop() : voidtick()
php
public function tick() : void