Skip to content

Path 5.46.0 ​

final class · pocketmine\entity\ai\navigation\Path · source

A list of block positions (the block the mob's feet should be in) from the start to the end of a path.

Methods ​

__construct() ​

php
public function __construct(array $nodes, bool $reachesTarget, int $targetX, int $targetY, int $targetZ)

advance() ​

php
public function advance() : void

getCurrent() ​

php
public function getCurrent() : ?array

getEnd() ​

php
public function getEnd() : ?array

getIndex() ​

php
public function getIndex() : int

getLength() ​

php
public function getLength() : int

getNode() ​

php
public function getNode(int $index) : ?array

getNodes() ​

php
public function getNodes() : array

getTargetX() ​

php
public function getTargetX() : int

getTargetY() ​

php
public function getTargetY() : int

getTargetZ() ​

php
public function getTargetZ() : int

isDone() ​

php
public function isDone() : bool

reachesTarget() ​

php
public function reachesTarget() : bool

Whether the last node is the target (false: the path only gets as close as the search could).

setIndex() ​

php
public function setIndex(int $index) : void

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