Skip to content

Raider 5.46.0 ​

interface · pocketmine\entity\monster\Raider · source

A mob that takes part in raids and patrols (illagers, witches and ravagers; vanilla family "raider"). The state is kept by RaiderTrait.

Methods ​

canBePatrolLeader() ​

php
public function canBePatrolLeader() : bool

Whether it may be a captain (illagers, not witches or ravagers).

getPatrolTarget() ​

php
public function getPatrolTarget() : ?\pocketmine\math\Vector3

getRaidCenter() ​

php
public function getRaidCenter() : ?\pocketmine\math\Vector3

Centre of the village of its raid, which it walks to when it has nothing to attack.

getRaidId() ​

php
public function getRaidId() : ?int

ID of the raid it takes part in (unique in its world), or null.

getRaidWave() ​

php
public function getRaidWave() : int

Wave of its raid it was spawned with (or joined).

isCelebrating() ​

php
public function isCelebrating() : bool

isPatrolLeader() ​

php
public function isPatrolLeader() : bool

Whether it is the captain of a patrol: it wears the ominous banner and drops it (and an ominous bottle) when killed.

isPatrolling() ​

php
public function isPatrolling() : bool

Whether it belongs to a patrol: it walks with the group towards the captain's patrol target.

isRaidVictim() ​

php
public function isRaidVictim(\pocketmine\entity\Living $entity) : bool

Whether it attacks this mob while raiding or patrolling (villagers, wandering traders, iron golems...).

joinRaid() ​

php
public function joinRaid(int $raidId, int $wave, \pocketmine\math\Vector3 $center) : void

leaveRaid() ​

php
public function leaveRaid() : void

setCelebrating() ​

php
public function setCelebrating(bool $celebrating) : void

Raiders celebrate (hands up, jumping, celebration sounds) when they win a raid.

setPatrolLeader() ​

php
public function setPatrolLeader(bool $leader) : void

setPatrolTarget() ​

php
public function setPatrolTarget(?\pocketmine\math\Vector3 $target) : void

setPatrolling() ​

php
public function setPatrolling(bool $patrolling) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.