Repository navigation
Custom HUD
One JSON file adds one element to the screen. Players place, resize and hide it with the HUD editor (F7), like any other element. Everything is read on the client: it works on servers that do not have the mod.
- Create
config/proscenium/elements/vitals.jsonin your game folder. - Paste the file below.
- In game, press F3+T. Press F7 to move it.
{
"version": 1,
"name": "Vitals",
"anchor": "top_left", "x": 4, "y": 4,
"width": 120, "height": 30,
"parts": [
{ "type": "item", "x": 0, "y": 0, "item": "minecraft:compass" },
{ "type": "text", "x": 20, "y": 4, "text": "{x} {y} {z}" },
{ "type": "bar", "x": 0, "y": 20, "width": 100, "height": 5, "value": "health", "max": "max_health",
"color": "D0453A", "background": "301010" },
{ "type": "text", "x": 104, "y": 19, "text": "LOW", "color": "FF6B6B",
"when": { "var": "health", "below": 7 } }
]
}The vitals.json example, when health is low:

The equipment.json example: worn armor, uses left, ping and frame rate.

More complete examples: docs/examples.
| You are | Folder | Element identifier |
|---|---|---|
| A modpack maker | config/proscenium/elements/<name>.json |
custom:<name> |
| A mod or resource pack author | assets/<namespace>/proscenium/hud/<name>.json |
<namespace>:<name> |
- File names use lower case letters, digits,
_,-and.. - Images are resource pack textures in both cases.
- F3+T reads both folders again.
- A resource pack higher in the list replaces a file of the same name.
- The player's layout is saved in
config/proscenium/hud/<namespace>.json(custom.jsonfor the config folder). - A default layout for your elements can be shipped in
assets/<namespace>/ui/hud.json, see HUD editor.
When files exist, the built-in showcase of Proscenium steps aside: your main menu stays.
| Field | Required | Default | Meaning |
|---|---|---|---|
version |
yes | Always 1
|
|
width, height
|
yes | Size of the element, in interface pixels: used to place it | |
parts |
yes | 1 to 64 parts, drawn in order | |
name |
no | file name | Name in the editor: a text, or { "translate": "key" }
|
anchor |
no | top_left |
top_left, top, top_right, left, center, right, bottom_left, bottom, bottom_right
|
x, y
|
no | 0 | Offset from the anchor; negative goes left or up |
scale |
no | 1 | 0.5 to 2 |
visible |
no | true |
false: hidden until the player shows it |
enlarge |
no | false | Also grows on screens that are large for the interface scale |
when |
no | always | Condition for the whole element |
Every part has a type, and accepts x, y (from the top left of the element, default 0) and when.
| Field | Required | Default | Meaning |
|---|---|---|---|
text |
yes, or translate
|
Text with variables: {health}, {x:1}, {{ for a brace |
|
translate |
Translation key of your resource pack; the translation may hold variables | ||
color |
no | FFFFFF |
RRGGBB or AARRGGBB
|
shadow |
no | true | |
align |
no | left |
left, center, right: which end of the text sits at x
|
| Field | Required | Default | Meaning |
|---|---|---|---|
value, max
|
yes | A number, or the name of a variable | |
width, height
|
yes | ||
color |
no | FFFFFF |
Fill color |
texture |
no | Image uncovered by the value, instead of a color; its size is the bar's | |
background |
no | none | Color behind the bar |
direction |
no | right |
Where the bar grows: right, left, up, down
|
| Field | Required | Default | Meaning |
|---|---|---|---|
texture |
yes | namespace:textures/gui/file.png |
|
width, height
|
yes | Size drawn | |
u, v
|
no | 0 | Top left of the region in the image |
textureWidth, textureHeight
|
no |
width, height
|
Size of the whole image, for sprite sheets |
| Field | Required | Default | Meaning |
|---|---|---|---|
item |
yes, or slot
|
Item identifier | |
slot |
mainhand, offhand, head, chest, legs, feet: what the player wears |
||
count |
no | false | Also draws the stack size and the durability bar |
A wrong file drops its own element only. The log (logs/latest.log) gives the file, the field and the reason:
HUD element custom:vitals ignored (.../vitals.json): parts[1].value: expected a number or a variable, got "mana"
JSON files run no code. In the editor, every element is shown with sample values and conditions are ignored, so that you can place what is not visible right now.
Several styles per element, lists and loops, calculations, animations, server data (scoreboard, NBT), images read outside resource packs, an in-game content editor, screens and buttons (planned for 0.5).