Fuel element
Customize the fuel burning icon in the machine gui.
Fuel element is 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 wanted.
Properties
The fuel element has 3 mandatory properties and 8 optional properties :
Mandatory properties
"type": "custommachinery:fuel" //Mandatory to define a fuel element.Optional properties
Priority
Name : priority
priorityDescription :
An integer property that define the priority of the Element to be rendered.
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 :
The element will be rendered under each element that have a priority lower than 1000.
Empty texture
Name : texture_empty
texture_emptyDescription :
Point to a texture to use as the empty element texture. The texture must be loaded in-game with a resource pack or a loader mod.
The texture can be any size, if the texture size is different from the default size the width and height properties of the element will be automatically changed to fit the texture size if not provided.
If the width and/or height properties of the element are provided, the texture will be stretched to fit the dimensions of the element (it can render weirdly in that case).
Default :
Example :
The element will search for a texture located in assets/namespace/textures/fuel_element_texture_empty.png
The .png extension is mandatory.
Filled texture
Name : texture_filled
texture_filledDescription :
Point to a texture to use as the filled element texture. The texture must be loaded in-game with a resource pack or a loader mod.
The texture can be any size, if the texture size is different from the default size the width and height properties of the element will be automatically changed to fit the texture size if not provided.
If the width and/or height properties of the element are provided, the texture will be stretched to fit the dimensions of the element (it can render weirdly in that case).
Default :
Example :
The element will search for a texture located in assets/namespace/textures/fuel_element_texture_filled.png
The .png extension is mandatory.
Tooltips
Name : tooltips
tooltipsDescription :
A list of Text components 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 :
Replace the default tooltips with a single line that say "Click me !" :
Example
A basic fuel element :
Result :
On the image below the Machine was given 1 coal which have a burn time of 1600 ticks and the screenshot was taken at 913 ticks of burn time remaining so the fuel bar was filled at about 55%

Last updated