> For the complete documentation index, see [llms.txt](https://frinn.gitbook.io/custom-machinery-1.21/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frinn.gitbook.io/custom-machinery-1.21/recipes/requirements/working-core.md).

# Working core

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](/custom-machinery-1.21/creating-custom-machines/processor/machine.md). 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

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

#### Optional properties

<details>

<summary>Core</summary>

#### Name : `core`

#### Description :&#x20;

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 :&#x20;

```json
"core": 1
```

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

</details>

<details>

<summary>Recipe</summary>

#### Name : `recipe`

#### Description :&#x20;

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 :&#x20;

```json
"recipe": "custommachinery:test_recipe"
```

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

</details>

### 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" :

```json
{
    "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 :&#x20;

```json
{
    "type": "custommachinery:working_core"
}
```
