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

Swing

Play 0x3F, client → server.

play · 0x3F · serverbound (client → server)

Sent when the player swings an arm (attack, block break, or use). hand is main or off hand. The server relays the animation to nearby players via Animate; it does not itself cause damage or interaction.

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

Fields

Field Type Notes
hand VarInt

Send it

await client.sendPacket("Swing", {
  hand: /* VarInt */,
});

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

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

Was this page helpful?