#Mekanism Recipe Help
24 messages · Page 1 of 1 (latest)
You'll have to look into the Mekanism jar and copy one of its recipes and use that format in an event.custom.
https://github.com/mekanism/Mekanism/blob/296c1ded7c05b5334390495c09f6b714abd0aedc/src/main/java/mekanism/common/recipe/MekanismRecipeType.java#L115
That's a good place to start.
Unlike other machines, there doesn't seem to be a direct recipe json file.
ServerEvents.recipes(event => {
event.custom({
"type":"mekanism:sawing",
"input":{"ingredient":{"item":"minecraft:apple"}},
"mainOutput":{"count":2,"item":"minecraft:oak_golden_apple"}}
)});
i tried this recipe, it loaded up but it doesnt actually function
any idea what i could try?
I found this recipe in the mekanism jar file
{"type":"mekanism:sawing","input":{"ingredient":{"item":"minecraft:chest"}},"mainOutput":{"count":8,"item":"minecraft:oak_planks"}}
You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes
```js :arrow_left:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
``` :arrow_left:
This example will look like this:
ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
share your logs, or actual code?
event.custom({
"type":"mekanism:sawing",
"input":{"ingredient":{"item":"minecraft:apple"}},
"mainOutput":{"count":2,"item":"minecraft:oak_golden_apple"}}
)});
Code i used
And is that in server_scripts?
yeah
minecraft:oak_golden_apple is that an item in your pack?
Copy / Paste isn't a good way of learning, instead examine the code and adapt it to your needs
happy to help 🙂
Please close your ticket (with </ticket close:1054771505520717835> or the button atop this thread) once you resolved your issue! This also helps others that would like to help out, as they don't have to look into this thread to check if it has been resolved by now.
Do you have any other questions regarding your issue? Feel free to ask!
Note: You generally should create a new post for unrelated issues.
Ticket closed!
sorr for necro and i bet nobody will see this but does this work for every mod?
or at least, most mods?
Mods with JSON recipes