Informations about a slot, that, if not empty, contains an item id and meta, the count (0-255) and, optionally, an nbt tag for enchantments, custom name, colours and more.
Fields:
Name | Type | When |
---|---|---|
id | varint | |
meta and count | varint | id is greater than 0 |
nbt | nbt | id is greater than 0 |
can place on | string[] | |
can destroy | string[] |
Item's id or 0 if the slot is empty.
Item's meta or uses (unsigned short) left-shifted 8 times and the count (unisgned byte).
Examples:
var encoded = item.meta << 8 | item.count
var meta = encoded >> 8
var count = count & 255
Optional nbt data encoded as a nameless little-endian compound tag.