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()
public function __construct(\pocketmine\entity\Mob $climber, int $maxDrop = 3, bool $canSwim = true, bool $avoidWater = false, ?\pocketmine\entity\ai\navigation\NavigationOptions $options = null)getClimbDestination()
public function getClimbDestination() : ?arrayReturns the block the mob climbs straight to once its path is done, if any.
isWaypointReachedAtHeight() protected
protected function isWaypointReachedAtHeight(float $dy) : boolA 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()
public function moveTo(float $x, float $y, float $z, float $speedMultiplier, float $acceptDistance = 0.0) : boolmoveToEntity()
public function moveToEntity(\pocketmine\entity\Entity $entity, float $speedMultiplier, float $acceptDistance = 1.0) : boolstop()
public function stop() : voidtick()
public function tick() : void