Hud Render

Data Type.

An Object used to define how a resource or cooldown bar should be rendered.

Fields:

Field Type Default Description
should_render Boolean true Whether the bar should be visible or not.
sprite_location Identifier "apoli:textures/gui/resource_bar.png" The path to the file in the assets which contains what the bar looks like. The base mod doesnt include any bars, but you can create your own using resource packs.
bar_index Integer 0 The indexed position of the bar on the sprite to use. Please note that indexes start at 0.
condition Entity Condition optional If set (and should_render is true), the bar will only display when the entity with the power fulfills this condition.
inverted Boolean false If set to true, inverts the way the hud render process (it'll look like its value is being decreased).

Examples:

"hud_render": {
    "bar_index": 4,
    "condition": {
        "type": "apoli:power_active",
        "power": "origins:phantomize"
    }
}

This definition shows the resource/cooldown as the Elytrian bar (white and with a wings icon), but only while the player is phantomized.

"hud_render": {
    "sprite_location": "origins:textures/gui/community/spiderkolo/resource_bar_03.png",
    "bar_index": 5
}

This definition shows the resource/cooldown as a white bar with a bone icon.