Modular Machinery Reborn · Setup guide · Intermediate
How to Create Custom Multiblocks with JSON and Datapacks
Modular Machinery Reborn gives you the power to design and program massive, custom multiblock machines from scratch. In this guide, you will learn how to build a physical structure in-game, export its block pattern using the built-in Structure Creator tool, configure modifiers in JSON, and load your creation globally using a datapack loader.
What you need
- Modular Machinery Reborn installed
- A global datapack loader mod (such as Open Loader or Paxi) or KubeJS
- Machine Controller
- Modular Machinery Casings (Plain, Vent, Circuitry, or Reinforced)
- Input/Output Buses (for items), Fluid Hatches, and Energy Input Hatches
- Structure Creator tool (obtained via Creative inventory or commands)
- A text editor (such as VS Code or Notepad++) for editing JSON files
Step by step
1Build Your Multiblock Prototype in Creative Mode
Start in a Creative world and physically build the machine you want to create. Every machine requires exactly one Machine Controller, which serves as the brain and orientation anchor of the multiblock. Surround the controller with your chosen decorative blocks and Modular Machinery Casings, and make sure to include at least one Energy Input Hatch, an Item Input Bus, and an Item Output Bus so the machine can actually function.
Tip: Place your Machine Controller in an easily accessible spot on the front face, as all relative coordinates in the JSON will be calculated from its exact position and facing direction.
2Select the Structure with the Structure Creator
Grab the Structure Creator tool from the Creative menu. Right-click one corner of your multiblock structure, then right-click the opposite diagonal corner to encompass the entire build, including the Machine Controller. Once the bounding box is set, follow the on-screen prompt or shift-right-click to export the selection.
Tip: Make sure you do not accidentally include grass, dirt, or floor blocks beneath your machine in the bounding box unless you want players to be forced to use those specific floor blocks.
3Retrieve and Format the Generated JSON
Exporting the structure saves a template JSON file inside your Minecraft instance folder (check your logs, chat output, or the modular_machinery_reborn export directory for the exact path). Open this file in your text editor. At the top of the file, define your machine's unique registry name (for example, "modular_machinery_reborn:heavy_compressor"), a localized display name, and an optional custom color hex code that will tint the casings and hatches once the structure forms.
4Refine the Block Pattern and Hatches
Scroll down to the "pattern" array in your JSON file, which lists every block's X, Y, and Z offset relative to the Machine Controller. When you exported the build, it recorded the exact tier of bus or hatch you placed (such as a Tiny or Ludicrous Energy Input Hatch). To allow players to use any tier of hatch or swap out input/output positions, replace specific hatch IDs in those coordinate slots with block tags or an array of acceptable casing and hatch IDs.
Tip: Using an array that accepts both standard Machine Casings and any Input/Output Bus at the edges of your machine gives players freedom in how they route their pipes and cables.
5Add Structure Modifiers for Upgrades
To make your machine upgradable, add a "modifiers" section to your machine JSON. Modifiers check if a specific block is present at a designated coordinate offset relative to the controller and apply a mathematical multiplier to the machine's recipes. For example, you can specify that placing a Machine Circuitry Casing or a Diamond Block directly behind the controller multiplies recipe processing speed or reduces energy consumption.
Tip: Check the in-game JEI preview after loading to verify how your modifier descriptions display to the player.
6Set Up the Global Datapack Directory
Modular Machinery Reborn relies on Minecraft's datapack system to read custom machines, meaning you need a datapack loader mod to apply your JSON across all worlds automatically. Navigate to your global datapack loader's folder (or KubeJS's "data" folder) and create a standard datapack structure: create a "pack.mcmeta" file in the root, then create the folder path "data/modular_machinery_reborn/machines/". Move your finished machine JSON file into this "machines" folder.
7Test and Verify In-Game
Return to your Minecraft world and run the "/reload" command (or restart the game if you added new registries that require a full reboot). Open JEI and search for your custom machine's name or check the uses on the Machine Controller to inspect the 3D multiblock preview. Finally, break and replace the Machine Controller on your physical prototype; the GUI should now report the structure as formed and apply your custom color tint to all connected casings.
Tip: If the controller says the structure is missing blocks, hold a Blueprint in your hand while looking at the controller to see a holographic overlay of where the mismatched blocks are.
How it works
At its core, Modular Machinery Reborn operates on a relative coordinate grid anchored to the Machine Controller. The controller is always treated as coordinate (0, 0, 0). When you define a block in the JSON pattern, you are telling the mod to look a certain number of blocks left/right, up/down, and forward/backward from the direction the controller is facing. Because the pattern is directional, rotating the controller in-game automatically rotates the entire multiblock requirement.
The mod separates the structure logic from the inventory logic. The Machine Controller itself holds no items, fluids, or energy. Instead, when the controller periodically scans the area and confirms the blocks match the JSON pattern, it links all detected Input/Output Buses and Hatches within that pattern into a single virtual network. When a recipe runs, the controller pulls ingredients from the linked Input Buses, drains power from the Energy Input Hatches, and pushes results into the Output Buses.
Because Modular Machinery Reborn is designed as a blank-slate framework for modpack creators, it stores machine definitions and recipes as server-side data rather than hardcoded Java objects. This is why a datapack loader is mandatory: it injects your JSON files directly into the game's data registry during world load, allowing JEI to dynamically generate 3D previews and recipe tabs without requiring you to write a single line of Java code.
Common mistakes
- Placing machine JSONs in the config folder instead of a datapack: Unlike older versions of Modular Machinery that used a dedicated config folder, Modular Machinery Reborn strictly uses the vanilla datapack structure. Always load your files via a global datapack loader or KubeJS's data directory.
- Hardcoding a single hatch tier in the pattern: If your exported JSON specifies only a 'Small Fluid Input Hatch' at a coordinate, players who upgrade to a 'Big' or 'Huge' hatch will break the multiblock structure. Always edit the JSON pattern to allow an array of all hatch tiers or a shared tag.
- Forgetting to include the controller's facing orientation: If you build your prototype while the controller is facing East, but export it assuming it faces North, your X and Z offsets will be rotated 90 degrees. Always verify the holographic preview with a Blueprint to ensure the orientation matches.
- Making a machine without an output hatch large enough for the recipe: A formed multiblock will still refuse to run recipes if the attached Item Output Bus or Fluid Output Hatch does not have enough capacity to hold the resulting output.
FAQ
Why does my machine structure not appear in JEI after I created the JSON?
Check your game logs for a JSON syntax error, such as a missing comma or unclosed bracket. Also ensure your datapack has a valid pack.mcmeta file and that the JSON is placed inside the exact 'data/modular_machinery_reborn/machines/' subfolder.
How do I add custom recipes to my newly created multiblock?
You can create recipe JSON files inside the 'data/modular_machinery_reborn/recipes/' folder of your datapack referencing your machine's registry ID, or use KubeJS server scripts to register recipes dynamically with much shorter code.
Can players share buses and hatches between two adjacent multiblocks?
While two controllers might both recognize a shared hatch as part of their structure, sharing input and output hatches often causes recipe conflicts and energy starvation. Design your patterns so machines can sit side-by-side without overlapping hatches.
Can I use blocks from other mods in my multiblock pattern?
Yes! The pattern scanner accepts any valid block registry ID or block tag from vanilla Minecraft or any installed mod, allowing you to integrate coils, glass, or casings from other tech mods seamlessly.
By combining the in-game Structure Creator tool with a global datapack loader, you can easily turn any physical build into a fully functional, tiered custom multiblock machine in Modular Machinery Reborn.