Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Player Rotation

Play 0x49, server → client.

play · 0x49 · clientbound (server → client)

Sets the player’s yaw and pitch without changing position. The server sends it for rotation-only teleports such as /tp with only rotation arguments. relativeYaw and relativePitch make the values offsets from the current rotation.

Sent by the server, read by the client. Listen for it with client.on("PlayerRotation", (data) => …) on the receiving side.

Fields

Field Type Notes
yaw Float
relativeYaw Boolean
pitch Float
relativePitch Boolean

Send it

await client.sendPacket("PlayerRotation", {
  yaw: /* Float */,
  relativeYaw: /* Boolean */,
  pitch: /* Float */,
  relativePitch: /* Boolean */,
});

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: src/Core/Versions/776/Packets/play/clientbound/PlayerRotation.ts

Was this page helpful?