Repository navigation
HUD and UI
minewright-hud puts information on a Bedrock player's screen from an add-on. Its outcome: on-screen information that works on every platform with the vanilla title and actionbar, plus, only when asked, a JSON UI layer that improves it and can break without making the game unplayable.
Files: skills/minewright-hud/SKILL.md. Tier fast: the move from JSON UI to Ore UI changes screens without notice, so the skill re-checks every three days (Research and freshness).
Stable Script API that works on every platform with no resource pack. From the skill:
player.onScreenDisplay.setTitle("Find: Diamond", {
subtitle: "30:00", fadeInDuration: 10, stayDuration: 60, fadeOutDuration: 10 }); // ticks
player.onScreenDisplay.setActionBar("Diamond 29:41");- The actionbar fades, so the game loop refreshes it every 10 to 20 ticks.
-
setHudVisibility,hideAllExceptandresetHudElementsVisibilitywith theHudElementenum (stable since 1.11.0) hide or show vanilla HUD parts. The skill always restores them when the round ends. - Text must make sense alone: if the JSON UI layer breaks, this is what players see.
JSON UI is the resource-pack UI language, and hud_screen.json is still JSON UI in Mojang's current samples (updated for 1.26.50). But the community wiki warns that Ore UI, which resource packs cannot modify, is replacing it, and Mojang has published no timeline. The hotbar selector has already moved, and emojis and custom glyphs do not render on Ore UI screens. So the skill uses JSON UI only for polish, only on the HUD, always over layer 1, and tells you that risk in one line before writing any.
The pattern, from wiki.bedrock.dev and Mojang's own item-name popup:
- The script sends a title whose text is a short marker prefix plus the texture path, with the readable name in the subtitle:
setTitle("gj_item:textures/items/diamond", { subtitle: "Diamond" }). - A hidden
data_controlinhud_screen.jsonkeeps the last title in aproperty_bag(the "Preserve Title Texts" pattern), so it stays after the title fades. - A control shows when the preserved string starts with the prefix, strips it, and plays
offsetandalphaanimations. - Strings become numbers with
0 + #str; the older#str * 1no longer works in some versions. - Change the vanilla file with
modifications, not a whole replacement. To hide the vanilla title for marker titles only,replacethetitle_framecontrol. - Put the image inside the factory-created
hud_title_text, so the animation replays for every title. - A hidden control stops its children's bindings: keep the
data_controlunder an always-visible parent, and switch the image to a transparent texture rather than hiding it.
Steps 5 to 7 came from building the example add-on and have not been seen in the game yet.
No JSON UI control renders an item by id. The options, best first:
- An
imagecontrol bound to the vanilla texture path. Build the id-to-path map fromitem_texture.jsoninMojang/bedrock-samples, never by guessing: the keys often differ from item ids (wheat_seedsisseeds_wheat,sugar_caneisreeds,beefisbeef_raw,totem_of_undyingistotem). Some keys hold several paths, and the compass and clock are animated atlases that look wrong as a still. Pin the map with a unit test against a saved copy, as the example does intest/fixtures/vanilla-item-textures.json. - Custom font glyphs. They render inline in titles and chat but are unofficial and fail on Ore UI screens.
- Text only, which always works.
@minecraft/server-ui (ActionFormData, MessageFormData, ModalFormData) takes over the screen and waits for an answer. It suits settings and confirmations an operator opens, not anything that must stay visible during play.
Static checks parse ui/*.json like any other pack file. Then it is the game's turn: the vanilla layer alone (resource pack off), then with JSON UI, at the smallest and largest GUI scale, and on a phone screen if players use one. Bedrock Dedicated Server cannot test any of this. Alpha animations stay under three cycles a second.
This wiki describes minewright 0.1.0 (no release tag yet) and was last updated on 2026-10-27. The plugin is MIT licensed. Report problems in the issues.
Using it
The skills
How it stays current
Contributing
Elsewhere