Skip to main content

Item Info

Look up the static metadata baked into the client for any block id. Backed by the live ConfigData table when present (full flags + collision), with a fallback to the bundled block_types.json so scripts always get at least an id + name even before any bot has connected.

local item = getInfo(1) -- 1 = Solid Block

item.id -- block type
item.name -- display name
item.flags -- bitfield: 0x1 untradeable, 0x2 trashable
item.collision -- 0x0 none, 0x1 collidable, 0x2 oneway, 0x4 hot, 0x8 death

Lookups

getInfo(id)

FieldType
Signature(id: number) → ItemInfo?
ReturnsItemInfo?nil when neither the live ConfigData table nor the fallback catalog has the id
Asyncno
local info = getInfo(9)
if info then
print(info.name) -- "Obsidian"
end

getInfos()

FieldType
Signature() → {ItemInfo}
Returns{ItemInfo} — 1-indexed list of every block the runtime knows about
Asyncno

Source priority: ConfigData (live, full flags) → bundled block_types.json (fallback, id + name only). Returns an empty table when neither has populated yet.

for _, item in pairs(getInfos()) do
-- ...
end

ItemInfo fields

FieldTypeNotes
idnumberBlock id (matches InventoryItem.id and world:findTiles(blockType)).
namestringDisplay name. Falls back to "#<id>" — never nil.
flagsnumberBitmask. 0 when ConfigData hasn't arrived.
collisionnumberBitmask. 0 when ConfigData hasn't arrived.

flags bits

BitMeaning
0x1untradeable (player can't list / send via chat)
0x2trashable (default for every block — rarely cleared)

collision bits

BitMeaning
0x0no collider
0x1collidable (solid)
0x2one-way (platform — pass from below, block from above)
0x4hot (damage on contact, e.g. fire)
0x8death (instant-kill, e.g. spike, lava)

Combine via bitwise AND:

local UNTRADEABLE = 0x1
if bit32.band(info.flags, UNTRADEABLE) ~= 0 then
print(info.name, "is untradeable")
end