PHPackages                             matze/pathfinder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. matze/pathfinder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

matze/pathfinder
================

PocketMine-MP Pathfinder

4443413[1 issues](https://github.com/Matze997/Pathfinder/issues)PHP

Since Mar 17Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Matze997/Pathfinder)[ Packagist](https://packagist.org/packages/matze/pathfinder)[ RSS](/packages/matze-pathfinder/feed)WikiDiscussions V3-PM5 Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

A WIP [PocketMine](https://github.com/pmmp/PocketMine-MP) Pathfinder
====================================================================

[](#a-wip-pocketmine-pathfinder)

VIRION IS CURRENTLY IN ALPHA PHASE!
===================================

[](#virion-is-currently-in-alpha-phase)

TO-DO:
------

[](#to-do)

- More default rules (Help is appreciated!)

Features:
---------

[](#features)

- Async Pathfinding
- Sync Pathfinding
- Path smoothing
- Easy to use API

### About asynchron pathfinding:

[](#about-asynchron-pathfinding)

Async pathfinding is always the method I recommend due to it´s huge performance benefit. But you have to consider that pathfinding on another thread can lead to wrong paths due to block updates during pathfinding. Additionally, async pathfinding takes a bit longer then running the pathfinder on the main thread (Depends on the distance and chunks required to compute the path). But on the other hand the main thread doesn´t even recognize any path computation. You also consider adding a queue if many paths have to be calculated, otherwise stuff like chunk loading &amp; packet compression will take longer.

Code examples:
--------------

[](#code-examples)

#### Finding a path between two points:

[](#finding-a-path-between-two-points)

```
// Set some settings
$settings = \matze\pathfinder\setting\Settings::get()
    ->setPathSmoothing(false)
    ->setMaxTravelDistanceDown(2)
    ->setMaxTravelDistanceUp(1);

// Initialize pathfinder
$pathfinder = new \matze\pathfinder\Pathfinder([
    // Rules will be executed from PRIORITY_HIGHEST to PRIORITY_LOWEST
    new \matze\pathfinder\rule\default\EntitySizeRule(new \pocketmine\entity\EntitySizeInfo(2, 1), \matze\pathfinder\rule\Rule::PRIORITY_NORMAL),//Define rules and set priorities
], $settings);

// Find path synchron
$result = $pathfinder->findPath($from, $to, $world, $timeout);
if($result === null) {
    //Path not found
} else {
    //Path found
}

// Find path asynchron
$pathfinder->findPathAsync($from, $to, $world, function(?\matze\pathfinder\result\PathResult $result): void {
    if($result === null) {
        //Path not found
    } else {
        //Path found
    }
}, $timeout);
```

#### You´re always welcome to contribute!

[](#youre-always-welcome-to-contribute)

Contact me:
-----------

[](#contact-me)

Discord: matze998

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 77.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/02a1fc23d2e6b155f11932d51fd0a6b39804ab1e460ab9c85eeae42c179dd7ca?d=identicon)[Matze997](/maintainers/Matze997)

---

Top Contributors

[![Matze997](https://avatars.githubusercontent.com/u/47496465?v=4)](https://github.com/Matze997 "Matze997 (75 commits)")[![xxAROX](https://avatars.githubusercontent.com/u/57589973?v=4)](https://github.com/xxAROX "xxAROX (14 commits)")[![JavierLeon9966](https://avatars.githubusercontent.com/u/58715544?v=4)](https://github.com/JavierLeon9966 "JavierLeon9966 (3 commits)")[![SandhyR](https://avatars.githubusercontent.com/u/78520020?v=4)](https://github.com/SandhyR "SandhyR (2 commits)")[![IvanCraft623](https://avatars.githubusercontent.com/u/57236932?v=4)](https://github.com/IvanCraft623 "IvanCraft623 (1 commits)")[![inxomnyaa](https://avatars.githubusercontent.com/u/8733998?v=4)](https://github.com/inxomnyaa "inxomnyaa (1 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (1 commits)")

### Embed Badge

![Health badge](/badges/matze-pathfinder/health.svg)

```
[![Health](https://phpackages.com/badges/matze-pathfinder/health.svg)](https://phpackages.com/packages/matze-pathfinder)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
