Skip to content

Latest commit

 

History

History
99 lines (80 loc) · 5.6 KB

5.4.md

File metadata and controls

99 lines (80 loc) · 5.6 KB

5.4.0

Released 1st August 2023.

For Minecraft: Bedrock Edition 1.20.10

This is a minor feature update, including a handful of new gameplay features, new plugin APIs and improvements to error reporting.

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

  • Improved error reporting for async task and thread crashes.
  • Players may now have different creative inventories.

Gameplay

General

  • Added support for 1.5-block height sneaking.
  • Fixed missing player arm swing and sounds when punching the air.

Blocks

  • Implemented the following new blocks:
    • Big Dripleaf Head
    • Big Dripleaf Stem
    • Small Dripleaf
  • Acacia saplings now grow into acacia trees.
  • Fixed melon and pumpkin stems not attaching to the correct block when growing.
  • Various blocks now drop more items when mined with a compatible tool enchanted with Fortune.

Items

  • Implemented Strong Slowness potion.
  • Implemented Fortune enchantment.

API

pocketmine\block

  • The following new classes have been added:
    • utils\FortuneDropHelper - utility methods for calculating the drop counts for Fortune-affected blocks
  • The following new API methods have been added:
    • protected Block->getAdjacentSupportType(int $facing) : utils\SupportType - returns the type of support provided by the block in the given direction on the adjacent face

pocketmine\entity

  • The following new API constants have been added:
    • Living::DEFAULT_KNOCKBACK_FORCE
    • Living::DEFAULT_KNOCKBACK_VERTICAL_LIMIT

pocketmine\entity\animation

  • ConsumingItemAnimation now accepts Living instances instead of just Human.

pocketmine\event

  • The following new classes have been added:
    • PlayerMissSwingEvent - called when the player attempts the attack action (left click on desktop) without any target
      • This is possible thanks to the introduction of new flags in PlayerAuthInputPacket in Bedrock 1.20.10
  • The following new API methods have been added:
    • public EntityDamageByEntityEvent->getVerticalKnockBackLimit() : float
    • public EntityDamageByEntityEvent->setVerticalKnockBackLimit(float $verticalKnockBackLimit) : void - sets the max vertical velocity that can result from the victim being knocked back

pocketmine\player

  • The following new API methods have been added:
    • public Player->getCreativeInventory() : pocketmine\inventory\CreativeInventory
    • public Player->setCreativeInventory(pocketmine\inventory\CreativeInventory $inventory) : void
    • public Player->missSwing() : void - performs actions associated with the attack action when there is no target (see PlayerMissSwingEvent)

pocketmine\scheduler

  • Cancellation functionality has been removed from AsyncTask, as it didn't make any sense and wasn't used by anything for what it was intended for.
    • It broke sequential task execution - later tasks might depend on state from earlier tasks
    • It didn't actually cancel the task anyway - at best, it prevented it from running, but couldn't interrupt it (though interrupting a task does not make sense either)
  • The following API methods have been deprecated, and their functionality has been removed:
    • AsyncTask->hasCancelledRun()
    • AsyncTask->cancelRun()

Internals

  • Uncaught exceptions and fatal errors in AsyncTask, threads extending pocketmine\thread\Thread, and pocketmine\thread\Worker are now recorded in crashdumps, making it significantly easier to debug errors in these areas.
  • JWT signature DER <-> raw conversions are now handled in-house using code in JwtUtils
    • Due to the simplicity of the conversion and only requiring a tiny subset of the ASN.1 spec, it didn't make much sense to introduce another dependency.
    • fgrosse/phpasn1 is no longer required. This package was abandoned by its author and only used by PocketMine-MP for this one purpose.
  • Various usages of Closure::fromCallable() have been replaced by PHP 8.1 first-class callable syntax.
  • Blocks requiring support shifted to a "can be supported at" model, rather than "can be supported by".
    • This model reduces repeated logic when placing and performing nearby block updates (no need to hardcode facing everywhere).
    • In addition, this change facilitates the use of the newly introduced Block->getAdjacentSupportType() API method, reducing boilerplate support-type checking code.
  • Bell block code has been simplified and cleaned up.
  • TallGrass and DoubleTallGrass now use a shared TallGrassTrait to reduce code duplication.

5.4.1

Released 8th August 2023.

General

Fixes

  • Fixed Podzol not dropping itself when mined with Silk Touch.
  • Fixed World->getSafeSpawn() not accepting positions below y=0 (world height limit change).
  • Fixed pocketmine\thread\Thread and pocketmine\thread\Worker instances not logging any information when they crash.
  • Fixed CraftItemEvent not cloning returned items.

Internals

  • Foreach by-reference is now disallowed via a custom PHPStan rule.