How do I create custom mekanism recipes?

Open up your mekanism.jar and go to data/mekanism/recipes. You'll see many folders containing recipes for each machine. Go to the machine for which you want to create a custom recipe. (for example, crushing).

Open any .json recipe in the crushing folder and you'll see how the recipes are being handled for mekanism. If we look at "charcoal_dust.json), you'll see this:

{"type":"mekanism:crushing","input":{"ingredient":{"item":"minecraft:charcoal"}},"output":{"item":"mekanism:dust_charcoal"}}

*note, it's one rule of text, but it may show as two or more rules of text, depending on your browser.

You can see two important words here: "input" and "output" (the quotation marks are important here). The way these .json recipes go is like this.

{
    "type":"mekanism:crushing",
    "input":{
        "ingredient":{
            "item":"minecraft:charcoal"
        }
    },
    "output":{
        "item":"mekanism:dust_charcoal"
    }
}

This way of writing the recipe also works and is more comprehensive.

Now, if you look closely, you can see that the recipe requires a minecraft:charcoal and outputs a mekanism:dust_charcoal. Understood? Good.

Now, if you want to create a custom recipe, create an empty text file (or just extract the charcoal_dust.json file to a new folder). Rename the text file or extracted charcoal_dust.json to something else (like, crush_dirt_to_diamond.json and make sure it's NOT crush_dirt_to_diamond.json.txt). Copy/paste this recipe from above into it if it's a fresh text file if you haven't used the extracted file.

Now, as you could see from the name, I want to crush dirt into diamonds. So I replace the input and output accordingly.

{
    "type":"mekanism:crushing",
    "input":{
        "ingredient":{
            "item":"minecraft:dirt"
        }
    },
    "output":{
        "item":"minecraft:diamond"
    }
}

And save. Now you need to put that in a datapack and load it ingame. You could look on minecraft wiki on how to make one. Just remember that the new recipe must be in the same folder structure as in your mekanism.jar. So our crushing recipe should go in our datapack like this:

customdatapack.jar/data/mekanism/recipes/crushing/crush_dirt_to_diamond.json

(If you have a global datapack loader, then dump it in there instead. The folder structure must remain the same in there as well.

/r/feedthebeast Thread