Search the docs

Find a guide, global, type or member

GlobalContentcontent.luau

content

Declares an experience's blocks, items, mobs, models, images, tags and recipes; only in content.luau.

Functions

content.block(id: string, def: BlockDef)#

Declares a custom block.

content.item(id: string, def: ItemDef)#

Declares a custom item.

content.mob(id: string, def: MobDef)#

Declares a custom mob.

content.model(id: string)#

Declares a display model scripts can show, from assets/models/<path>.json or assets/textures/<path>.png.

content.image(id: string, def: ImageDef)#

Declares a font image or HUD font.

content.itemTag(id: string, members: { string })#

Declares an item tag. Members are item keys, declared here or minecraft:; "#name" includes another item tag declared here. A tag may not include itself.

content.blockTag(id: string, members: { string })#

Declares a block tag. Members are block keys, declared here or minecraft:; "#name" includes another block tag declared here. A tag may not include itself.

content.shaped(id: string, def: { pattern: { string }, key: { [string]: string }, result: Result })#

Declares a crafting-table recipe. pattern is 1 to 3 rows of 1 to 3 symbols, space for an empty slot; key maps every symbol to an item key or "#tag", and only those.

content.shapeless(id: string, def: { ingredients: { string }, result: Result })#

Declares a crafting recipe of 1 to 9 ingredients in any arrangement, each an item key or "#tag".

content.smelting(id: string, def: { input: string, result: Result, time: number?, xp: number? })#

Declares a furnace recipe. input is an item key or "#tag"; time is the cook time in ticks, default 200; xp is the experience granted, default 0.