Dylan K. Taylor c17587d436
World: use new Vector3() instead of Block->getPosition()
When profiling this, I noticed that we spend a stupidly large amount of time creating useless Position objects in the case of update=true, because Vector3->sides() calls Position->getSide(), which calls Position::fromObject(parent::getSide()). This is stupid because the update logic doesn't require Positions anywhere (as evidenced by this change needing no other alterations.

A rough profile shows that this improves setBlock() performance by about 25% in the update=true case, which is a pretty big margin.
As an added bonus, it gets rid of some unrealized cyclic dependencies in World->changedBlocks.
2021-11-02 03:00:00 +00:00
2021-10-29 19:04:01 +01:00
2021-11-01 21:08:32 +00:00
2021-11-01 21:18:35 +00:00
2017-06-25 14:15:34 +01:00
2021-09-07 14:04:52 +01:00
2021-10-29 19:04:01 +01:00
2021-11-02 01:37:56 +00:00
2012-12-07 02:24:55 +01:00
2021-11-01 18:13:24 +00:00


A highly customisable, open source server software for Minecraft: Bedrock Edition written in PHP

CI GitHub tag (latest semver) Docker image version (latest semver) Discord

Getting started

Discussion/Help

For developers

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.

Languages
PHP 99.9%