diff --git a/changelogs/4.5.md b/changelogs/4.5.md index 45887354b..83ace5b98 100644 --- a/changelogs/4.5.md +++ b/changelogs/4.5.md @@ -19,3 +19,10 @@ Released 8th June 2022. ## Fixes - Fixed commands defined in `pocketmine.yml` `aliases` not passing the correct arguments. - Updated BedrockProtocol to fix command argument types displayed on client-side command suggestions. + +# 4.5.2 +Released 29th June 2022. + +## Fixes +- Fixed terrain getting redrawn when flying in spectator mode (or when using `Player->setHasBlockCollision(false)`). +- Fixed skulls with the `noDrops` flag set being treated as unknown blocks. diff --git a/composer.lock b/composer.lock index 8acdc56f6..50a4050fd 100644 --- a/composer.lock +++ b/composer.lock @@ -1902,21 +1902,21 @@ }, { "name": "phpstan/phpstan-strict-rules", - "version": "1.2.3", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "0c82c96f2a55d8b91bbc7ee6512c94f68a206b43" + "reference": "543675a9be82d4befb9ca0bd8cdc9d211665037f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/0c82c96f2a55d8b91bbc7ee6512c94f68a206b43", - "reference": "0c82c96f2a55d8b91bbc7ee6512c94f68a206b43", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/543675a9be82d4befb9ca0bd8cdc9d211665037f", + "reference": "543675a9be82d4befb9ca0bd8cdc9d211665037f", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.6.3" + "phpstan/phpstan": "^1.7.15" }, "require-dev": { "nikic/php-parser": "^4.13.0", @@ -1944,9 +1944,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.2.3" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/1.3.0" }, - "time": "2022-05-04T15:20:40+00:00" + "time": "2022-06-24T06:47:20+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/src/world/particle/ItemBreakParticle.php b/src/world/particle/ItemBreakParticle.php index 5d9f86abd..bc0e2d757 100644 --- a/src/world/particle/ItemBreakParticle.php +++ b/src/world/particle/ItemBreakParticle.php @@ -25,6 +25,7 @@ namespace pocketmine\world\particle; use pocketmine\item\Item; use pocketmine\math\Vector3; +use pocketmine\network\mcpe\convert\ItemTranslator; use pocketmine\network\mcpe\protocol\LevelEventPacket; use pocketmine\network\mcpe\protocol\types\ParticleIds; @@ -32,6 +33,7 @@ class ItemBreakParticle implements Particle{ public function __construct(private Item $item){} public function encode(Vector3 $pos) : array{ - return [LevelEventPacket::standardParticle(ParticleIds::ITEM_BREAK, ($this->item->getId() << 16) | $this->item->getMeta(), $pos)]; + [$id, $meta] = ItemTranslator::getInstance()->toNetworkId($this->item->getId(), $this->item->getMeta()); + return [LevelEventPacket::standardParticle(ParticleIds::ITEM_BREAK, ($id << 16) | $meta, $pos)]; } }