# Mana

Mana requirement is used to define mana inputs and outputs for a custom machine recipe.

To use it you just need to provide the amount of mana you want the recipe to consume/produce.

This requirement is available in both `input` and `output` modes.

In input mode : When starting to craft the recipe, the machine will consume the specified amount of mana from the machine [mana component](https://alec.gitbook.io/custom-machinery-botania-1.19/creating-custom-machines/machine-components/mana-component).

In output mode : When starting to craft the recipe, the machine will produce the specified amount of mana and put it in the machine [mana component](https://alec.gitbook.io/custom-machinery-botania-1.19/creating-custom-machines/machine-components/mana-component).

The requirement type of mana requirement is : "`custommachinery:mana"`.

### Properties

The Mana Requirement has 3 mandatory property.

#### Mandatory properties

```json
"type": "custommachinery:mana" //Mandatory to define an mana requirement.
```

<details>

<summary>Mode</summary>

#### Name : `mode`

#### Description :

Define the I/O mode of the requirement.

* `input` The requirement will consume mana at the start of the crafting process.
* `output` The requirement will produce mana at the end of the crafting process.

#### Example :

```json
"mode": "input"
```

The requirement will consume mana at the start of the crafting process.

</details>

<details>

<summary>Mana</summary>

#### Name : `mana`

#### Description :&#x20;

A positive integer value that define the amount of mana the recipe will consume/produce.&#x20;

It can be any positive number but remember that the machine [mana component](https://alec.gitbook.io/custom-machinery-botania-1.19/creating-custom-machines/machine-components/mana-component) must be able to store at least this amount of mana.

#### Example :&#x20;

```json
"mana": 1000
```

The recipe will consume/produce 1000 mana.

</details>

### Example

A mana requirement that will make the recipe produce 2672 mana:

```json
{
    "type": "custommachinery:mana",
    "mode": "output",
    "mana": 2672
}
```

A mana requirement that will make the recipe consume 100 mana:

```json
{
    "type": "custommachinery:mana",
    "mode": "input",
    "mana": 100
}
```
