56 int $ridingActorRuntimeId,
62 $result->actorRuntimeId = $actorRuntimeId;
63 $result->position = $position;
64 $result->pitch = $pitch;
66 $result->headYaw = $headYaw;
67 $result->mode = $mode;
68 $result->onGround = $onGround;
69 $result->ridingActorRuntimeId = $ridingActorRuntimeId;
70 $result->teleportCause = $teleportCause;
71 $result->teleportItem = $teleportItem;
72 $result->tick = $tick;
87 return self::create($actorRuntimeId, $position, $pitch, $yaw, $headYaw, $mode, $onGround, $ridingActorRuntimeId, 0, 0, $tick);
91 $this->actorRuntimeId =
CommonTypes::getActorRuntimeId($in);
92 $this->position = CommonTypes::getVector3($in);
93 $this->pitch = LE::readFloat($in);
94 $this->yaw = LE::readFloat($in);
95 $this->headYaw = LE::readFloat($in);
96 $this->mode = Byte::readUnsigned($in);
97 $this->onGround = CommonTypes::getBool($in);
98 $this->ridingActorRuntimeId = CommonTypes::getActorRuntimeId($in);
99 if($this->mode === MovePlayerPacket::MODE_TELEPORT){
100 $this->teleportCause = LE::readSignedInt($in);
101 $this->teleportItem = LE::readSignedInt($in);
103 $this->tick = VarInt::readUnsignedLong($in);
107 CommonTypes::putActorRuntimeId($out, $this->actorRuntimeId);
108 CommonTypes::putVector3($out, $this->position);
109 LE::writeFloat($out, $this->pitch);
110 LE::writeFloat($out, $this->yaw);
111 LE::writeFloat($out, $this->headYaw);
112 Byte::writeUnsigned($out, $this->mode);
113 CommonTypes::putBool($out, $this->onGround);
114 CommonTypes::putActorRuntimeId($out, $this->ridingActorRuntimeId);
115 if($this->mode === MovePlayerPacket::MODE_TELEPORT){
116 LE::writeSignedInt($out, $this->teleportCause);
117 LE::writeSignedInt($out, $this->teleportItem);
119 VarInt::writeUnsignedLong($out, $this->tick);