Rules: When JSON UI does not fit
scripts/gen-rules.mjs builds this page from rules/*.json. Do not edit it by hand; edit the JSON and run npm run gen-rules. The rule bullets on topic pages (- **[ID]**) are filled from the same source.
Explanations and examples are on the topic page When JSON UI does not fit.
| ID | Rule | Level | Evidence environment | Source |
|---|---|---|---|---|
| ALT-01 | Displays that must follow a 3D position (a number above a head, a hit indicator) cannot be built with JSON UI. Use particles or entities. | code (source), inferred | - | DI chapters 0, 5 and 6-1 |
| ALT-02 | For display only, a method that does not touch vanilla UI files wins on compatibility. Choose a JSON UI reskin when interaction is needed. | inferred | - | DI 6-8, BA 6, AP 5 |
| ALT-03 | Numbers are drawn with a glyph atlas: put square cells in one horizontal row (DI: 1024x64, 12 of 16 cells of 64px for 0-9 - .) and draw the characters in white. Give the particle's uv as ["variable.glyph * 64", 0] and uv_size [64, 64] and one variable picks the character. The color is applied by tint, so one texture produces several colors. | code (source) | - | DI 4.1 and 4.2 |
| ALT-04 | The script's MolangVariableMap.setColorRGBA("variable.tint", c) expands into the four values variable.tint.r/.g/.b/.a. In a tint gradient, giving RGB as variables and only alpha as keyframes separates color and fade. | code (source) | - | DI 4.2 and 4.3 |
| ALT-05 | For translucency use material: particles_blend, for cutout particles_alpha. | code (source) | - | DI 4.3 |
| ALT-06 | If it should be seen by only one player, use Player.spawnParticle (to the attacker only), and for everyone nearby Dimension.spawnParticle. | code (source), inferred | - | DI 4.6 |
| ALT-07 | For multi-character strings, push by (i - (n-1)/2) x spacing along the camera-relative right vector right = (-view.z, 0, view.x) to center them, and set the particle to facing_camera_mode: lookat_xyz. To avoid overlap on rapid hits, pick the candidate position farthest from recent positions. | code (source) | - | DI 4.5 |
| ALT-08 | One particle is created per character, so with many targets, such as an area attack, the count grows fast. | inferred | - | DI chapter 7 |
| ALT-09 | The same idea, "on a surface that cannot draw text directly, pick glyphs with a numeric code", exists in two places: particles (a variable picks a UV cell) and chest slots (stack count to lang key, lang key to character, TXT-12). Both use a fixed character table and discard characters outside it. | code (source) | - | DI 5.1, BC 4.3-(3) |
| ALT-10 | "The shape is fixed and only values change": both the particle definition and compiled JSON UI are static and the runtime sends only values. If you keep layout calculation as a pure function separate from the game API, you can share the same code with a web preview or editor (tabLayout.js of BA). | code (source) | - | DI 5.1, BC chapters 1 and 3.2, BA chapter 1 |
| ALT-11 | From 26.64, resource packs cannot change Ore UI files. 26.64 blocked resource pack access to Ore UI for a security reason (community report). The rest of this rule is the behavior up to 26.63. Ore UI screens are bundles of minified JS, CSS and HTML with hashes in the install folder data/gui/dist/hbui/. When the engine looks for an Ore UI file (ui://…), it looks at the pack stack before the install folder, but only at trusted packs. Trust is decided by the form the pack is opened as, and neither the UUID nor a marketplace signature is looked at. With plaintext packs (plain zip and folder packs) only built-in packs in the install folder are trusted, so ordinary resource packs and plaintext server packs cannot change layout, behavior or CSS. The three encrypted pack strategies are always trusted, so the hbui/<file> of a pack opened with that strategy changes the HTML, JS and CSS of the in-game Ore UI pages (gameplay.html: death, bed, inventory, DDUI, trade and block screens). There are two ways to open it that way. (1) Without a server: if you put a 0-byte empty file content.zipe in the root of a local resource pack folder, the engine opens that pack as an encrypted folder pack. The engine only checks whether this file exists, and reads the plaintext files of the pack folder as they are without a key. When importing as a .mcpack, manifest.json and content.zipe must be directly at the top of the zip (one level deeper and the import fails with no message). A pack that carries the same fake encryption header in contents.json does not change. (2) A pack the server encrypts with any 32-byte content key and sends with the key (measured that sending the same pack as plaintext does not change anything). The JS of this page can read and write the vanilla DDUI data store, build a screen drawn according to the layout the server sent, and get presses and input back (OL chapters 3 and 6~9). The changed gameplay.html contains the hashed file names of the vanilla bundle, so match them to the install at every game update. A tool that patches the client install folder directly (OUC) applies only to that client and must be reapplied at every update. | code (source), measured | unknown | OUC chapters 2 and 3, OL chapters 3, 6, 7, 8 and 9, community |
| ALT-12 | When Ore UI uses game textures, it requests them with pack://textures/…png URLs, and this path resolves even for textures of an untrusted server pack (measured with button textures). So a resource pack that changes textures should also be reflected in Ore UI's item and block icons (the icons themselves were not checked separately). The bundle's own images (/hbui/assets/) and fonts (gui/dist/hbui/fonts) are read from the install folder and are not changed by packs. | code (source), measured, inferred | unknown | OUC chapters 3 and 4.6, OL chapters 4 and 6 |
| ALT-13 | There is a facet vanilla.screenTechStack (getTechStackForScreen, getPreferredTechStackForScreen, selectTechStackForScreen) that chooses per screen whether to use JSON UI or Ore UI. For a screen where both implementations coexist, JSON UI modifications are assumed to show only when the JSON UI side is chosen, and if a modification does not show, first check which side that screen opened with. The selector of the Windows 1.26.65.1 client records 14 paths (/play, /main-menu, /pre-start, /create-new-world, /start-from-template, /edit-world, /gameplay/death, /player-permissions, /send-invites, /gameplay/bedtime, /settings, /safezone, /oreui-marketplace/wishlist, /oreui-marketplace/search); each path has two condition functions, and the default result is true when both are true. The condition table is in the Ore UI overview. | code (source), inferred | - | OUC chapter 0 |
| ALT-14 | The data channel of Ore UI is a facet, not a binding (sending engine.trigger("facet:request", name) brings back facet:updated:<name>). The existence of vanilla.gameplay.* facets for in-game screens (furnace progress, container items and size, death info, respawn, bed, coordinate HUD, etc.) is a signal that those screens are moving to Ore UI or have moved. Reskinning such a screen with JSON UI should account for the risk of migration. | code (source), inferred | - | OUC chapter 3 |
| ALT-15 | The engine resolves two JSON UI definitions from the pack stack and passes them through the facet vanilla.resourcePackOverrides to the in-game Ore UI (the whole gameplay.html: death, bed, inventory, DDUI, trade and so on). From the child controls default, hover, pressed and locked of common_buttons.light_text_button it takes $new_ui_button_texture (background, including the nine-slice), $text_color (text color) and $border_color (border color), and from common_buttons.focus_border it takes texture, and applies them to the default, hover/focus, pressed/selected and disabled states of primary and secondary buttons. So a pack that changes $light_button_*_text_color in _global_variables.json or textures/ui/button_borderless_light*.png also changes the Ore UI death screen buttons (measured with a server pack). No other definitions or properties are passed, and the out-of-game menu bundle does not use this facet. | code (source), measured | unknown | OL chapters 4 and 6 |
| ALT-16 | DDUI layouts (ddui/root/*.json = minecraft:ui-root, ddui/composition = minecraft:ui-composition) are read from resource pack folders, but the engine reads only packs marked as game built-in (first-party) packs (the same flag as the POI's minecraft: namespace allowance check). Even if you put ddui/root/custom_form.json in a user or server pack, it will probably not be used. JS already handles layouts from a non-vanilla source pack (isCreatorDataDriven, only its own pack's images allowed), so it is a route that would open if the engine check were lifted. | code (source), inferred | - | OL chapter 5 |
Proposed rules
These proposals are not merged into the adopted rules yet. Check the evidence before using them.
| ID | Rule | Level | Evidence environment | Source |
|---|---|---|---|---|
| ALT-17 | If you put query.is_in_ui in an entity render controller condition, extra geometry is drawn only inside UI player renderers (live_player_renderer, etc.). Using query.camera_rotation for bone rotation makes a 3D display (coordinate axes) on the HUD that turns following the camera. | working pack, unverified | - | SP |
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 | |
private-research | Private research (-) | - | 2026-11-13 |