Skip to content

ClimbingPathNavigator 5.47.0 ​

class · pocketmine\entity\ai\navigation\ClimbingPathNavigator · source

Extends PathNavigator

Navigation of mobs that climb walls (vanilla Bedrock navigation.climb, Java WallClimberNavigation): when there is no path to the destination, or the path ends short of it (the target is on top of a wall, out of reach of a walking path), the mob walks straight at the destination and climbs whatever is in the way.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $climber, int $maxDrop = 3, bool $canSwim = true, bool $avoidWater = false, ?\pocketmine\entity\ai\navigation\NavigationOptions $options = null)

getClimbDestination() ​

php
public function getClimbDestination() : ?array

Returns the block the mob climbs straight to once its path is done, if any.

isWaypointReachedAtHeight() protected ​

php
protected function isWaypointReachedAtHeight(float $dy) : bool

A waypoint below the climber counts as reached too: a spider that climbed the wall next to it, or that stands on top of that wall right above it (its wide box resting on the edge), can't get any closer to it, and steering at a point straight below only turned it around on the spot. Walking mobs keep the vanilla rule: at the top of a drop they would take the waypoint at the bottom as reached before dropping down.

moveTo() ​

php
public function moveTo(float $x, float $y, float $z, float $speedMultiplier, float $acceptDistance = 0.0) : bool

moveToEntity() ​

php
public function moveToEntity(\pocketmine\entity\Entity $entity, float $speedMultiplier, float $acceptDistance = 1.0) : bool

stop() ​

php
public function stop() : void

tick() ​

php
public function tick() : void

VanillaMine is a fork of PocketMine-MP. Not affiliated with the PMMP team or Mojang.