Item component
Add an item slot inside the machine.
This is the component that let your machine interact with items, basically it add an inventory to your machine.
Each Item Component add 1 slot to the machine inventory and each slot can held 1 stack of item but you can add as many components as you want.
You can add as much item component as you want.
Item Component can have different types depending on the desired behaviour.
The type for a default item component is: "type": "custommachinery:item"
Here is a list of all available item component types with their dedicated wiki pages :
Properties
The item component has 2 mandatory properties and 6 optional properties.
Mandatory properties
"type": "custommachinery:item" //Mandatory to define an item component.Optional properties
Capacity
Name : capacity
capacityDescription :
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 :
Whitelist
Name : whitelist
whitelistDescription :
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
Default : empty
All items are accepted by the slot.
Example :
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
blacklistDescription :
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
Default : empty
All items are accepted by the slot.
Example :
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
modeDescription :
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.
Default : both
bothExample :
Locked
Name : locked
lockedDescription :
A boolean value, if true the player won't be able to place and remove items from this slot.
Recipes and hoppers/pipes will still be able to place/remove items from this component (as long as they match the filter, mode and config properties).
The locking of a slot can be changed using KubeJS or Crafttweaker integration.
Default : false
falseThe player will be able to place items in the slot.
Example :
The player won't be able to place or remove items from the slot.
Example
A basic input slot
A Fuel slot that will accept only coal and charcoal (for a furnace for example)
Last updated