The item component has 2 mandatory properties and 6 optional properties.
Mandatory properties
"type": "custommachinery:item"//Mandatory to define an item component.
Id
Name : id
Description :
A string that define the id of the slot (used in gui element and recipes), the string must be all lowercase with letters and numbers only (no spaces or special characters).
Example :
"id": "slot1"
Optional properties
Capacity
Name : capacity
Description :
A positive integer value that define the maximum number of item that you can put in the slot.
This does not override the item stack size (if you set the slot capacity to 100 items will still stack by 64 or less). This is used to decrease the available stack size, not increase it.
Default : 64
Example :
"capacity": 4 //Any item that will be put in the slot will have a maximum stack size of 4 items (or less if the item max stack size is less like tools and armors).
Whitelist
Name : whitelist
Description :
A list of items that the slot can accept.
The items must be referenced by their registry name like minecraft:diamond or minecraft:stone.
You can also use a tag here using the # prefix like #minecraft:logs
The slot will accept only Minecraft diamond and items in the minecraft:logs tag.
Note : The blacklist (see below) takes priority over the whitelist. If an item is in both the blacklist and whitelist it won't be accepted by the slot.
Blacklist
Name : blacklist
Description :
A blacklist of items that the slot can't accept.
The items must be referenced by their registry name like minecraft:diamond or minecraft:stone.
You can also use a tag here using the # prefix like #minecraft:logs
The slot will accept all items but Minecraft diamond and items in the minecraft:logs tag.
Note : The blacklist takes priority over the whitelist (see above). If an item is in both the blacklist and whitelist it won't be accepted by the slot.
Mode
Name : mode
Description :
The IO mode of the slot, used only by recipes to know which slots are inputs and outputs.
Available modes are (input/output/both/none).
While crafting the machine will search for items to consume in input slots and put the recipe results in the output slots.
For changing I/O mode of a slot for external interaction, such as hoppers and pipes see the Config property below.