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

Program Command Block

Play 0x36, client → server.

play · 0x36 · serverbound (client → server)

Sent when the player saves a command block GUI. location is the block, command the command text, mode is sequence, auto, or redstone, and flags holds track output, conditional, and always active. Operator-only; the server updates the block entity.

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

Fields

Field Type Notes
location Position also position
command String
mode VarInt
flags UByte

Send it

await client.sendPacket("ProgramCommandBlock", {
  location: /* Position */,
  command: /* String */,
  mode: /* VarInt */,
  flags: /* UByte */,
});

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

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

Was this page helpful?