Item Ports

What are Item Ports?

Item ports are used to hold and handle items. Similar to a chest, an item port can be used for both insertion and extraction of items.

If an input port is formed as part of a structure, any items stored inside will be looked at for use in recipes for that structure.

If an output port is formed as part of a structure, recipe outputs can be placed into the port's storage as part of running recipes.

How to create an Item Port?

{
  "id": "my_port",
  "controllerIds": "mm:controller_a",
  "name": "My Item Port",
  "type": "mm:item",
  "config": {
    "rows": 3,
    "columns": 3
  }
}

"type": "mm:item"

The "type" field for the item port is set to mm:item, this tells the config reader to look for item port specific fields inside the "config" object field.


"config": {
    "rows": 3,
    "columns": 3
}

Inside of the "config" field, the "rows" field is used to define how many rows of item slots are inside the ports storage.

Similarly, the "columns" field defines the number of columns of item slots are inside the ports storage.

NOTE: to calculate the total number of slots inside the item port, simply multiply rows and columns together. e.g. 3 rows and 3 columns would equal 9 total slots. 3 * 3 = 9

Last updated