# Pressure component (PNC)

{% hint style="warning" %}
This component requires [Custom Machinery Pneumaticcraft](https://www.curseforge.com/minecraft/mc-mods/custom-machinery-pneumaticcraft) to be installed.
{% endhint %}

This is the component that let your machine interact with the PneumaticCraft pressure system, it is also compatible with any mods that make use of PneumaticCraft pressure.

{% hint style="warning" %}
Pressure component is defined as a **unique** machine component, meaning that you can only have 1 per machine.
{% endhint %}

If you try to define more than 1 pressure component only the first will be used.

The pressure component make use of the `config` property to configure which sides of the machine can handle pressure.

By default all sides will enable pressure.

Pressure component is defined with `"type": "custommachinery:pressure"` in the json.

### Properties

The pressure component has 4 mandatory properties and 1 optional property :&#x20;

#### Mandatory properties

```json
"type": "custommachinery:pressure" //Mandatory to define a pressure component.
```

<details>

<summary>Volume</summary>

#### Name : `volume`

#### Description :&#x20;

An positive integer property that define the air volume available in the machine.

PneumaticCraft calculate the pressure using the amount of air stored in the defined volume.

The higher the volume, the longer it will take to increase or decrease pressure.

Note : The machine can store an unlimited amount of compressed air, if the stored amount is over the specified volume then the pressure will increase.

#### Example :&#x20;

Set the volume to 10000mL.

```json
"volume": 10000
```

</details>

<details>

<summary>Danger</summary>

#### Name : `danger`&#x20;

#### Description :&#x20;

A positive decimal value, between 0.0bar and 25.0bar.

The start of the "red" pressure on the gauge, if the machine reach a pressure higher than this danger pressure it has a chance to explode.

### Example :&#x20;

Set the danger pressure to 3bar.

```json
"danger": 3.0
```

</details>

<details>

<summary>Critical</summary>

#### Name : `critical`&#x20;

#### Description :&#x20;

A positive decimal value, between 0.0bar and 25.0bar.

The highest pressure on the gauge, if the machine reach this danger pressure it will explode.

For practical reasons the critical pressure must be superior to the danger pressure.

### Example :&#x20;

Set the danger pressure to 3bar.

```json
"danger": 3.0
```

</details>

#### Optional property

{% content-ref url="../../misc/toggle-config" %}
[toggle-config](https://frinn.gitbook.io/custom-machinery-1.21/misc/toggle-config)
{% endcontent-ref %}

### Example

A basic pressure component :&#x20;

```json
{
    "type": "custommachinery:pressure",
    "volume": 10000,
    "danger": 3,
    "critical": 5
}
```
