Skip to content

PatrolGoal 5.46.0 ​

class · pocketmine\entity\ai\raid\PatrolGoal · source

Extends Goal

Patrol movement (vanilla pillager.json): the captain walks to a random block up to 512 blocks away at 0.55x speed (behavior.move_to_random_block), picking a new one when it gets within 8 blocks; the other members follow the nearest captain within 64 blocks, staying about 5 blocks from it at 0.8x speed (behavior.follow_target_captain). Long walks are split in steps of RaidMoveGoal::STEP blocks.

Constants ​

FOLLOWER_SPEED ​

php
public const FOLLOWER_SPEED = 0.8

FOLLOW_DISTANCE ​

php
public const FOLLOW_DISTANCE = 5.0

FOLLOW_RANGE ​

php
public const FOLLOW_RANGE = 64.0

LEADER_SPEED ​

php
public const LEADER_SPEED = 0.55

TARGET_RANGE ​

php
public const TARGET_RANGE = 512

Properties ​

$mob ​

php
public \pocketmine\entity\Mob&\pocketmine\entity\monster\Raider $mob

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob&\pocketmine\entity\monster\Raider $mob)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

start() ​

php
public function start() : void

stop() ​

php
public function stop() : void

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