diff --git a/composer.lock b/composer.lock index 883984a57..4348bbce6 100644 --- a/composer.lock +++ b/composer.lock @@ -253,12 +253,12 @@ "source": { "type": "git", "url": "https://github.com/pmmp/BedrockProtocol.git", - "reference": "5285dde125b529e070db7eeb0d3774208e1652ef" + "reference": "58c53a259e819a076bf8fe875d2a012da7d19d65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/5285dde125b529e070db7eeb0d3774208e1652ef", - "reference": "5285dde125b529e070db7eeb0d3774208e1652ef", + "url": "https://api.github.com/repos/pmmp/BedrockProtocol/zipball/58c53a259e819a076bf8fe875d2a012da7d19d65", + "reference": "58c53a259e819a076bf8fe875d2a012da7d19d65", "shasum": "" }, "require": { @@ -293,7 +293,7 @@ "issues": "https://github.com/pmmp/BedrockProtocol/issues", "source": "https://github.com/pmmp/BedrockProtocol/tree/master" }, - "time": "2021-10-23T15:18:49+00:00" + "time": "2021-10-27T19:49:20+00:00" }, { "name": "pocketmine/binaryutils", diff --git a/src/network/mcpe/NetworkSession.php b/src/network/mcpe/NetworkSession.php index 2ca46db0e..5ff3998a2 100644 --- a/src/network/mcpe/NetworkSession.php +++ b/src/network/mcpe/NetworkSession.php @@ -727,16 +727,17 @@ class NetworkSession{ $yaw = $yaw ?? $location->getYaw(); $pitch = $pitch ?? $location->getPitch(); - $pk = new MovePlayerPacket(); - $pk->actorRuntimeId = $this->player->getId(); - $pk->position = $this->player->getOffsetPosition($pos); - $pk->pitch = $pitch; - $pk->headYaw = $yaw; - $pk->yaw = $yaw; - $pk->mode = $mode; - $pk->onGround = $this->player->onGround; - - $this->sendDataPacket($pk); + $this->sendDataPacket(MovePlayerPacket::simple( + $this->player->getId(), + $this->player->getOffsetPosition($pos), + $pitch, + $yaw, + $yaw, //TODO: head yaw + $mode, + $this->player->onGround, + 0, //TODO: riding entity ID + 0 //TODO: tick + )); if($this->handler instanceof InGamePacketHandler){ $this->handler->forceMoveSync = true;