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
  1. Compat Features
  2. KubeJS Support

Create Process Recipes

Create process recipes with KubeJS Server Scripts

Server Script

MMEvents.createProcesses(event => {
    event.create("mm:my_process_recipe")
        .structureId("mm:my_structure")
        .ticks(1000)
        .input({
            type: "mm:input/consume",
            ingredient: {
                type: "mm:item",
                item: "minecraft:glass",
                count: 10
            }
        })
        .input({
            type: "mm:input/consume",
            ingredient: {
                type: "mm:fluid",
                fluid: "minecraft:water",
                amount: 1000
            }
        })
        .output({
            type: "mm:output/simple",
            ingredient: {
                type: "mm:energy",
                amount: 1000
            }
        })
})

To register controllers in KubeJS, you can call MMEvents.createProcesses.

The create function takes a string parameter which is the id of the process recipe (normally infered from the location of the json file in a datapack). The function returns a builder to set the rest of the fields for the process recipe.

the structureId function takes a string parameter whichmaps directly to the process recipe's "structureId" field.

The ticks function takes an integer parameter which maps directly to the process recipe's "ticks" field.

The input function takes an object of an input recipe entry and adds it to the list of object of the process recipe's "inputs" array field.

The output function takes an object of an output recipe entry and adds it to the list of object of the process recipe's "outputs" array field.

PreviousCreate StructuresNextStep by Step Datapack Edition

Last updated 1 year ago

NOTE: all functions will map to the fields of the

🔩
Process Recipe Json