Recipes
Create machine recipes using KubeJS
Custom Machine recipes can be made with KubeJS.
Create a .js file in the kubejs/server_scripts/ folder (ex: custom_machine_recipes.js).
Then inside the .js file you can use the recipes kubejs event to get the custom machine recipe builder, pass it the id of the machine you want to make the recipe for and the duration of the recipe (in ticks).
onEvent('recipes', event => {
event.recipes.custommachinery.custom_machine("namespace:machine_id", duration)
//Add requirements here
})Requirements
You can now add various requirements by calling the methods below directly on the custom machine recipe builder.
Requirements special properties
Some requirements (almost all) have various properties that can change its behavior.
To set these properties you must call one or several of the methods below immediately after the desired requirement. The properties will only be applied on the latest added requirement when the method is called.
If the latest added requirement doesn't support the property an error will be logged and nothing will happen (the property will be ignored).
Priority
Use the method below to set the priority of the recipe.
If this method is called several times only the latest will be used.
If this is called AFTER .jei() (no need to be immediatly after) this will act as the "jeiPriority" instead, defining the priority of the recipe to show in jei instead of the priority to be checked in the machine.
If no priority is set, the default value : 0 will be used.
The
priorityparam must be an integer value.
Jei
If the method below is called, all requirements added after that will be added to the jei property requirement list.
This action cannot be inverted, you must add all your recipe requirements before calling it.
Requirements added after this method will only be displayed in jei but executed by the machine. Learn more here.
Examples :
Last updated

