📦 SIRIUS Ui Wiki
Minecraft 26.1.1 | Data-Driven UI Framework (Version 0.3.1)
SIRIUS Ui is a mod that allows you to customize Minecraft's Title Screen, Game Selection Screen, Pause Screen, and Death Screen using simple JSON configurations and texture assets. No Java coding required – easily add images, buttons, backgrounds, and dynamic layouts.
Overview
SIRIUS Ui replaces hardcoded screens with a JSON‑based dynamic rendering system. Resource packs can override the following files:
assets/sirius_ui/screens/title_screen.json— Title Screen layoutassets/sirius_ui/screens/game_selection_screen.json— Game Selection Screen layoutassets/sirius_ui/screens/pause_screen.json— Pause Screen layoutassets/sirius_ui/screens/death_screen.json— Death Screen layoutassets/sirius_ui/buttons/*.json— Button style definitions- Any PNG texture files
Resource Pack Structure
Your resource pack must follow this exact folder hierarchy:
📦 your-resource-pack/
└── 📁 assets/
└── 📁 sirius_ui/
├── 📁 screens/
│ ├── 📄 title_screen.json
│ ├── 📄 game_selection_screen.json
│ ├── 📄 pause_screen.json
│ └── 📄 death_screen.json
├── 📁 buttons/
│ ├── singleplayer.json
│ ├── multiplayer.json
│ └── ...
└── 📁 textures/
└── 📁 gui/
├── custom_logo.png
├── btn_normal.png
└── ...
└── 📄 pack.mcmeta
pack.mcmeta example:
{
"pack": {
"pack_format": 26,
"description": "SIRIUS Ui custom UI resource pack"
}
}
Screen Configuration
The root object of each screen JSON is screen, which can contain:
panorama— background configuration (object or string)graphicsDraw— array of background layers (optional)elements— array of UI elements (required)copyright— copyright text object (title screen only, optional)
Background (panorama)
Three forms are supported:
"panorama": "vanilla"— vanilla dynamic panorama background"panorama": "none"— solid black background"panorama": { "type": "image", "texture": "namespace:path/image" }— custom image, automatically scaled and centered to fill the screen (preserves aspect ratio, similar to CSS background-size: cover). Example texture path:"sirius_ui:textures/gui/background.png".
Background Layers (graphicsDraw)
graphicsDraw is an array of colored rectangles drawn between the background and regular elements. Useful for masks, decorative lines, semi‑transparent overlays, etc. Each rectangle object contains:
| Field | Type | Description |
|---|---|---|
x | string (expression) | Rectangle top‑left X coordinate |
y | string (expression) | Rectangle top‑left Y coordinate |
width | string (expression) | Rectangle width |
height | string (expression) | Rectangle height |
color | string | Color format: "#RRGGBB", "0xRRGGBB" or "0xAARRGGBB" (with alpha) |
comment | string | Optional comment, ignored by the parser |
Elements (elements)
The elements array can contain objects of the following three types, each must have a "type" field to distinguish the type.
🖼️ Logo Element (type: "logo")
Displays a static image (e.g. mod logo, decoration).
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "logo" |
texture | string | Yes | Texture identifier, e.g. "sirius_ui:textures/gui/logo.png" |
position | object | Yes | Contains x and y (expression strings), top‑left corner of the image |
size | object | Yes | Contains width and height (integers), display size of the image in pixels |
🔘 Button Element (type: "button")
Interactive button with support for different state textures, text, and actions.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "button" |
style | string | Yes | Identifier of the button style file, e.g. "sirius_ui:buttons/default.json" |
position | object | Yes | x and y expressions, top‑left corner of the button |
size | object | Yes | width and height (integers), button dimensions |
action | object | Yes | Defines the action when clicked, see Actions section |
text_key | string | No | Overrides the text key defined in the style file, for dynamic button text |
enabled | boolean | No | Default true, set to false to disable the button (shows disabled texture and not clickable) |
📝 Text Element (type: "text")
Displays text, supports static localization keys, dynamic game data, scaling, shadow, and custom color.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "text" |
text_key | string | Conditional | Localization key (e.g. "menu.paused"). Required if dynamicType is not provided. |
dynamicType | string | Conditional | Dynamic data type. Possible values: • "score" – player's current score (raw number)• "death_cause" – death cause text (death screen only)• "player_name" – player's nameIf provided and text_key is absent, only the dynamic value is shown. If both are provided, text_key is ignored. |
position | object | Yes | x and y expressions, top‑left corner of the text (note: the actual width/height of text is determined by rendered content; you can use elementWidth/elementHeight in expressions) |
color | string | No | Color, same format as background layers, default "#FFFFFF" (white) |
shadow | boolean | No | Whether to draw text shadow, default true |
scale | float | No | Text scaling factor, default 1.0. Example: "scale": 1.5 enlarges by 50%. |
"text_key": "deathScreen.score" (outputs “Score: ”) and another with "dynamicType": "score" (outputs the number), then position them side by side.Copyright (copyright)
Only used on the title screen, for copyright text at the bottom. Object fields:
| Field | Type | Description |
|---|---|---|
textKey | string | Localization key |
position | object | x and y expressions, top‑left corner of the text |
color | string | Color, default "#808080" |
Button Style
A button style file (e.g. buttons/default.json) must contain a top‑level object button with the following fields:
| Field | Type | Description |
|---|---|---|
text_key | string | Default localization key for the button text (can be overridden by the button element's text_key) |
texture | object | Contains normal, hovered, disabled fields – texture identifiers (without .png). Textures must be placed under assets/namespace/textures/gui/sprites/. |
text_color | string or int | Normal state text color, recommended to use a string like "#FFFFFF" |
hover_text_color | string or int | Hover state text color |
disabled_text_color | string or int | Disabled state text color |
text_offset_x | string (expression) | X offset of text relative to button's top‑left corner, default "center" (horizontal center) |
text_offset_y | string (expression) | Y offset of text relative to button's top‑left corner, recommended "(height - elementHeight)/2" for vertical centering |
gui metadata (e.g., gui_metadata.json) or rely on default stretching. Vanilla button textures usually have nine‑slice already configured.Actions
The action field of a button is an object containing type and optional parameters. Supported action types:
| type | Parameters | Description |
|---|---|---|
open_screen | screenId | Opens a screen. Predefined screenIds include: singleplayer, multiplayer, options, realms, selectGame, language, accessibility, advancements, stats, share_to_lan, player_social, etc. |
quit_game | none | Exits the game |
close_screen | none | Closes current screen and returns to the parent screen (if any) |
resume_game | none | Resumes the game, closes pause screen and releases mouse (for pause screen) |
disconnect | none | Disconnects from current world and returns to title screen |
open_link | url | Opens an external link, shows a confirmation dialog first. Example: { "type": "open_link", "url": "https://example.com" } |
respawn | none | Respawns the player (for death screen) |
exit_to_title | none | Exits to title screen (for death screen) |
Coordinate System & Expressions
Origin
The origin (0,0) is at the top‑left corner of the screen. X increases to the right, Y increases downward.
▲ Origin at top‑left, X right, Y down.
Element Anchor
The position field defines the top‑left corner of the element, not its center.
"x": "width/2", "y": "height/2" does not center the element – it places the element's top‑left corner at the screen center.
Correct centering expressions:
"x": "(width - elementWidth)/2"
"y": "(height - elementHeight)/2"
Expression Variables & Operators
Supported variables:
width— current screen width (scaled pixels)height— current screen heightelementWidth— element's own width (for buttons, fromsize.width; for text, the rendered width, affected byscale)elementHeight— element's own height (similar)
Operators: + - * / ( ), integer division truncates. Shortcuts:
"center"→"(width - elementWidth)/2"(for x coordinate only)"bottom-20"→"height - elementHeight - 20"(for y coordinate only)
Common Alignment Formulas
| Effect | X Expression | Y Expression |
|---|---|---|
| Horizontal center | "center" or "(width - elementWidth)/2" | any |
| Vertical center | any | "(height - elementHeight)/2" |
| Fully centered | "center" | "(height - elementHeight)/2" |
| Top‑left offset (20,20) | 20 | 20 |
| Top‑right, 20px from right edge | "width - elementWidth - 20" | 20 |
| Bottom‑left, 30px from bottom edge | 20 | "height - elementHeight - 30" or "bottom-30" |
| Bottom‑right | "width - elementWidth - 15" | "height - elementHeight - 15" |
Configuration Examples
Complete death screen configuration demonstrating all features:
{
"screen": {
"panorama": "vanilla",
"graphicsDraw": [
{ "x": "0", "y": "0", "width": "width", "height": "height", "color": "#88000000" },
{ "x": "width/2 - 140", "y": "height/2", "width": 280, "height": 1, "color": "#88FF0000" }
],
"elements": [
{
"type": "text",
"text_key": "deathScreen.title",
"position": { "x": "center", "y": "height/5" },
"color": "#FF0000",
"scale": 2.5,
"shadow": true
},
{
"type": "text",
"dynamicType": "death_cause",
"position": { "x": "width/2 - 140", "y": "height/2 - 30" },
"color": "#FFFFFF"
},
{
"type": "text",
"dynamicType": "score",
"position": { "x": "width/2 + 140", "y": "height/2 - 30" },
"color": "#FFFFAA"
},
{
"type": "button",
"text_key": "deathScreen.respawn",
"style": "sirius_ui:buttons/death/button_re.json",
"position": { "x": "width/2 - 130", "y": "height * 3 / 4" },
"size": { "width": 120, "height": 20 },
"action": { "type": "respawn" }
},
{
"type": "button",
"text_key": "deathScreen.titleScreen",
"style": "sirius_ui:buttons/death/button_quit.json",
"position": { "x": "width/2 + 10", "y": "height * 3 / 4" },
"size": { "width": 120, "height": 20 },
"action": { "type": "exit_to_title" }
}
],
"copyright": {
"textKey": "auui.copyright",
"position": { "x": "width - 10", "y": "height - 10" },
"color": "#666666"
}
}
}
Troubleshooting
| Issue | Possible Cause & Solution |
|---|---|
| Button does nothing | Check action and screenId; ensure enabled is true (default true). |
| Texture shows pink/black checkerboard | Wrong path or missing file; verify the namespace and path, and that the .png extension is not included in the identifier. |
| Expression error "unknown variable" | Only width, height, elementWidth, elementHeight are allowed; check spelling. |
| Background layer not showing | Check color format (e.g. "#RRGGBB" or "0xAARRGGBB") and that coordinates/size are within screen bounds. |
| Custom panorama not showing | Confirm panorama.type is "image", texture path includes correct namespace and file, and the image exists. |
| Text color invisible or transparent | Ensure color is a quoted string, e.g. "#FFFFFF"; if using 0xFFFFFF format, quotes are required and 0x must be present. |
| Dynamic text (score/death cause) not showing | Check spelling of dynamicType, and that the screen supports it (e.g. death_cause only works on death screen). |
| Changes to JSON not applied | Since version 0.3.0, re‑opening the screen applies changes without restarting the game. If still not, press F3+T to reload resource pack. |
| Button text not centered | Check that text_offset_y in the style file is set to "(height - elementHeight)/2". |
"color": "#FFFFFF"), no longer support plain integers. Also added pause screen, death screen, dynamic text, text scaling, and many other powerful features. See the changelog included with the mod for details.