Skip to content

Fuel Element

Frinn38 edited this page May 5, 2021 · 4 revisions

Fuel Element are used to render a fuel bar on the Machine GUI.

Fuel Elements are defined in json with : "type": "custommachinery:fuel".

You can add as many Fuel Element as you want to the machine GUI but they will all show the same burn time and be filled the same.

By default the texture is the same as the vanilla furnace little flame but you can change it if needed.

Properties

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

Empty Texture (Optional)

Description : The Fuel bar empty texture to be rendered on the GUI defined with namespace:path/to/the/texture.png

Example : "emptytexture": "custommachinery:textures/gui/base_fuel_empty.png" The default fuel element empty texture.

Filled Texture (Optional)

Description : The Fuel bar filled texture to be rendered on the GUI defined with namespace:path/to/the/texture.png.

Example : "filledtexture": "custommachinery:textures/gui/base_fuel_fille.png" The default fuel element filled texture.

Example

A basic Fuel Element :

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

Result :

On the image below the Machine was given 1 coal which have a brun time of 1600 ticks and the screenshot was taken at 913 ticks of burntime remaining so the fuel bar was filled at about 55%

Fuel Element

Clone this wiki locally