Skip to content

RaidMoveGoal 5.46.0 ​

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

Extends Goal

A raider with nothing to attack walks to the centre of the raided village (vanilla behavior.move_to_village), in steps of RaidMoveGoal::STEP blocks so that each path search stays short.

Constants ​

ARRIVED_DISTANCE ​

php
public const ARRIVED_DISTANCE = 10.0

Distance from the centre at which raiders stop heading there and roam the village.

STEP ​

php
public const STEP = 12

Properties ​

$mob ​

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

$speedMultiplier ​

php
public float $speedMultiplier

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob&\pocketmine\entity\monster\Raider $mob, float $speedMultiplier = 1.0)

canContinue() ​

php
public function canContinue() : bool

canStart() ​

php
public function canStart() : bool

getFlags() ​

php
public function getFlags() : int

start() ​

php
public function start() : void

stepTowards() ​

php
public static function stepTowards(\pocketmine\entity\Mob $mob, \pocketmine\math\Vector3 $target, int $step) : ?\pocketmine\math\Vector3

Returns a block where the mob can stand at most $step blocks from it in the direction of $target (or the target itself when closer), or null if there is none.

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.