Skip to content

Spawn Painting

Packet IDDirectionMojang NameMCP Name
0x19ClientboundAddPaintingPacketPacket25EntityPainting

Sent to the client when a painting entity should be spawned. The position is (probably) in entity space.

Clientbound

FieldTypeDescription
Entity IDIntegerThe ID of the entity that will refer to this mob
TitleString16The name of the painting (Max 13 Characters).
XIntegerThe X position of the item entity (Quantized)
YIntegerThe Y position of the item entity (Quantized)
ZIntegerThe Z position of the item entity (Quantized)
DirectionByteThe direction of the painting

The coordinates refer to the center of the painting. Given a set width and height, the center is determined to be at

c
// Horizontal Center
int h = max(0, width / 2 - 1);
// Vertical Center
int v = height / 2;

The direction can be figured out via this table.

ValueDirection
0-Z
1-X
2+Z
3+X

Example Packet

FieldValue
Entity ID532
X5669 (177.15)
Y2176 (68.0)
Z-5325 (-166.40)
Direction2 (+Z)