Skip to content

Item Data

Packet IDDirectionMojang NameMCP Name
0x83ClientboundComplexItemDataPacketPacket131MapData

Used for sending pixel data for the map item.

Clientbound

FieldTypeDescription
Item IDShortID of the modified Item
Map IDShortID of the map that should be displayed
Data SizeByteSize of the data array
DataByte ArrayArray containing the data

The data that results from this has a format completely unique to it.

The first byte determines if the sent data is graphics data (0) or icon data (1).

Graphics Data

If the sent data is graphics data, the next two Bytes are the X and Y offset of the updated map region.

#Data
0X offset
1Y offset
2+nGraphics data palette indices

Pixels are written southward of the X/Y offset. Data can only be written until the end of the current line. This means that, if you start at Y offset 0, you can write a total of 128 pixels. Any beyond that and the client crashes.

Icon Data

Each icon uses 3 bytes of data.

#Data
0Rotation (upper 4-bits), Icon Sprite (lower 4-bits)
1X offset
2Y offset

Valid icon rotation values range from 0 - 15 and maps to 0.0° - 337.5° (22.5° increments).

A map can, at most, have (256 - 1) / 3 = 85 icons.

Example packet

FieldValue
Item ID358 (Map)
Map ID1
Data Size4
Data1, 0, 5, 7

Further reading