Skip to content

Latest commit

 

History

History
94 lines (78 loc) · 6.91 KB

5.14.md

File metadata and controls

94 lines (78 loc) · 6.91 KB

5.14.0

Released 5th April 2024.

For Minecraft: Bedrock Edition 1.20.70

This is a minor feature release, including performance improvements, minor gameplay features, new API features, and various internal improvements.

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. Do not update plugin minimum API versions unless you need new features added in this release.

WARNING: If your plugin uses the pocketmine\network\mcpe namespace, you're not shielded by API change constraints. Consider using the mcpe-protocol directive in plugin.yml as a constraint if you're using packets directly.

General

  • Added support for a --no-log-file command-line option, which disables the creation of a server.log file.
    • Use this with caution. If you don't have another mechanism for collecting logs (e.g. Docker), this may make debugging harder.
  • 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.
    • Files in the log_archive folder can be safely modified or deleted without stopping the server.
    • We suggest a cron job or similar to manage old log files (e.g. deleting or compressing them).
  • Added a new cache mechanism for PocketMine-MP.phar. This has several advantages:
    • Caches are now reused by all threads - this significantly reduces /tmp usage (previously every thread generated its own cache, wasting lots of space)
    • Dead cache files are automatically cleaned up by new servers - this means that a server crash loop won't flood /tmp anymore
  • /status now reports a more accurate number of threads on Windows.
  • Large resource packs are now able to be properly downloaded from the server.
  • Larger player skin sizes are now accepted by the server.
  • Improved logging from world providers to reduce spam when chunks contain invalid data.
  • Added more error logging for Anvil, PMAnvil and MCRegion worlds.
  • PHP deprecation warnings no longer cause the server to crash. This should make it easier for server owners to update to newer PHP versions.

Performance

  • Improved world loading performance. This was achieved through a combination of changes:
    • Improvements to BlockStateUpgrader to avoid unnecessary work
    • Improvements to BlockStateUpgradeSchema to clean up stupid code
    • Improvements to BlockStateReader unused state handling
    • Optimizations to RegistryTrait (see below)
  • 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.
    • This improves the performance of VanillaBlocks::WHATEVER(), VanillaItems, etc.

Tools

  • tools/generate-blockstate-upgrade-schema.php now supports generating schemas using flattenedValueRemaps (described in BlockStateUpgradeSchema).

Gameplay

  • Added sounds for armour equipping and unequipping.
  • Added sound for picking berries from a sweet berry bush.

API

pocketmine\block\utils

  • The following enum cases have been added:
    • BannerPatternType::GLOBE
    • BannerPatternType::PIGLIN

pocketmine\event\player

  • The following classes have been added:
    • PlayerResourcePackOfferEvent - called before the server tells a connecting client which resource packs are available to download - allows customizing the pack list and other options

pocketmine\item

  • The following API methods have been added:
    • public ArmorMaterial->getEquipSound() : ?\pocketmine\world\Sound - returns the sound to play when this armour is equipped or unequipped
  • The following API methods have signature changes:
    • ArmorMaterial->__construct() now accepts an optional ?Sound $equipSound parameter

pocketmine\utils

  • The following API methods have signature changes:
    • MainLogger->__construct() now accepts null for the $logFile parameter - this disables the creation of a logger thread and log file
    • 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.

Dependencies

Internals

  • (Re)Added support for RakLib packet ACK receipts. This was used to throttle resource pack sending and prevent network overloading.
    • Added NetworkSession->sendDataPacketWithReceipt() to make use of this feature.
    • PacketSender now requires an additional ?int $receiptId parameter.
  • ResourcePackPacketHandler now uses sendDataPacketWithReceipt() to send resource packs, and delays sending the next chunk until the current one is acknowledged.
  • ResourcePackPacketHandler now accepts resource pack info directly in the constructor, instead of ResourcePackManager. This eases the implementation of PlayerResourcePackOfferEvent.
  • 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.
  • Increased max split packet parts accepted by RakLib to 512 (previously 128). Again, this is necessary to deal with extremely bloated Persona skins.
  • Added a new cache mechanism for PocketMine-MP.phar.
    • ext-phar's default mechanism is extremely wasteful (generating a separate cache file per thread), and doesn't clean up after itself.
    • The new cache mechanism is shared between all threads, and automatically cleans up stale caches.
    • 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>/.
    • phar:// URIs still work with this system, but new Phar(__FILE__) must be replaced by new PharData(__FILE__) within PocketMine-MP core code.
    • Backtraces from a phar'd server will now point to a location in the extracted phar cache, rather than the phar itself.
  • block_factory_consistency_check test (actually for RuntimeBlockStateRegistry) now stores less data, and is no longer affected by changes to internal state ID construction.

5.14.1

Released 5th April 2024.

Fixes

  • Fixed incorrect pmmpthread version check in server bootstrap.