Skip to content

Progress Bar Element

Frinn38 edited this page Nov 11, 2021 · 6 revisions

The Progress Bar Element is used to render a progress bar in the Machine GUI (see the arrow that is slowly filled in the furnace GUI while smelting ? That's a Progress Bar).

Progress Bar Elements are defined in json with : "type": "custommachinery:progress".

You can add as much Progress Bar Elements as you want but they will all be filled at the same time since the machine can only process 1 recipe at a time.

When hovering the progress bar in jei with advanced item tooltips enabled (F3 + H), the progress bar tooltip will display the recipe ID. You can disable the need of enabling item tooltips in the config by setting needAdvancedInfoForRecipeID to false.

Properties

Beside the 3 mandatory properties (type/x/y) and the 3 optional properties (width/height/priority) the Progress Bar Element have 3 optional property.

Empty Texture (Optional)

Description : The texture that will be rendered for the empty part of the Progress Bar Element.

Default : custommachinery:textures/gui/base_progress_empty.png The default empty texture provided by Custom Machinery.

Example : "emptyTexture": "namespace:textures/empty_texture.png" The texture loader will use the file assets/namespace/textures/empty_texture.png as the Progress Bar Element empty texture.

Filled Texture

Description : The texture that will be rendered for the filled part of the Progress Bar Element.

Default : custommachinery:textures/gui/base_progress_filled.png The default filled texture provided by Custom Machinery.

Example : "filledTexture": "namespace:textures/filled_texture.png" The texture loader will use the file assets/namespace/textures/filled_texture.png as the Progress Bar Element filled texture.

direction

Description : The direction (right/left/top/bottom) of the arrow. When the recipe is processing the arrow will fill to this direction (from the opposite).

Default : right The arrow point to the right and is filled from the left to the right.

Example : "direction": "bottom" The arrow point to the bottom and is filled from the top to the bottom.

Note : If using custom textures they will not be rotated, but they will be filled according to the specified direction.

Note

If specified, the empty and filled textures must have the same size !

If JEI is installed you can click on the Progress Bar Element to display in JEI all the recipes for this machine.

Example

A basic Progress Bar Element using the default textures :

{
    "type": "custommachinery:progress",
    "x": 116,
    "y": 50
}

Result :

progress_bar_element

Clone this wiki locally