Skip to content

Block Event

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.

Note Block

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 block position of the block
YShortThe Y block position of the block
ZIntegerThe Z block position of the block
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 block position of the block
YShortThe Y block position of the block
ZIntegerThe Z block position of the block
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