Skip to content

Block Action

Packet IDDirectionMojang NameMCP Name
0x36ClientboundTileEventPacketPacket54PlayNoteBlock

Clientbound

This packet is sent to inform the client when a block has performed an action. There are only two blocks that make use this packet: note blocks and pistons.

Noteblock

Note blocks use the packet to indicate they've played a tone. They use the two bytes the packet offers for Instrument and Pitch information.

FieldTypeDescription
XIntegerThe X position of where the block is.
YShortThe Y position of where the block is.
ZIntegerThe Z position of where the block is.
InstrumentByteThe instrument type.
PitchByteThe pitch of the note.
ValueInstrument
0Harp
1Bass
2Snare Drum
3Hi-hat
4Bass Drum

Piston

Pistons use it to indicate whether they're extended or not and what direction they face. This also plays the piston push or retract sound as needed.*

FieldTypeDescription
XIntegerThe X position of where the block is
YShortThe Y position of where the block is
ZIntegerThe Z position of where the block is
StateBytefalse for extending, true for retracting
DirectionByteThe direction the piston extends/retracts to

The direction matches the lower 3-Bits of the metadata values that're used for pistons as described on the Blocks page.

ValueDirection
0Down
1Up
2East
3West
4North
5South

MISSING

A lot of this still needs to be tested. I'm unsure if this just plays the sound or if this is also responsible for playing the piston extend/retract animations!

Example Packet

MISSING

TODO: Capture or at least write example packet data