Skip to content

Place Block

Packet IDDirectionMojang NameMCP Name
0x0FServerboundUseItemPacketPacket15Place

Serverbound

Sent to the server when the player attempts to place or interact with a block, or use an item. If a block is changed, this must be followed up by a set block packet!

FieldTypeDescription
XIntegerThe X block position of the block
YByteThe Y block position of the block
ZIntegerThe Z block position of the block
FaceByteThe face of the block that's being placed against
Block/Item IDShortThe block or item to be placed
(Amount)ByteThe amount of the item in the players hand
(Damage)ShortThe Metadata of the item

The face can be one of six values, representing the face the block is placed on.

Value012345
Face-Y+Y-Z+Z-X+X

NOTE

If the face value is 0xFF, the client either failed to place the block, like trying to place it in mid-air without a block to place against, or is trying to use an item, such as a Hoe. For certain items, such as boats, the client will send this packet even if the no reachable block was right-clicked, sending X=-1, Y=255, Z=-1. In those cases, Player Rotation and Player Position and Rotation should be used to determine the correct place to spawn the object.

Example Packet

Serverbound

FieldValue
X-6231
Y53
Z563
Face3 (+Z)
Block/Item ID3 (Dirt)
(Amount)64
(Damage)0