# Status element

The status element is used to shown the crafting status of the custom machine in the Machine GUI.

Status element must be defined in json like : `"type": "custommachinery:status"`.

The crafting status of a custom machine can be `IDLE`, `RUNNING` or `ERRORED`.

![](/files/ILvKEi8HsnYb6MIiS5MG)`IDLE` mean the machine can't craft any recipes (because of missing inputs)

![running\_texture](/files/nEelk2omUBWrVkBjpP5b)`RUNNING` mean the machine is currently processing a recipe

![errored\_texture](/files/RdKzZ1amrHYSKmOwclLc)`ERRORED` mean the machine encountered an error while processing a recipe, the error message will be displayed as a tooltip when you hover the Status Element with your mouse.

### Properties

The status element has 3 mandatory properties and 7 optional properties :&#x20;

#### Mandatory properties

```json5
"type": "custommachinery:status" //Mandatory to define a status element.
```

<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 property

<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>Idle texture</summary>

#### Name : `texture_idle`

#### Description :&#x20;

The location of the texture file the status element will display when the machine status is IDLE.

#### Default :&#x20;

```json
"texture_idle": "custommachinery:textures/gui/base_status_idle.png"
```

#### Example :&#x20;

The texture loader will use the file `assets/namespace/textures/status_idle_texture.png` as the status IDLE texture in the machine GUI.

```json5
"texture_idle": "namespace:textures/status_idle_texture.png"
```

</details>

<details>

<summary>Running texture</summary>

#### Name : `texture_running`

#### Description :&#x20;

The location of the texture file the status element will display when the machine status is RUNNING.

#### Default :&#x20;

```json
"texture_running": "custommachinery:textures/gui/base_status_running.png"
```

#### Example :&#x20;

The texture loader will use the file `assets/namespace/textures/status_running_texture.png` as the status RUNNING texture in the machine GUI.

```json5
"texture_running": "namespace:textures/status_running_texture.png"
```

</details>

<details>

<summary>Errored texture</summary>

#### Name : `texture_errored`

#### Description :&#x20;

The location of the texture file the status element will display when the machine status is ERRORED.

#### Default :&#x20;

```json
"texture_errored": "custommachinery:textures/gui/base_status_errored.png"
```

#### Example :&#x20;

The texture loader will use the file `assets/namespace/textures/status_errored_texture.png` as the status ERRORED texture in the machine GUI.

```json5
"texture_errored": "namespace:textures/status_errored_texture.png"
```

</details>

<details>

<summary>Tooltips</summary>

#### Name : `tooltips`

#### Description :&#x20;

A list of [Text components](/custom-machinery-1.19/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>

### Example :

A basic status element with the default textures :

```json5
{
    "type": "custommachinery:status",
    "x": 20,
    "y": 20
}
```

Result :

![Status element idle texture](https://github.com/Frinn38/Custom-Machinery/raw/1.16.5/wiki/status_element.png)

(Here the Custom Machine is IDLE if not obvious)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://frinn.gitbook.io/custom-machinery-1.19/creating-custom-machines/machine-gui/status-element.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
