Search the docs

Find a guide, global, type or member

GlobalEmber

blocks

Block ids for world. Index by a canonical name for a preloaded id: only blocks["minecraft:air"] (0) is guaranteed, so use blocks.get for anything else.

Functions

blocks.get(name: string) -> number#

Returns the id of a block state, e.g. "minecraft:oak_stairs[facing=north]". No namespace means minecraft; properties left out take the block's defaults. Raises for an unknown block or property.

blocks.name(block: number) -> string#

Returns the canonical name of an id, e.g. "minecraft:oak_stairs[facing=north,half=bottom]". Raises for an unknown id.