13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
21 public const NETWORK_ID = ProtocolInfo::MOVE_ACTOR_ABSOLUTE_PACKET;
23 public const FLAG_GROUND = 0x01;
24 public const FLAG_TELEPORT = 0x02;
25 public const FLAG_FORCE_MOVE_LOCAL_ENTITY = 0x04;
27 public int $actorRuntimeId;
31 public float $headYaw;
32 public int $flags = 0;
37 public static function create(
int $actorRuntimeId,
Vector3 $position,
float $pitch,
float $yaw,
float $headYaw,
int $flags) : self{
39 $result->actorRuntimeId = $actorRuntimeId;
40 $result->position = $position;
41 $result->pitch = $pitch;
43 $result->headYaw = $headYaw;
44 $result->flags = $flags;
49 $this->actorRuntimeId = $in->getActorRuntimeId();
58 $out->putActorRuntimeId($this->actorRuntimeId);
59 $out->putByte($this->flags);
61 $out->putRotationByte($this->pitch);
62 $out->putRotationByte($this->yaw);
63 $out->putRotationByte($this->headYaw);
67 return $handler->handleMoveActorAbsolute($this);
handle(PacketHandlerInterface $handler)
encodePayload(PacketSerializer $out)
static create(int $actorRuntimeId, Vector3 $position, float $pitch, float $yaw, float $headYaw, int $flags)
decodePayload(PacketSerializer $in)
putVector3(Vector3 $vector)