Skip to content

Status Element

Frinn38 edited this page Jul 30, 2021 · 4 revisions

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.

idle_textureIDLE mean the machine can't craft any recipes (because of missing inputs)

running_textureRUNNING mean the machine is currently processing a recipe

errored_textureERRORED 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

Beside the 3 mandatory properties (type/x/y) and the 3 optional properties (width/height/priority) the Status Element 3 optional properties.

Idle Texture (Optional)

Description : The location of the texture file the Status Element will display when the Machine Status is IDLE.

Default : custommachinery:textures/gui/base_status_idle.png The defalut Status IDLE texture provided by Custom Machinery.

Example : "idleTexture": "namespace:textures/status_idle_texture.png" The texture loader will use the file assets/namespace/textures/status_idle_texture.png as the status IDLE texture in the Machine GUI.

Running Texture (Optional)

Description : The location of the texture file the Status Element will display when the Machine Status is RUNNING.

Default : custommachinery:textures/gui/base_status_running.png The defalut Status RUNNING texture provided by Custom Machinery.

Example : "runningTexture": "namespace:textures/status_running_texture.png" The texture loader will use the file assets/namespace/textures/status_running_texture.png as the status RUNNING texture in the Machine GUI.

Errored Texture (Optional)

Description : The location of the texture file the Status Element will display when the Machine Status is ERRORED.

Default : custommachinery:textures/gui/base_status_errored.png The defalut Status ERRORED texture provided by Custom Machinery.

Example : "erroredTexture": "namespace:textures/status_errored_texture.png" The texture loader will use the file assets/namespace/textures/status_errored_texture.png as the status ERRORED texture in the Machine GUI.

Notes

If specified the 3 textures idle/running/errored must be the same width and height or it may render the Status Element weirdly.

Example :

A basic Status Element with the default textures :

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

Result :

status_element

(Here the Custom Machine is IDLE if not obvious)

Clone this wiki locally