📦 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.

📌 Currently supports four screens: Title Screen (title_screen), Game Selection Screen (game_selection_screen), Pause Screen (pause_screen) and Death Screen (death_screen). Mod name is SIRIUS Ui.

Overview

SIRIUS Ui replaces hardcoded screens with a JSON‑based dynamic rendering system. Resource packs can override the following 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:

Background (panorama)

Three forms are supported:

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:

FieldTypeDescription
xstring (expression)Rectangle top‑left X coordinate
ystring (expression)Rectangle top‑left Y coordinate
widthstring (expression)Rectangle width
heightstring (expression)Rectangle height
colorstringColor format: "#RRGGBB", "0xRRGGBB" or "0xAARRGGBB" (with alpha)
commentstringOptional 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).

FieldTypeRequiredDescription
typestringYesMust be "logo"
texturestringYesTexture identifier, e.g. "sirius_ui:textures/gui/logo.png"
positionobjectYesContains x and y (expression strings), top‑left corner of the image
sizeobjectYesContains 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.

FieldTypeRequiredDescription
typestringYesMust be "button"
stylestringYesIdentifier of the button style file, e.g. "sirius_ui:buttons/default.json"
positionobjectYesx and y expressions, top‑left corner of the button
sizeobjectYeswidth and height (integers), button dimensions
actionobjectYesDefines the action when clicked, see Actions section
text_keystringNoOverrides the text key defined in the style file, for dynamic button text
enabledbooleanNoDefault 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.

FieldTypeRequiredDescription
typestringYesMust be "text"
text_keystringConditionalLocalization key (e.g. "menu.paused"). Required if dynamicType is not provided.
dynamicTypestringConditionalDynamic data type. Possible values:
"score" – player's current score (raw number)
"death_cause" – death cause text (death screen only)
"player_name" – player's name
If provided and text_key is absent, only the dynamic value is shown. If both are provided, text_key is ignored.
positionobjectYesx 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)
colorstringNoColor, same format as background layers, default "#FFFFFF" (white)
shadowbooleanNoWhether to draw text shadow, default true
scalefloatNoText scaling factor, default 1.0. Example: "scale": 1.5 enlarges by 50%.
💡 Tip: To display the vanilla‑style “Score: 123”, use two text elements: one with "text_key": "deathScreen.score" (outputs “Score: ”) and another with "dynamicType": "score" (outputs the number), then position them side by side.

Only used on the title screen, for copyright text at the bottom. Object fields:

FieldTypeDescription
textKeystringLocalization key
positionobjectx and y expressions, top‑left corner of the text
colorstringColor, default "#808080"

Button Style

A button style file (e.g. buttons/default.json) must contain a top‑level object button with the following fields:

FieldTypeDescription
text_keystringDefault localization key for the button text (can be overridden by the button element's text_key)
textureobjectContains normal, hovered, disabled fields – texture identifiers (without .png). Textures must be placed under assets/namespace/textures/gui/sprites/.
text_colorstring or intNormal state text color, recommended to use a string like "#FFFFFF"
hover_text_colorstring or intHover state text color
disabled_text_colorstring or intDisabled state text color
text_offset_xstring (expression)X offset of text relative to button's top‑left corner, default "center" (horizontal center)
text_offset_ystring (expression)Y offset of text relative to button's top‑left corner, recommended "(height - elementHeight)/2" for vertical centering
📌 Note: Button textures use nine‑slice scaling. You need to define 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:

typeParametersDescription
open_screenscreenIdOpens a screen. Predefined screenIds include: singleplayer, multiplayer, options, realms, selectGame, language, accessibility, advancements, stats, share_to_lan, player_social, etc.
quit_gamenoneExits the game
close_screennoneCloses current screen and returns to the parent screen (if any)
resume_gamenoneResumes the game, closes pause screen and releases mouse (for pause screen)
disconnectnoneDisconnects from current world and returns to title screen
open_linkurlOpens an external link, shows a confirmation dialog first. Example: { "type": "open_link", "url": "https://example.com" }
respawnnoneRespawns the player (for death screen)
exit_to_titlenoneExits 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.

X+ Y+ (0,0) Element top‑left (x,y)

▲ Origin at top‑left, X right, Y down.

Element Anchor

The position field defines the top‑left corner of the element, not its center.

⚠️ Common mistake: "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:

Operators: + - * / ( ), integer division truncates. Shortcuts:

Common Alignment Formulas

EffectX ExpressionY Expression
Horizontal center"center" or "(width - elementWidth)/2"any
Vertical centerany"(height - elementHeight)/2"
Fully centered"center""(height - elementHeight)/2"
Top‑left offset (20,20)2020
Top‑right, 20px from right edge"width - elementWidth - 20"20
Bottom‑left, 30px from bottom edge20"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

IssuePossible Cause & Solution
Button does nothingCheck action and screenId; ensure enabled is true (default true).
Texture shows pink/black checkerboardWrong 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 showingCheck color format (e.g. "#RRGGBB" or "0xAARRGGBB") and that coordinates/size are within screen bounds.
Custom panorama not showingConfirm panorama.type is "image", texture path includes correct namespace and file, and the image exists.
Text color invisible or transparentEnsure 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 showingCheck spelling of dynamicType, and that the screen supports it (e.g. death_cause only works on death screen).
Changes to JSON not appliedSince 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 centeredCheck that text_offset_y in the style file is set to "(height - elementHeight)/2".
🔧 Press F3+T to quickly reload resource packs – very handy for layout debugging.
📢 Version 0.3.1 Important Changes: Color values must be quoted strings (e.g. "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.