|
| 1 | +# 5.14.0 |
| 2 | +Released 5th April 2024. |
| 3 | + |
| 4 | +**For Minecraft: Bedrock Edition 1.20.70** |
| 5 | + |
| 6 | +This is a minor feature release, including performance improvements, minor gameplay features, new API features, and various internal improvements. |
| 7 | + |
| 8 | +**Plugin compatibility:** Plugins for previous 5.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` or `pocketmine\data` namespace. |
| 9 | +Do not update plugin minimum API versions unless you need new features added in this release. |
| 10 | + |
| 11 | +**WARNING: If your plugin uses the `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.** |
| 12 | +Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly. |
| 13 | + |
| 14 | +## General |
| 15 | +- Added support for a `--no-log-file` command-line option, which disables the creation of a `server.log` file. |
| 16 | + - **Use this with caution.** If you don't have another mechanism for collecting logs (e.g. Docker), this may make debugging harder. |
| 17 | +- Added support for automatic `server.log` rotation. When the `server.log` exceeds 32 MB, it will be renamed and moved to the `log_archive` folder in the server's data directory. |
| 18 | + - Files in the `log_archive` folder can be safely modified or deleted without stopping the server. |
| 19 | + - We suggest a cron job or similar to manage old log files (e.g. deleting or compressing them). |
| 20 | +- Added a new cache mechanism for `PocketMine-MP.phar`. This has several advantages: |
| 21 | + - Caches are now reused by all threads - this significantly reduces `/tmp` usage (previously every thread generated its own cache, wasting lots of space) |
| 22 | + - Dead cache files are automatically cleaned up by new servers - this means that a server crash loop won't flood `/tmp` anymore |
| 23 | +- `/status` now reports a more accurate number of threads on Windows. |
| 24 | +- Large resource packs are now able to be properly downloaded from the server. |
| 25 | +- Larger player skin sizes are now accepted by the server. |
| 26 | +- Improved logging from world providers to reduce spam when chunks contain invalid data. |
| 27 | +- Added more error logging for Anvil, PMAnvil and MCRegion worlds. |
| 28 | +- PHP deprecation warnings no longer cause the server to crash. This should make it easier for server owners to update to newer PHP versions. |
| 29 | + |
| 30 | +## Performance |
| 31 | +- Improved world loading performance. This was achieved through a combination of changes: |
| 32 | + - Improvements to `BlockStateUpgrader` to avoid unnecessary work |
| 33 | + - Improvements to `BlockStateUpgradeSchema` to clean up stupid code |
| 34 | + - Improvements to `BlockStateReader` unused state handling |
| 35 | + - Optimizations to `RegistryTrait` (see below) |
| 36 | +- Improved performance of `RegistryTrait::__callStatic()` accessor by introducing a fast-path optimization. Ensure that you access registries with the correct function name case to benefit from this. |
| 37 | + - This improves the performance of `VanillaBlocks::WHATEVER()`, `VanillaItems`, etc. |
| 38 | + |
| 39 | +## Tools |
| 40 | +- `tools/generate-blockstate-upgrade-schema.php` now supports generating schemas using `flattenedValueRemaps` (described in [BlockStateUpgradeSchema](https://github.com/pmmp/BedrockBlockUpgradeSchema/releases/tag/4.0.0)). |
| 41 | + |
| 42 | +## Gameplay |
| 43 | +- Added sounds for armour equipping and unequipping. |
| 44 | +- Added sound for picking berries from a sweet berry bush. |
| 45 | + |
| 46 | +## API |
| 47 | +### `pocketmine\block\utils` |
| 48 | +- The following enum cases have been added: |
| 49 | + - `BannerPatternType::GLOBE` |
| 50 | + - `BannerPatternType::PIGLIN` |
| 51 | + |
| 52 | +### `pocketmine\event\player` |
| 53 | +- The following classes have been added: |
| 54 | + - `PlayerResourcePackOfferEvent` - called before the server tells a connecting client which resource packs are available to download - allows customizing the pack list and other options |
| 55 | + |
| 56 | +### `pocketmine\item` |
| 57 | +- The following API methods have been added: |
| 58 | + - `public ArmorMaterial->getEquipSound() : ?\pocketmine\world\Sound` - returns the sound to play when this armour is equipped or unequipped |
| 59 | +- The following API methods have signature changes: |
| 60 | + - `ArmorMaterial->__construct()` now accepts an optional `?Sound $equipSound` parameter |
| 61 | + |
| 62 | +### `pocketmine\utils` |
| 63 | +- The following API methods have signature changes: |
| 64 | + - `MainLogger->__construct()` now accepts `null` for the `$logFile` parameter - this disables the creation of a logger thread and log file |
| 65 | + - `MainLogger->__construct()` now accepts an optional `?string $logArchiveDir` parameter. If set, this enables log archiving in the specified directory when the current log file exceeds 32 MB. |
| 66 | + |
| 67 | +## Dependencies |
| 68 | +- Now uses [`pocketmine/bedrock-block-upgrade-schema` version 4.0.0](https://github.com/pmmp/BedrockBlockUpgradeSchema/releases/tag/4.0.0). |
| 69 | +- Now uses [`pmmp/ext-pmmpthread` version 6.1.0](https://github.com/pmmp/ext-pmmpthread/releases/tag/6.1.0). |
| 70 | +- Now uses [`pocketmine/errorhandler` version 0.7.0](https://github.com/pmmp/ErrorHandler/releases/tag/0.7.0). |
| 71 | +- Now uses [`pocketmine/raklib` version 1.1.0](https://github.com/pmmp/RakLib/releases/tag/1.1.0). |
| 72 | +- Now uses [`pocketmine/raklib-ipc` version 1.0.0](https://github.com/pmmp/RakLibIpc/releases/tag/1.0.0). |
| 73 | + |
| 74 | +## Internals |
| 75 | +- (Re)Added support for RakLib packet ACK receipts. This was used to throttle resource pack sending and prevent network overloading. |
| 76 | + - Added `NetworkSession->sendDataPacketWithReceipt()` to make use of this feature. |
| 77 | + - `PacketSender` now requires an additional `?int $receiptId` parameter. |
| 78 | +- `ResourcePackPacketHandler` now uses `sendDataPacketWithReceipt()` to send resource packs, and delays sending the next chunk until the current one is acknowledged. |
| 79 | +- `ResourcePackPacketHandler` now accepts resource pack info directly in the constructor, instead of `ResourcePackManager`. This eases the implementation of `PlayerResourcePackOfferEvent`. |
| 80 | +- Increased `ZlibCompressor::DEFAULT_MAX_DECOMPRESSION_SIZE` to 8 MB (previously 2 MB). While this weakens server security, it appears to be necessary to deal with extremely bloated Persona skins. |
| 81 | +- Increased max split packet parts accepted by `RakLib` to 512 (previously 128). Again, this is necessary to deal with extremely bloated Persona skins. |
| 82 | +- Added a new cache mechanism for `PocketMine-MP.phar`. |
| 83 | + - `ext-phar`'s default mechanism is extremely wasteful (generating a separate cache file per thread), and doesn't clean up after itself. |
| 84 | + - The new cache mechanism is shared between all threads, and automatically cleans up stale caches. |
| 85 | + - The phar stub (`build/server-phar-stub.php`) now converts the phar contents into a `.tar`, and decompresses all the files into `$TMPDIR/PocketMine-MP-phar-cache.<random>/`. |
| 86 | + - `phar://` URIs still work with this system, but `new Phar(__FILE__)` must be replaced by `new PharData(__FILE__)` within PocketMine-MP core code. |
| 87 | + - Backtraces from a `phar`'d server will now point to a location in the extracted phar cache, rather than the phar itself. |
| 88 | +- `block_factory_consistency_check` test (actually for `RuntimeBlockStateRegistry`) now stores less data, and is no longer affected by changes to internal state ID construction. |
| 89 | + |
| 90 | +# 5.14.1 |
| 91 | +Released 5th April 2024. |
| 92 | + |
| 93 | +## Fixes |
| 94 | +- Fixed incorrect `pmmpthread` version check in server bootstrap. |
0 commit comments