6.9 KiB
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-filecommand-line option, which disables the creation of aserver.logfile.- 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.logrotation. When theserver.logexceeds 32 MB, it will be renamed and moved to thelog_archivefolder in the server's data directory.- Files in the
log_archivefolder 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).
- Files in the
- Added a new cache mechanism for
PocketMine-MP.phar. This has several advantages:- Caches are now reused by all threads - this significantly reduces
/tmpusage (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
/tmpanymore
- Caches are now reused by all threads - this significantly reduces
/statusnow 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
BlockStateUpgraderto avoid unnecessary work - Improvements to
BlockStateUpgradeSchemato clean up stupid code - Improvements to
BlockStateReaderunused state handling - Optimizations to
RegistryTrait(see below)
- Improvements to
- 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.
- This improves the performance of
Tools
tools/generate-blockstate-upgrade-schema.phpnow supports generating schemas usingflattenedValueRemaps(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::GLOBEBannerPatternType::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 $equipSoundparameter
pocketmine\utils
- The following API methods have signature changes:
MainLogger->__construct()now acceptsnullfor the$logFileparameter - this disables the creation of a logger thread and log fileMainLogger->__construct()now accepts an optional?string $logArchiveDirparameter. If set, this enables log archiving in the specified directory when the current log file exceeds 32 MB.
Dependencies
- Now uses
pocketmine/bedrock-block-upgrade-schemaversion 4.0.0. - Now uses
pmmp/ext-pmmpthreadversion 6.1.0. - Now uses
pocketmine/errorhandlerversion 0.7.0. - Now uses
pocketmine/raklibversion 1.1.0. - Now uses
pocketmine/raklib-ipcversion 1.0.0.
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. PacketSendernow requires an additional?int $receiptIdparameter.
- Added
ResourcePackPacketHandlernow usessendDataPacketWithReceipt()to send resource packs, and delays sending the next chunk until the current one is acknowledged.ResourcePackPacketHandlernow accepts resource pack info directly in the constructor, instead ofResourcePackManager. This eases the implementation ofPlayerResourcePackOfferEvent.- Increased
ZlibCompressor::DEFAULT_MAX_DECOMPRESSION_SIZEto 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
RakLibto 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, butnew Phar(__FILE__)must be replaced bynew 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_checktest (actually forRuntimeBlockStateRegistry) 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
pmmpthreadversion check in server bootstrap.