Hud Render
An Object used to define how a resource or cooldown bar should be rendered.
Caution
The entity condition specified in the condition
field is only evaluated on the client-side, therefore, using entity condition types that only work on the server-side will not work.
Fields
Field | Type | Default | Description |
---|---|---|---|
should_render |
Boolean | true |
Whether the bar should be visible or not. |
sprite_location |
Identifier | "origins:textures/gui/resource_bar.png" |
The path to the file in the assets which contains what the bar looks like. See the List of sprites for a list of files included by default in the mod. |
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 Type | 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": "origins: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.