Raider 5.46.0
A mob that takes part in raids and patrols (illagers, witches and ravagers; vanilla family "raider"). The state is kept by RaiderTrait.
Methods
canBePatrolLeader()
public function canBePatrolLeader() : boolWhether it may be a captain (illagers, not witches or ravagers).
getPatrolTarget()
public function getPatrolTarget() : ?\pocketmine\math\Vector3getRaidCenter()
public function getRaidCenter() : ?\pocketmine\math\Vector3Centre of the village of its raid, which it walks to when it has nothing to attack.
getRaidId()
public function getRaidId() : ?intID of the raid it takes part in (unique in its world), or null.
getRaidWave()
public function getRaidWave() : intWave of its raid it was spawned with (or joined).
isCelebrating()
public function isCelebrating() : boolisPatrolLeader()
public function isPatrolLeader() : boolWhether it is the captain of a patrol: it wears the ominous banner and drops it (and an ominous bottle) when killed.
isPatrolling()
public function isPatrolling() : boolWhether it belongs to a patrol: it walks with the group towards the captain's patrol target.
isRaidVictim()
public function isRaidVictim(\pocketmine\entity\Living $entity) : boolWhether it attacks this mob while raiding or patrolling (villagers, wandering traders, iron golems...).
joinRaid()
public function joinRaid(int $raidId, int $wave, \pocketmine\math\Vector3 $center) : voidleaveRaid()
public function leaveRaid() : voidsetCelebrating()
public function setCelebrating(bool $celebrating) : voidRaiders celebrate (hands up, jumping, celebration sounds) when they win a raid.
setPatrolLeader()
public function setPatrolLeader(bool $leader) : voidsetPatrolTarget()
public function setPatrolTarget(?\pocketmine\math\Vector3 $target) : voidsetPatrolling()
public function setPatrolling(bool $patrolling) : void