Working core
Use the working core requirement in a KubeJS recipe
Use one of these methods to add a working core requirement to the recipe.
//Require any recipe to be running on any core
.requireWorkingCore()
//Require a specific recipe to be running on any core
.requireWorkingCore("recipe")
//Require any recipe to be running on a specific core
.requireWorkingCore(core)
//Require a specific recipe to be running on a specific core
.requireWorkingCore(core, recipe)- The - coreparam must be an integer between 1 and the max amount of cores defined in the machine processor- amountproperty.
- The - recipeparam must be a recipe id.
Note : when creating recipes with KubeJS their ids might change when the script is modified. To be sure the recipe id will never change you can appends .id("some_recipe_id") after the recipe.
Example
The following recipe will only run if the core with id 1 is processing the recipe with id "kubejs:test_recipe" :
ServerEvents.recipes(event => {
  event.recipes.custommachinery.custom_machine("custommachinery:power_crusher", 100)
  .requireWorkingCore(1, "kubejs:test_recipe")
  
})Last updated
