Working core

Make the recipe run only if another core is running

Working core requirement is used to make the recipe work only if the machine is processing another recipe at the same time.

To be used, the machine must be using the machine processor. and the amount of cores must be above 1.

Depending of the following properties, the requirement can require any or a specific core (defined by its integer id) to process any or a specific recipe (defined by its id).

The requirement type of working core requirement is : "custommachinery:working_core".

Properties

The working core requirement has 1 mandatory property and 2 optional properties.

Mandatory property

"type": "custommachinery:working_core" //Mandatory to define a working core requirement.

Optional properties

Core

Name : core

Description :

The integer id of the core that should be working for the recipe to run.

Cores ids go from 1 to amount of cores specified in the machine processor amount property.

Example: if a machine has "amount": 4 cores, their ids will be 1, 2 , 3 and 4.

You can also use 0 which will make the requirement accept any cores (except the one that try to run the recipe containing the working core requirement).

Default : 0

Any core must be running to start the recipe.

Example :

"core": 1

The recipe will only start if the core 1 is processing a recipe.

Recipe

Name : recipe

Description :

A recipe id that define a specific recipe that must be running in another core.

Default : empty

Any recipe must be processed in another core.

Example :

"recipe": "custommachinery:test_recipe"

The recipe will only start if another core is processing the recipe with id "custommachinery:test_recipe".

Example

A working core requirement that will make the recipe start only if the core 1 is processing the recipe with id "custommachinery:test_recipe" :

{
    "type": "custommachinery:working_core",
    "core": 1,
    "recipe": "custommachinery:test_recipe"
}

A working core requirement that will make the recipe start only if any other core is working :

{
    "type": "custommachinery:working_core"
}

Last updated