diff --git a/composer.json b/composer.json index b8127fc1a..397c2cc71 100644 --- a/composer.json +++ b/composer.json @@ -34,8 +34,8 @@ "adhocore/json-comment": "^1.1", "fgrosse/phpasn1": "^2.3", "netresearch/jsonmapper": "^4.0", - "pocketmine/bedrock-data": "~1.11.0+bedrock-1.19.30", - "pocketmine/bedrock-protocol": "~13.0.0+bedrock-1.19.30", + "pocketmine/bedrock-data": "~1.12.0+bedrock-1.19.40", + "pocketmine/bedrock-protocol": "~14.0.0+bedrock-1.19.40", "pocketmine/binaryutils": "^0.2.1", "pocketmine/callback-validator": "^1.0.2", "pocketmine/classloader": "^0.2.0", diff --git a/composer.lock b/composer.lock index 91ea1023b..e9f66ddd1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "99192d8900b36c33ceaa78025ab98ad3", + "content-hash": "ed062ef1dc3113ad2a75ba4d4d5e174f", "packages": [ { "name": "adhocore/json-comment", @@ -249,16 +249,16 @@ }, { "name": "pocketmine/bedrock-data", - "version": "1.11.1+bedrock-1.19.30", + "version": "1.12.0+bedrock-1.19.40", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockData.git", - "reference": "9ec9a9645ba19f04dd4e39d6d9bd30b562dfe90c" + "reference": "32690f1dac05608b558fe7c40b6d634772c8e416" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/9ec9a9645ba19f04dd4e39d6d9bd30b562dfe90c", - "reference": "9ec9a9645ba19f04dd4e39d6d9bd30b562dfe90c", + "url": "https://api.github.com/repos/pmmp/BedrockData/zipball/32690f1dac05608b558fe7c40b6d634772c8e416", + "reference": "32690f1dac05608b558fe7c40b6d634772c8e416", "shasum": "" }, "type": "library", @@ -269,22 +269,22 @@ "description": "Blobs of data generated from Minecraft: Bedrock Edition, used by PocketMine-MP", "support": { "issues": "https://github.com/pmmp/BedrockData/issues", - "source": "https://github.com/pmmp/BedrockData/tree/1.11.1+bedrock-1.19.30" + "source": "https://github.com/pmmp/BedrockData/tree/bedrock-1.19.40" }, - "time": "2022-09-27T22:00:01+00:00" + "time": "2022-10-25T21:45:24+00:00" }, { "name": "pocketmine/bedrock-protocol", - "version": "13.0.0+bedrock-1.19.30", + "version": "14.0.0+bedrock-1.19.40", "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "94de2221676ca717587e1ff4e45445c24ada1749" + "reference": "b455a742779fee94d25f931cc2cbf6b2c5d61c1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/94de2221676ca717587e1ff4e45445c24ada1749", - "reference": "94de2221676ca717587e1ff4e45445c24ada1749", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/b455a742779fee94d25f931cc2cbf6b2c5d61c1f", + "reference": "b455a742779fee94d25f931cc2cbf6b2c5d61c1f", "shasum": "" }, "require": { @@ -298,7 +298,7 @@ "ramsey/uuid": "^4.1" }, "require-dev": { - "phpstan/phpstan": "1.8.0", + "phpstan/phpstan": "1.8.8", "phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-strict-rules": "^1.0.0", "phpunit/phpunit": "^9.5" @@ -316,9 +316,9 @@ "description": "An implementation of the Minecraft: Bedrock Edition protocol in PHP", "support": { "issues": "https://github.com/pmmp/BedrockProtocol/issues", - "source": "https://github.com/pmmp/BedrockProtocol/tree/bedrock-1.19.30" + "source": "https://github.com/pmmp/BedrockProtocol/tree/bedrock-1.19.40" }, - "time": "2022-09-20T18:35:00+00:00" + "time": "2022-10-25T21:51:46+00:00" }, { "name": "pocketmine/binaryutils", diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 54873f9f1..be44a0433 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -52,6 +52,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataFlags; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; use pocketmine\network\mcpe\protocol\types\entity\MetadataProperty; +use pocketmine\network\mcpe\protocol\types\entity\PropertySyncData; use pocketmine\player\Player; use pocketmine\Server; use pocketmine\timings\Timings; @@ -1469,6 +1470,7 @@ abstract class Entity{ return new NetworkAttribute($attr->getId(), $attr->getMinValue(), $attr->getMaxValue(), $attr->getValue(), $attr->getDefaultValue(), []); }, $this->attributeMap->getAll()), $this->getAllNetworkData(), + new PropertySyncData([], []), [] //TODO: entity links )); } diff --git a/src/entity/Human.php b/src/entity/Human.php index ae323f0f8..095d3ea86 100644 --- a/src/entity/Human.php +++ b/src/entity/Human.php @@ -54,6 +54,7 @@ use pocketmine\network\mcpe\protocol\types\command\CommandPermissions; use pocketmine\network\mcpe\protocol\types\DeviceOS; use pocketmine\network\mcpe\protocol\types\entity\EntityIds; use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; +use pocketmine\network\mcpe\protocol\types\entity\PropertySyncData; use pocketmine\network\mcpe\protocol\types\entity\StringMetadataProperty; use pocketmine\network\mcpe\protocol\types\GameMode; use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper; @@ -485,6 +486,7 @@ class Human extends Living implements ProjectileSource, InventoryHolder{ ItemStackWrapper::legacy(TypeConverter::getInstance()->coreItemStackToNet($this->getInventory()->getItemInHand())), GameMode::SURVIVAL, $this->getAllNetworkData(), + new PropertySyncData([], []), UpdateAbilitiesPacket::create(CommandPermissions::NORMAL, PlayerPermissions::VISITOR, $this->getId() /* TODO: this should be unique ID */, [ new UpdateAbilitiesPacketLayer( UpdateAbilitiesPacketLayer::LAYER_BASE, diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index 5b090cc35..dd8668637 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -97,6 +97,7 @@ use pocketmine\network\mcpe\protocol\types\command\CommandPermissions; use pocketmine\network\mcpe\protocol\types\DimensionIds; use pocketmine\network\mcpe\protocol\types\entity\Attribute as NetworkAttribute; use pocketmine\network\mcpe\protocol\types\entity\MetadataProperty; +use pocketmine\network\mcpe\protocol\types\entity\PropertySyncData; use pocketmine\network\mcpe\protocol\types\inventory\ContainerIds; use pocketmine\network\mcpe\protocol\types\inventory\ItemStackWrapper; use pocketmine\network\mcpe\protocol\types\PlayerListEntry; @@ -869,7 +870,7 @@ class NetworkSession{ //TODO: HACK! as of 1.18.10, the client responds differently to the same data ordered in different orders - for //example, sending HEIGHT in the list before FLAGS when unsetting the SWIMMING flag results in a hitbox glitch ksort($properties, SORT_NUMERIC); - $this->sendDataPacket(SetActorDataPacket::create($entity->getId(), $properties, 0)); + $this->sendDataPacket(SetActorDataPacket::create($entity->getId(), $properties, new PropertySyncData([], []), 0)); } public function onEntityEffectAdded(Living $entity, EffectInstance $effect, bool $replacesOldEffect) : void{ diff --git a/src/world/particle/FloatingTextParticle.php b/src/world/particle/FloatingTextParticle.php index 313e40d48..8797a7d5c 100644 --- a/src/world/particle/FloatingTextParticle.php +++ b/src/world/particle/FloatingTextParticle.php @@ -36,6 +36,7 @@ use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; use pocketmine\network\mcpe\protocol\types\entity\FloatMetadataProperty; use pocketmine\network\mcpe\protocol\types\entity\IntMetadataProperty; use pocketmine\network\mcpe\protocol\types\entity\LongMetadataProperty; +use pocketmine\network\mcpe\protocol\types\entity\PropertySyncData; use pocketmine\network\mcpe\protocol\types\entity\StringMetadataProperty; class FloatingTextParticle implements Particle{ @@ -115,6 +116,7 @@ class FloatingTextParticle implements Particle{ 0, [], $actorMetadata, + new PropertySyncData([], []), [] ); }