-
Notifications
You must be signed in to change notification settings - Fork 4
Example GridRecipe
Dana edited this page Apr 3, 2026
·
3 revisions
Examples for adding recipes for your item/block.
Note
In the example below we do this for block, for items you need to use "type": "item"
Example:
[
{
"ingredientPattern": "AAA",
"ingredients": {
"A": { "type": "item", "code": "game:plank-*", "name": "wood" }
},
"width": 3,
"height": 1,
"output": {
"type": "block",
"code": "myblock",
"attributes": {
"types": {
"wood": "{wood}"
}
}
}
}
]It is also possible to make output with mutliple types. Example:
[
{
"ingredientPattern": "ABC",
"ingredients": {
"A": { "type": "item", "code": "game:plank-*", "name": "wood" },
"B": { "type": "item", "code": "game:stone-*", "name": "stone" },
"C": { "type": "item", "code": "game:ingot-*", "name": "metal" }
},
"width": 3,
"height": 1,
"output": {
"type": "block",
"code": "myblock",
"attributes": {
"types": {
"wood": "{wood}",
"stone": "{stone}",
"metal": "{metal}"
}
}
}
}
]To copy attributes from attribute-typed ingredient to output, use copyAttributesFrom. Example:
[
{
"ingredientPattern": "A",
"ingredients": {
"A": { "type": "block", "code": "myotherblock" }
},
"copyAttributesFrom": "A",
"width": 1,
"height": 1,
"output": { "type": "block", "code": "myblock" }
}
]To merge attributes from multiple attribute-typed ingredients to output, use mergeAttributesFrom. Example:
[
{
"ingredientPattern": "ABC",
"ingredients": {
"A": { "type": "block", "code": "firstblock" },
"B": { "type": "block", "code": "secondblock" },
"C": { "type": "block", "code": "thirdblock" }
},
"mergeAttributesFrom": [ "A", "B", "C" ],
"width": 3,
"height": 1,
"output": { "type": "block", "code": "myblock" }
}
]