Item requirement is used to define item inputs and outputs for a custom machine recipe.
To use it you need to provide the registry name and the amount of the item you want the recipe to consume/produce.
This requirement is available in both input and output modes.
In input mode : When starting to craft the recipe, the machine will consume the desired amount of the specified item from the input slot they are in.
In output mode : When finishing to craft the recipe, the machine will produce the desired amount of the specified item and put them in the first disponible output slot.
The requirement type of item requirement is : "custommachinery:item".
Properties
The item requirement has 3 mandatory properties and 3 optional properties.
Mandatory properties
"type": "custommachinery:item"//Mandatory to define an item requirement.
Mode
Name : mode
Description :
Define the I/O mode of the requirement.
input The requirement will consume items at the start of the crafting process.
output The requirement will produce items at the end of the crafting process.
Example :
"mode": "input"
The requirement will consume items at the start of the crafting process.
Ingredient
Name : ingredient
Description :
A sized ingredient with a syntax like this :
"ingredient": {"item":"item_id","count": amount}
"item" property is the registry name of the item you want to be consumed/produced by the recipe.
It must be specified like namespace:item_registry_name with "namespace" being either "minecraft" if the item is from vanilla or a mod ID if the item is from a mod (ex : minecraft:diamond or mekanism:copper_ingot).
If the requirement mode is input you can use a tag instead, by using "tag" instead of "item". Example : "tag": "tag_id"
You can't use a tag if the requirement mode is output !