> 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/creating-custom-machines/machine-gui/pressure-element-pnc.md).

# Pressure element (PNC)

Add a pressure gauge in the machine gui

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

The pressure gui element is used to display the content of a [pressure component](/custom-machinery-1.21/creating-custom-machines/machine-components/pressure-component-pnc.md) present in the machine.

Pressure elements are defined in json with : `"type": "custommachinery:pressure"` .

Note that if you didn't set a pressure component in the machine json the pressure element will still work but will always show a value of 0.

### Properties

The pressure element has 3 mandatory properties and 5 optional properties :&#x20;

#### Mandatory properties

```json
"type": "custommachinery:pressure"
```

<details>

<summary>X</summary>

#### Name : `x`

#### Description :&#x20;

A positive integer value that define the x axis position of the element to be displayed on the Machine GUI.

#### Example :&#x20;

The element will be rendered 100px to the right from the top-left corner of the gui.

```json5
"x": 100
```

</details>

<details>

<summary>Y</summary>

#### Name : `y`

#### Description :&#x20;

A positive integer value that define the y axis position of the element to be displayed on the Machine GUI.

#### Example :&#x20;

The element will be rendered 100px to the bottom from the top-left corner of the gui.

```json5
"y": 100
```

</details>

#### Optional properties

<details>

<summary>Width</summary>

#### Name : `width`

#### Description :&#x20;

A positive integer value that define the width of the element on the Machine GUI.

#### Default :&#x20;

The same width as the texture specified in the `texture` property.

#### Example :&#x20;

The width of the element will be 100px.

```json5
"width": 100
```

</details>

<details>

<summary>Height</summary>

#### Name : `height`

#### Description :&#x20;

A positive integer value that define the height of the element on the Machine GUI.

#### Default :&#x20;

The same height as the texture specified in the `texture` property.

#### Example :&#x20;

The height of the element will be 100px.

```json5
"height": 100
```

</details>

<details>

<summary>Priority</summary>

#### Name : `priority`

#### Description :&#x20;

An integer property that define the priority of the Element to be rendered.&#x20;

Elements with higher priority will be rendered first. If 2 elements are at the same position the first to be rendered will be under and the last will be above.

#### Default : 0

#### Example :&#x20;

The element will be rendered under each element that have a priority lower than 1000.

```json5
"priority": 1000
```

</details>

<details>

<summary>Tooltips</summary>

#### Name : `tooltips`

#### Description :&#x20;

A list of [Text components](/custom-machinery-1.21/misc/text-component.md) that will be shown as tooltips when the player mouse cursor hover the element.

Each tooltips of the list will be a new line.

#### Example :&#x20;

Replace the default tooltips with a single line that say "Click me !" :&#x20;

```json
"tooltips": "Click me !"
```

</details>

<details>

<summary>Id</summary>

#### Name : `id`

#### Description :&#x20;

The id of this gui element. By default it does nothing and can be omitted.

This is really only useful if you intend to make a recipe that replace this element.

#### Default : `empty`

#### Example :&#x20;

The id of this element will be `pressure`

```json5
"id": "pressure"
```

</details>

### Example

A typical pressure gui element :&#x20;

```json
{
    "type": "custommachinery:pressure",
    "x": 20,
    "y": 20
}
```

Result :&#x20;

<figure><img src="https://3380432015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZznnGu8KvEhqjN3qmLqp%2Fuploads%2FDsrbAwLbiC9cO6uwHkh5%2Fpressure_element.png?alt=media&amp;token=ba7ec3dd-318f-43cf-a6db-7de0edb1113c" alt=""><figcaption><p>pressure gui element</p></figcaption></figure>
