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

Player Action

Play 0x29, client → server.

play · 0x29 · serverbound (client → server)

Reports block digging and some item actions. status is start/cancel/finish digging, drop item, drop stack, release use item, or swap hands; location and face identify the block. sequence is echoed back in BlockChangedAck so the client can reconcile block predictions.

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

Fields

Field Type Notes
status VarInt
location Position also position
face Byte
sequence VarInt

Send it

await client.sendPacket("PlayerAction", {
  status: /* VarInt */,
  location: /* Position */,
  face: /* Byte */,
  sequence: /* VarInt */,
});

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

Source: src/Core/Versions/776/Packets/play/serverbound/PlayerAction.ts

Was this page helpful?