Masterful Machinery
  • 👋MM Docs
  • 💡Base Features & Config
    • Controllers
    • Ports
      • Item Ports
      • Fluid Ports
      • Energy Ports
      • Mekanism Ports (Compat)
        • Gas Ports
        • Slurry Ports
        • Pigment Ports
        • Infusion Ports
      • Create Kinetic (Compat)
      • PneumaticCraft Air (Compat)
    • Extra Blocks
    • Structures
      • Structure Requirements
      • Common Requirements
    • Process Recipes
      • Ingredient Configs
      • Input Entries
      • Output Entries
      • Recipe Conditions
  • 🔩Compat Features
    • KubeJS Support
      • Register Controller
      • Register Port
      • Register Extra Blocks
      • Create Structures
      • Create Process Recipes
  • Tutorial Guides
    • Step by Step Datapack Edition
  • General Help
    • 🪞Custom Textures
  • 🎥Gallery
    • Coke Oven
  • 📎Archived Versions
    • Deprecated 1.16 Versions
    • Deprecated 1.18-1.19 Versions
      • Data Packs
Powered by GitBook
On this page
  • What are Ports?
  • How do Ports Work?
  • How to create a Port?
  • Explaining the Sample
  • Port Types
  • Where do port files go?
  1. Base Features & Config

Ports

PreviousControllersNextItem Ports

Last updated 11 months ago

What are Ports?

A port in the context of Masterful Machinery is a part of a machine structure which can be either required as an recipe input or affected by an recipe output. They facilitate interfacing with machines and define connection points for recipe ingredients to be used.

How do Ports Work?

A Port is usually a block which can store a form of ingredient, whether it be items, fluids or energy, the port block holds these ingredients and allows the machine to consume them as part of performing a .

Ports can also be used for other inputs or outputs which may not have anything to store. For example a port could allow the ingredient of kinetic rotation, like in the Create Mod.

How to create a Port?

This snippet only shows the common fields for every port type. Due to differences between different types of ports, there are other fields which have been removed. Full examples of port configs can be navigated to further down including the different port types and type dependent fields.

{
  "id": "my_port",
  "controllerIds": "mm:my_controller",
  "name": "My Port",
  //...
}

Explaining the Sample

"id": "my_port"

The "id" field is an identifier unique to this port. When referencing this port from other files or locations, be sure to prefix it with mm:. For example when referencing this port, you will use mm:my_port.


"controllerIds": "mm:my_controller"

The "controllerIds" field is either a single or collection of controller identifiers. The controller ids referenced here define which controllers the port can be used with. Keep in mind, "controllerIds" can also be an array containing multiple identifiers. The following format can be used when referencing multiple controller ids:

"controllerIds": [
    "mm:my_controller",
    "mm:my_other_controller"
]

"name": "My Port"

The "name" field defines the default en_US language translation entry for this port. To change this entry for other languages, the full translation key is simply the port id prefixed with block.mm. For example the translation key for this port would be block.mm.my_port.

Port Types

Base mod Compatibility

Modded Compatibility

Where do port files go?

Assuming you are at the root of your modpack directory. The relative path to the ports folder is as follows: ./config/mm/ports. Inside you can add your .json files containing the desired port definitions.

Item Ports:

Fluid Ports:

Energy Ports:

Mekanism Ports:

Create Ports:

PneumaticCraft Ports:

💡
Process Recipe
HERE
HERE
HERE
HERE
HERE
HERE