4.3 KiB
5.2.0
Released 4th July 2023.
For Minecraft: Bedrock Edition 1.20.0
This is a minor technical update, including changes to AsyncTask error handling and support for BedrockBlockUpgradeSchema version 3.0.0.
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.
Core
- BedrockBlockUpgradeSchema version 3.0.0 is now supported.
ext-pmmpthreadversion 6.0.4 is now required (bug fixes required to support technical changes in this release).
Performance
- Improved performance of
AsyncPool->submitTask()andAsyncPool->submitTaskToWorker(). - Added new timings for
AsyncTask->onProgressUpdate()andAsyncTask->onCompletion().
Gameplay
Blocks
- Added the following new blocks:
- Cherry Button
- Cherry Door
- Cherry Fence
- Cherry Fence Gate
- Cherry Leaves
- Cherry Log
- Cherry Planks
- Cherry Pressure Plate
- Cherry Sign
- Cherry Slab
- Cherry Stairs
- Cherry Trapdoor
- Cherry Wood
- Glow Lichen
- Piglin Head
Tools
generate-block-upgrade-schema.phpnow supports generating schemas a la BedrockBlockUpgradeSchema version 3.0.0, usingnewFlattenedNameto reduce schema size.- Improved property remapping detection in
generate-block-upgrade-schema.php. It now detects related properties with more confidence (even when multiple properties were change), and no longer considers unrelated properties as mapped (e.g.mapped_typeanddeprecatedin 1.9->1.10).
API
pocketmine\data\bedrock\block
- The following new API methods have been added:
public BlockStateData->toVanillaNbt() : CompoundTag- returns the NBT for the blockstate without any PMMP extra metadata (toNbt()will normally include aPMMPDataVersiontag).
pocketmine\data\runtime
- The following new API methods have been added:
public RuntimeDataDescriber->facingFlags(list<int> $faces) : void
pocketmine\scheduler
AsyncTask->onRun()no longer tolerates uncaught exceptions.- This means that any uncaught exceptions thrown from
AsyncTask->onRun()will now crash the worker thread, and by extension, the server. - This change makes it easier to debug errors by detecting them earlier.
- This means that any uncaught exceptions thrown from
- The following API methods have been deprecated:
AsyncTask->onError()
Internals
AsyncTask->progressUpdatesis now lazily initialized when a task publishes a progress update.- This was previously not possible due to technical limitations of the
ext-pmmpthreadextension. - This change improves performance of
AsyncPool->submitTask()andAsyncPool->submitTaskToWorker(), as well as reducing the amount of work needed to check for progress updates on tick.
- This was previously not possible due to technical limitations of the
- Errors in
AsyncWorkernow cascade and crash the whole server.- This makes it easier to debug errors by detecting them earlier.
- This includes all types of unexpected errors, such as OOM, uncaught exceptions, etc.
- This change is not expected to affect normal server operation, as worker threads are not expected to crash under normal circumstances.
AsyncTask::$threadLocalStoragenow uses a plainarrayinstead ofArrayObject. TheArrayObjectwas a workaround forext-pthreadsto prevent thread-locals getting copied to the worker thread, and is no longer necessary.- Regenerated
pocketmine\data\bedrock\item\ItemTypeNamesfor Bedrock 1.20 (BC breaking, some item names have changed). - Fixed
build/generate-item-type-names.phpnot including some newer blockitems, such as doors and hanging signs.
5.2.1
Released 11th July 2023.
This release includes changes from the following releases:
- 4.22.3 - Fixes for some crash issues
This release contains no other changes.