PocketMine-MT
A multi-threaded fork of PocketMine-MP for Minecraft: Bedrock Edition
PocketMine-MT (Multi-Threaded) is a fork of PocketMine-MP that enables parallel world ticking — each world runs on its own CPU core, and each world can further shard its own tick work across multiple RegionThreads. On a 12-core server, 12 worlds × N regions = dozens of CPU cores doing real parallel game work at 20 TPS.
- Parallel world ticking (Phase B) — each world runs in its own thread at 20 TPS independently. Enable with
world-threads.enabled: trueinpocketmine.yml. - Intra-world region sharding (Phase C) — each
WorldThreadspawns up to NRegionThreads (one per 16×16 chunk region with players) that run real tick work in parallel: chunk deserialization, random-tick candidate selection, and block/sky light propagation move off theWorldThreadentirely for region-owned chunks. - Async chunk I/O — chunk loading and saving happen in background worker threads. Autosaves no longer cause lag spikes.
- Async events — plugin event handlers can return Promises for non-blocking processing.
- 100% backward compatible — all existing PocketMine-MP plugins work without modification (with threading disabled).
Main thread (network + plugins) WorldThread per world (gameplay)
├─ RakLib network ├─ Own game singletons (copies)
├─ Plugin events ├─ Own WorldProvider (own files)
├─ Packet sending ├─ Entity physics, AI, doTickThreaded
├─ Player connections ├─ Apply region random-tick batches
└─ WorldThreadSyncProcessor ├─ Install region LightArrays
├─ Block changes → players └─ Drain changedBlocks once/tick
└─ Entity moves → players ├─ Forward to main thread
└─ Mirror to RegionThreads
RegionThread per 16×16 region
├─ Own singletons (per-thread copies)
├─ liveChunks (deserialized locally)
├─ Pick random-tick candidates
├─ Block + Sky LightUpdate execute
└─ Ship LightArrays back to WorldThread
# pocketmine.yml
world-threads:
enabled: true # Phase B: thread-per-world
region-threads-per-world: 4 # Phase C: up to N RegionThreads per WorldThreadSet region-threads-per-world: 0 to disable intra-world sharding and keep a
single thread per world. Keep world-threads.enabled: false to run the
stock single-threaded loop.
- MIGRATION.md — Complete migration guide: architecture, configuration, plugin changes, API reference, FAQ
- CHANGELOG.md — All changes from upstream PocketMine-MP
- BUILDING.md — Building from source
- PocketMine-MP docs — Base documentation (still applies)
See MIGRATION.md for the full compatibility matrix.
git remote add upstream https://github.com/pmmp/PocketMine-MP.git
git fetch upstream && git merge upstream/stableLGPL-3.0, same as upstream. See LICENSE.
