Ingredient (Data Type)
Either: an Object specifying a registered item or item tag.
Either: a String — an item id, or an item tag written with a leading #.
Or: an Object specifying a registered item or item tag.
Or: an Array mixing either of those forms.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
item | Identifier | optional | ID of a registered item. |
tag | Identifier | optional | ID of an item tag. The leading # is optional here. Will be ignored if item is set. |
One of item or tag must be present.
The string form
Anywhere the object form is accepted you may write the id directly instead. These pairs are identical:
"ingredient": "minecraft:diamond"
"ingredient": { "item": "minecraft:diamond" } "ingredient": "#minecraft:wool"
"ingredient": { "tag": "minecraft:wool" } Examples
"ingredient": {
"item": "minecraft:diamond"
} An ingredient which matches a diamond.
"ingredient": {
"tag": "minecraft:wool"
} An ingredient which matches any wool block.
"ingredient": [
{
"item": "minecraft:cod"
},
{
"item": "minecraft:cooked_cod"
},
{
"tag": "minecraft:planks"
}
] An ingredient which matches cod in its raw or cooked form, or any of the wooden planks.
"ingredient": ["minecraft:cod", "minecraft:cooked_cod", "#minecraft:planks"] The same ingredient, in the string form.