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

Use Item

Play 0x43, client → server.

play · 0x43 · serverbound (client → server)

Sent when the player right-clicks with an item while not targeting a block or entity (eating, drawing a bow, throwing). hand is the hand used, rotation is the player’s yaw and pitch at that moment, and sequence is echoed in BlockChangedAck. The server runs the item’s use logic.

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

Fields

Field Type Notes
hand VarInt
sequence VarInt
rotation vec2f

Send it

await client.sendPacket("UseItem", {
  hand: /* VarInt */,
  sequence: /* VarInt */,
  rotation: /* vec2f */,
});

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

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

Was this page helpful?