-
Notifications
You must be signed in to change notification settings - Fork 26
Item Component
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.
Item Component must be defined by "type": "custommachinery:item".
Description : A string that define the id of the slot (used in gui rendering), the String must be all lowercase with letters and numbers only (no spaces or special characters).
Example : "id": "slot1"
Description : An 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 #toolsandarmors).
Description : A blacklist of items that the slot can't accept. The items mus 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, so all items are accepted by the slot.
Example : "filter": ["minecraft:diamond", "#minecraft:logs"] The slot will accept all items but Minecraft vanilla diamond item and items in the minecraft:logs tag.
Description : A boolean, if true the filter property will act as a whitelist instead of a blacklist, meaning that the slot will only accept items specified in the filter property.
Default : false The filter property is a blacklist.
Example : "whitelist": true The filter property is a whitelist.
Description : The IO mode of the slot. Available modes are (input/output/both/none). Hoppers and pipes can only insert in an input slot and extract from an output slot. In GUI you can both insert and extract items in an input slot but only extract items from an output slot. While crafting the machine will search for items to consume in input slots and put the recipe results in the output slots.
Default : both
Example : "mode": "input" Set the slot as an input slot.
Description : Item components can have differents behaviours, a basic item slot, a furnace fuel slot, an upgrade slot... These behaviours are defined in this variant property. Addons can adds their own variants but the current existing variants are :
-
custommachinery:default: A basic item slot -
custommachinery:fuel: A furnace fuel slot, it allows only items with a burn time and will consume them to power the machine. -
custommachinery:upgrade: An upgrade slot, it allows only item defined as custom machine upgrade.
Default : custommachinery:default
Example : "variant": "custommachinery:fuel" This slot will be a Fuel Slot.
Note : A fuel/upgrade slot mode can be Input or Output but if set to output the only way to put an item in the slot will be trough a recipe output so it's advised to leave it as input slot.
A Fuel slot that will accept only coal and charcoal (for a furnace for example)
{
"type": "custommachinery:item",
"id": "fuel",
"filter": ["minecraft:coal", "minecraft:charcoal"],
"whitelist": true,
"mode": "input",
"variant": "custommachinery:fuel"
}3. Machine GUI
- Dump Element
- Energy Element
- Fluid Element
- Fuel Element
- Player Inventory Element
- Progress Bar Element
- Reset Element
- Slot Element
- Status Element
- Text Element
- Texture Element
5. Catalysts
- Biome Requirement
- Block Requirement
- Command Requirement
- Dimension Requirement
- Drop Requirement
- Durability Requirement
- Effect Requirement
- Energy Requirement
- Energy Per Tick Requirement
- Entity Requirement
- Fluid Requirement
- Fluid Per Tick Requirement
- Fuel Requirement
- Item Requirement
- Light Requirement
- Loot Table Requirement
- Position Requirement
- Structure Requirement
- Redstone Requirement
- Time Requirement
- Weather Requirement