mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
recalculateHeightMapColumn is stateless, so it can't make any assumptions about which subchunks to check for blocks. However, in most the average case (6 allocated subchunks), this causes 2500+ useless SubChunk->getHighestBlockAt() calls (10 per column). Since we're calculating in bulk, we can figure out which subchunks are empty one time and ignore them for all 256 columns. In the average case, this produced a 50-60% performance improvement for heightmap calculation (~1.1 ms -> 0.5 ms). In extreme cases where the height is extremely varied, this produces no observable performance benefit, but for most cases with flattish terrain, it's an improvement. It can likely be further improved, but further performance improvements are outside the scope of this commit and will likely result in more complexity increases.
A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP
Getting started
Discussion/Help
For developers
- Building and running from source
- Latest API documentation - Doxygen documentation generated from development
- DevTools - Development tools plugin for creating plugins
- ExamplePlugin - Example plugin demonstrating some basic API features
- Contributing Guidelines
Donate
- Bitcoin Cash (BCH):
qq3r46hn6ljnhnqnfwxt5pg3g447eq9jhvw5ddfear
- Bitcoin (BTC):
171u8K9e4FtU6j3e5sqNoxKUgEw9qWQdRV
- Stellar Lumens (XLM):
GAAC5WZ33HCTE3BFJFZJXONMEIBNHFLBXM2HJVAZHXXPYA3HP5XPPS7T
- Patreon
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.
Description
Languages
PHP
99.9%