Concepts Overview
Masterful Machinery is built around five concepts:
| Concept | What it does | Defined where |
|---|---|---|
| Controller | The machine brain. Detects structures and runs recipes. | config/mm/controllers/*.json or KubeJS startup scripts |
| Port | A generated input/output block used by recipes. | config/mm/ports/*.json or KubeJS startup scripts |
| Extra block | Decorative/helper block generated by MM. | config/mm/extras/*.json or KubeJS startup scripts |
| Structure | A multiblock layout centered around a controller. | datapack path data/<namespace>/mm/structures/*.json or KubeJS server scripts |
| Process recipe | A processing recipe bound to one structure id. | datapack path data/<namespace>/mm/processes/*.json or KubeJS server scripts |
Controller-origin structure matching
A controller uses its own block position as the origin for checking the structure layout. The layout array describes layers of characters around the controller, and the key object maps those characters to required blocks, tags, ports, port types, or state-list entries.
The source supports rotated structure checks. A structure can form in multiple rotations; you normally define the structure once and let the controller detect valid rotations.
Ports are generated as input and output variants
A single port JSON creates two runtime models: one input variant and one output variant. The generated variants are normally named and identified as input/output versions of the base port. Recipes read from input port storages and write into output port storages.
Recipe execution
A process recipe has:
structureId— the structure it belongs to;ticks— runtime length in Minecraft ticks;inputs— required/consumed entries;outputs— produced entries;- optional
conditions; - optional
parallelProcessing.
A recipe can only run when all inputs are available, all outputs have room, all conditions pass, and the controller currently has a formed structure that matches the recipe’s structureId.