This PR significantly improves performance of entity movement calculation. Previous attempts to optimise this were ineffective, as they used a cache to mitigate the cost of recomputing AABBs. Entities tend to move around randomly, so the non-cached pathway really needed to be optimized. This change improves performance on multiple fronts: 1) avoiding Block allocations for blocks with 1x1x1 AABBs and with no AABBs (the most common) 2) avoiding Block allocations and overlapping intersection checks unless a stateID is specifically known to potentially exceed its cell boundaries (like fences) 3) avoiding overlapping AABB checks when overlaps can't make any difference anyway (cubes) Together, these changes improve the performance of World->getBlockCollisionBoxes() by a factor of 5. In real-world terms, this shows up as a major performance improvement in situations with lots of entities moving in random directions. Testing with item entities showed an increase from 400 to 1200 moving items with the same CPU usage. This change is built on the assumption that `Block->recalculateCollisionBoxes()` and its overrides don't interact with any world. This is technically possible due to the crappy design of the `Block` architecture, but should be avoided. As a world is not available during `RuntimeBlockStateRegistry` initialization, attempting to interact with a world during `recalculateCollisionBoxes()` will now cause a crash. This turned out to be a problem for `ChorusPlant`, which was fixed by 70fb9bbdfd06c7eda00b4cd2c2c3840755e6b8f6. The correct solution in this case was to use dynamic states similar to how we currently deal with fence connections.
A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP
What is this?
PocketMine-MP is a highly customisable server software for Minecraft: Bedrock Edition, built from scratch in PHP, with over 10 years of history.
If you're looking to create a Minecraft: Bedrock server with custom functionality, look no further.
- 🧩 Powerful plugin API - extend and customise gameplay as you see fit
- 🗺️ Rich ecosystem and large developer community - find plugins easily and learn to develop your own
- 🌐 Multi-world support - offer a more varied game experience to players without transferring them to other server nodes
- 🏎️ Performance - get 100+ players onto one server (depending on hardware and plugins)
- ⤴️ Continuously updated - new Minecraft versions are usually supported within days
❌ PocketMine-MP is NOT a vanilla Minecraft server software.
It is poorly suited to hosting vanilla survival servers. It doesn't have many features from the vanilla game, such as vanilla world generation, redstone, mob AI, and various other things.
If you just want to play vanilla survival multiplayer, consider using the official Minecraft: Bedrock server software instead of PocketMine-MP.
If that's not an option for you, you may be able to add some of PocketMine-MP's missing features using plugins from Poggit, or write plugins to implement them yourself.
Getting Started
Community & Support
Join our Discord server to chat with other users and developers.
You can also post questions on StackOverflow under the tag pocketmine
.
Developing Plugins
If you want to write your own plugins, the following resources may be useful. Don't forget you can always ask our community if you need help.
- Developer documentation - General documentation for PocketMine-MP plugin developers
- Latest release API documentation - Doxygen API documentation generated for each release
- Latest bleeding-edge API documentation - Doxygen API documentation generated weekly from
major-next
branch - DevTools - Development tools plugin for creating plugins
- ExamplePlugin - Example plugin demonstrating some basic API features
Contributing to PocketMine-MP
PocketMine-MP accepts community contributions! The following resources will be useful if you want to contribute to PocketMine-MP.
Donate
PocketMine-MP is free, but it requires a lot of time and effort from unpaid volunteers to develop. Donations enable us to keep delivering support for new versions and adding features your players love.
You can support development using the following methods:
- Patreon
- Bitcoin (BTC):
171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
- Stellar Lumens (XLM):
GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
Thanks for your support!
Licensing information
This project is licensed under LGPL-3.0. Please see the LICENSE file for details.
pmmp/PocketMine are not affiliated with Mojang. All brands and trademarks belong to their respective owners. PocketMine-MP is not a Mojang-approved software, nor is it associated with Mojang.