Modifying vanilla screens
Concept: three ways to modify vanilla
A resource pack does not replace a vanilla screen wholesale. The game stacks the packs' same-path files on top of the vanilla ui/ files in pack order and merges them. So whether you coexist with other packs depends on "what you write and how".
The Bedrock Wiki's best practices boil down to three principles (Source: bedrock-wiki, Best Practices).
-
Change only what you need. JSON UI is not versioned, so if Mojang changes vanilla, a pack can break. To turn off the XP bar shadow, do not copy the whole label definition and write only the property to change. Copying a whole vanilla file in is the wrong way.
{ "progress_text_label": { "shadow": false } } -
Use the modification strategy. If you write your own control directly into the
controlsof vanilla's root panel again (which requires copying every vanilla item), it breaks when vanilla names change. Splice it in withmodifications.{"root_panel": {"modifications": [{ "array_name": "controls", "operation": "insert_front","value": [ { "custom_ui@namespace.custom_ui": {} } ] }]}} -
Avoid deep trees and many entry points. Deep controls can be fixed with path keys (
"panel_with_label_and_bg/bg_image": { "size": [...] }), but if the child pointed to does not exist a resource pack error is left (the UI works normally). If possible override the definition itself ("label": { "color": [0.5, 0.5, 0.5] }) and gather the entry points where you attach your controls into one place (MOD-15).
The 11 operations of modifications
This is the list of operations the wiki documented. The engine's name table also has exactly these 11 (MOD-23).
Excerpt: Intro to JSON UI, Modifications · docs/json-ui/json-ui-intro.md · Bedrock Wiki · License CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) · Commit 0930b39
Modification Description insert_backinsert at end of array insert_frontinsert at start of array insert_afterinsert after target in array insert_beforeinsert before target in array move_backmove target to end of array move_frontmove target to start of array move_aftermove target after second target move_beforemove target before second target swapswap first target with second target replacereplace first target with second target removeremove target Add the new
foocontrol below thesecond_targetcontrol from the list:{"control_name": "second_target","operation": "insert_after","value": [ { "foo@example.bar": {} } ]}Move the existing
#example_binding_1binding below the#example_binding_2binding from the list:{"array_name": "bindings","operation": "move_after","where": { "binding_name": "#example_binding_2" },"target": { "binding_name": "#example_binding_1" }}Swap the position of the existing
#example_binding_1and#example_binding_2bindings:{"array_name": "bindings","operation": "swap","where": { "binding_name": "#example_binding_1" },"target": { "binding_name": "#example_binding_2" }}
How to read the wiki examples: use control_name when a control is the reference, use array_name: "bindings" and where when a binding is the reference, and move_after, move_before and swap, which need a second reference, use target (the engine reads target_control first, MOD-24). Besides insert_back, insert_front and remove, the other 8 also worked in a Windows 1.26.65.1 measurement (MOD-01, MOD-14).
A one-page example of the three forms written in a same-path file
// RP/ui/hud_screen.json (the same path as vanilla)
{
// (1) Property override: write only the properties to change in a same-named definition. The later pack wins
"progress_text_label": { "shadow": false },
// (2) Path key: overrides only the properties of a deep child (a Content Log error if the child is missing)
"hud_content/root_panel/some_child": { "alpha": 0.5 },
// (3) modifications: insert into and remove from arrays. Accumulated in pack order
"root_panel": {
"modifications": [
{ "array_name": "controls", "operation": "insert_back",
"value": [ { "my_layer@my_ns.layer": {} } ] }
]
}
}
The core of the rules below is that for (1) and (2), if several packs write the same property only one remains, and only (3) accumulates.
Rules
Most resource pack UI work is putting something into a vanilla screen (HUD, server form, chest, NPC dialogue, etc.). There are three methods.
| Method | How to write | Coexistence with other packs | Representative cases |
|---|---|---|---|
modifications | Insert into and remove from arrays (controls, bindings) in a same-path file | Accumulates in pack order | BC form hook, AP HUD |
| Property override | Write only properties with a same-named definition or path key in a same-path file | If the same property, the later pack wins | BA control_ids replacement, AP in_bed_screen |
| Redeclaration | Rewrite the screen definition from @base in a same-path file | Only one side remains | AP npc_screen, BC small_chest_screen |
When coexistence matters, choose in order from top to bottom.
Evidence from Cinnabar (CN, Rust code that reconstructs the JSON UI parser of the 26.30 native client) has the level code, and CN-run is the result of this project running that evaluator directly. NB was read by analyzing the native library of the Android 1.26.52.3 client. It is actual compiled output, not a reconstruction, so it is more direct than CN, but the level is code. If either differs from game measurement, follow measurement.
The modifications syntax
"root_panel": {
"modifications": [
{ "array_name": "bindings", "operation": "remove",
"where": { "binding_name": "#hud_visible" } },
{ "array_name": "bindings", "operation": "insert_front",
"value": [ { "binding_type": "global", "binding_name": "#hud_visible" } ] },
{ "array_name": "controls", "operation": "insert_back",
"value": [ { "my_layer@my_ns.layer": {} } ] }
]
}
- [MOD-01]
modificationsis written witharray_name,operation,value(the array of items to insert) andwhere(the condition that finds the item to delete). There are 11operations (MOD-23), and all of them worked on Windows 1.26.65.1 (MOD-14). Vanilla itself never usesmodifications(a pack-only feature).{working pack, code (binary), vanilla, measured}(Source: AP-samples hud_screen.json, BA chapter 2, BC 4.1, VN 0 uses, NB-01, 2026-11-18 Windows 1.26.65.1) - [MOD-02]
modificationsis interpreted per file path. Only what is written in a copy at the same path as a vanilla file applies to vanilla definitions, and those of several packs stack in pack order. If written in a file at a different path, the pack's own namespace definition is read as a new definition and replaces the original definition (Type not specified,Unknown property [modifications]), and a vanilla definition is silently ignored (FILE-22).{measured}(Source: BC-facts, CN) - [MOD-03]
modificationsreachescontrolsandbindings. Forvariablesthe results split: in one measurement (BC-facts) it was ignored, and on Windows 1.26.65.1 aninsert_backwitharray_name: "variables"ontext_panelofthanks_for_testing, which has novariablesarray of its own, changed$description_text_line_2toFROM_VARIABLES(claim measurements). A definition with its ownvariablesarray was not measured (conflict C-64). The engine does not filterarray_nameby a fixed list (MOD-25), so other arrays such asbutton_mappingsare also resolved but their effect was not measured. The engine actually reads thetarget_controlkey (MOD-24).{measured, code (binary), conflict}(Source: BC-facts, NB-02, NB-03, conflict C-64, 2026-11-18 Windows 1.26.65.1) - [MOD-04] If you insert into an array the target does not declare directly but only inherits, a new array is created and hides the inherited content (the vanilla content disappears wholesale). So put it into a definition that declares the array directly. Putting into a definition where the inherited array originally does not exist (for example
bindingsofhud_title_text, which has no bindings) is no problem. On Windows 1.26.65.1,insert_frontintolong_formofserver_form, which only inheritscontrols, also removed the whole form body, while inserting intolong_form_scrolling_content, which declarescontrolsitself, kept it (measurement record).{measured, working pack}(Source: BC-facts, AP-samples hud_screen.json, 2026-11-18 Windows 1.26.65.1) - [MOD-05] If you
removean inherited child control in a derived definition, with no log, all modifications of that file do not apply. On the other hand,removeof a binding item the definition itself has, specified withwhere, works. The settings and inventory screens also have required toggles that must not be deleted (MOD-16).{measured, working pack}(Source: BC-facts, AP 4.4, BW-doc) - [MOD-06] Do not delete vanilla controls; hide them with a binding. Add the hide condition as a
#visibleview binding, or hide with the visibility of a wrapping panel. Required toggles on the settings and inventory screens raise an assert in development builds if removed, so keep them even if hidden (MOD-16).{measured, working pack}(Source: BC 6.3-7, BA chapter 2, AP 4.4, BW-doc) - [MOD-14] The wiki documents 11
operations:insert_back,insert_front,insert_after,insert_before,move_back,move_front,move_after,move_before,swap,replaceandremove. The reference item is found with"control_name": "name"incontrolsand with"where": { "binding_name": "#x" }inbindings, andmove_after,move_beforeandswap, which need a second reference, use"target": { … }.replaceswaps the item found withwhereforvalue. The engine's operation name table also has exactly these 11 (MOD-23), and for the second reference it readstarget_controlfirst andtargetif absent (MOD-24). In a Windows 1.26.65.1 measurement,insert_after,insert_before,move_front,move_back,move_after,move_before,swapandreplaceall worked. They were measured by moving the children oftext_panelofthanks_for_testingfrom a same-path file, and the resulting orders are in claim measurements.move_beforeworked withtarget,swapandmove_afterwithtarget_control, and aninsert_backwhosevaluewas a single object also went in.{code (binary), measured}(Source: NB-01, NB-02, 2026-11-18 Windows 1.26.65.1) - [MOD-23] The engine's
operationname table is exactly the 11 of MOD-14 (numbers 1~11). Names must match exactly and there are no other operations. All 11 worked in game, and the other 8 were measured on Windows 1.26.65.1 (MOD-14).{code (binary), measured}(Source: NB-01, 2026-11-18 Windows 1.26.65.1) - [MOD-24] For the second reference of an operation item,
target_control(a string) is read first andtargetonly when it is absent. The item keys the engine reads arearray_name,control_name,operation,where,target_control,targetandvalue.{code (binary)}(Source: NB-02) - [MOD-25]
array_nameis not compared against a fixed list; it finds the same-named member in the definition and uses it as the target if it is an array. Ifarray_nameis empty andcontrol_nameis a string it is filled with"controls", so control operations may omitarray_name. So at the resolution stage arrays outsidecontrolsandbindingscan also be targets. In a Windows 1.26.65.1 measurement, modifyingvariableson a definition without its ownvariablesarray had an effect, which matches this reading. For a definition with its ownvariablesarray, see MOD-03.{code (binary), measured, conflict}(Source: NB-03, conflict C-64, 2026-11-18 Windows 1.26.65.1) - [MOD-17]
modificationsis applied after the ordinary property merge of the same item is finished. Within onemodifications, later operations can pick only original elements, so you cannot move or delete in the same list an element inserted earlier.{code (source)}(Source: CN) - [MOD-18] If
whereis an object, it picks the first element where even one member is equal (they need not all be equal).where: {}picks nothing, and with no condition it picks the first element. Specify the binding to delete by a unique member (binding_name).{code (source)}(Source: CN)
Adding my condition to a vanilla visibility condition
- [MOD-07] To AND the vanilla
#visiblebinding with my condition,removethe original binding (specified withwhere) and theninsert_frontto read the original value and my value again and combine them.{working pack}(Source: AP 4.4, AP-samples chat_screen.json)
"messages_text": { "modifications": [
{ "array_name": "bindings", "operation": "remove",
"where": { "binding_name": "#chat_visible", "binding_name_override": "#visible" } },
{ "array_name": "bindings", "operation": "insert_front", "value": [
{ "binding_type": "global", "binding_name": "#chat_visible" },
{ "binding_type": "global", "binding_name": "#text" },
{ "binding_type": "view", "source_property_name": "(('%.5s' * #text) = 'myui:')", "target_property_name": "#is_mine" },
{ "binding_type": "view", "source_property_name": "(#chat_visible and (not #is_mine))", "target_property_name": "#visible" } ] } ] }
- [MOD-08] For a definition that originally has no
#visiblebinding, you can hide with just a view binding appended withinsert_back(the approach of attaching a title prefix check to vanillalong_formandcustom_form).{code (source)}(Source: BC 4.1-(1), BW-form, BW-intro)
Wrapping: how to avoid clashing with UI packs
- [MOD-09] Do not modify the vanilla definition directly; wrap it.
"wrapper": { "controls": [ { "long_form@server_form.long_form": {} } ] }references the final merge result even if another UI pack replaceslong_formwholesale, so the visibility condition put on the wrapper survives. In 2.0.2, BA used this structure to fix the problem of "screens getting mixed up when used with UI packs" regardless of pack order.{working pack}(Source: BA chapter 2) - [MOD-10] When adding a feature to a vanilla template, put it in as a slot that is off by default. Example: if you add
"$show_hover_content|default": falseand a child wrapped withignoredtocommon_buttons.focus_border, only buttons that turn that variable on are affected.{working pack}(Source: AP 4.8)
// ui/ui_template_buttons.json (a vanilla path)
"focus_border": {
"$show_hover_content|default": false,
"$hover_content|default": "common.empty_panel",
"controls": [ { "hover_slot@common.empty_panel": {
"ignored": "(not $show_hover_content)",
"controls": [ { "content@$hover_content": { "visible": "($hover_state or $pressed_state)" } } ] } } ]
}
- [MOD-15] Gather the points that attach to a vanilla screen (entry points) into one place. If you
insertinto several child controls separately, even if the name of just one changes part of it breaks, and there are more places to debug. Put your controls inside a wrapper panel placed at a single entry point.{inferred}(Source: BW-best, BW-hud)
Redeclaration and replacing screen content
- [MOD-11] To replace the content of a screen wholesale, redeclare the screen definition in a same-path file and change
$screen_content. Vanilla also makes screens the same way, likeshulker_box_screen@chest.small_chest_screenandbarrel_screen@chest.small_chest_screen.{vanilla, measured}(Source: VN chest_screen.json:240 and 258, BC 4.3-(2), BC-facts) - [MOD-12] If you redeclare a screen definition, only one side remains against other packs that redeclare the same screen. Vanilla features such as the ordinary NPC dialogue also receive the redeclared properties (
render_game_behind, etc.). Use it only when truly necessary, and wrap the vanilla content so the original features keep working.{working pack, inferred}(Source: AP 4.2) - [MOD-13] If several add-ons must attach to the same vanilla screen, use only
modificationsthat define nothing. If you write definitions in a vanilla file (including property overrides), you compete in overriding with the same definitions of other packs. In a Windows 1.26.65.1 measurement, theinsert_backs of three packs on the samemain_screen_contentall went in (claim measurements).{measured, inferred}(Source: BC 6.3-9, BC-facts, BW-best, 2026-11-18 Windows 1.26.65.1) - [MOD-19] If a redeclaration at the same path writes a different
@basefrom the existing one, the existing definition (type, factory, bindings) is discarded and it becomes a new definition. Do not write@when only changing properties of a vanilla definition.{code (source)}(Source: CN) - [MOD-16] The settings screen and the inventory screen have toggles the engine assumes always exist (the accessibility tab in settings, the construction, equipment, items and nature tabs in the inventory, etc.). If you replace a screen wholesale and leave these toggles out, an assert occurs in development builds. Keep them even if hidden (MOD-06).
{unverified}(Source: BW-doc "HardCoded Toggles")
Summary of how to choose
- If you only need to hide: add a view binding to
bindings(MOD-08) or AND with the existing condition (MOD-07). - To splice in my control:
insert_backinto thecontrolsof a definition that declares the array directly (MOD-04). - If another UI pack is likely to change the same vanilla definition: wrapping (MOD-09).
- To replace the whole screen with other content: redeclaration (MOD-11), preserving the vanilla content by wrapping it.
- Template extension: an off-by-default slot (MOD-10).
Example: hiding one vanilla HUD element without remove
A one-file example that always hides the vanilla title (hud_title_text). In a pack with only this file the title was not drawn {measured} (example measurement record, 2026-11-27 Windows 1.26.65). It relies on MOD-02, MOD-04, MOD-05 and MOD-08. MOD-08 itself is at the {code (source)} level, and this example shows the approach working at one place, hud_title_text, which has no #visible binding of its own.
RP/
manifest.json
ui/
hud_screen.json
ui/hud_screen.json is at the same path as vanilla, so modifications apply to the vanilla definition (MOD-02), and the path is already registered, so no _ui_defs.json is needed (FILE-01). manifest.json needs only a single resources module, the same as in the example in section 10 of HUD and title channels.
{
"hud_title_text": {
"modifications": [
{
"array_name": "bindings",
"operation": "insert_back",
"value": [
{ "binding_type": "global", "binding_name": "#hud_title_text_string" },
{
"binding_type": "view",
"source_property_name": "(not (#hud_title_text_string = #hud_title_text_string))",
"target_property_name": "#visible"
}
]
}
]
}
}
- It hides with a
#visibleview binding instead of deleting (MOD-06).removeof an inherited child control (title_frameand so on) would make all modifications of that file not apply, so it is not used (MOD-05). The hidden target is the wholehud_title_text, not a child, so the subtitle frame is hidden with it. - Vanilla
hud_title_texthas nobindingsto begin with. Inserting into an array that is only inherited covers the inherited content, but an array that did not exist is fine (MOD-04). Appending only a view binding to a definition that originally has no#visiblebinding is MOD-08{code (source)}. - The expression must contain a
#propertyor the binding is discarded (BND-05). The expression above is always false, so#visiblebecomes false. If an expression fails, the value falls back to the default true and the element shows (BND-09), so check the expression first when it does not hide. - To hide an element that already has a
#visiblebinding, this example is not enough. In that case,removethe original binding withwhereand merge it back as in MOD-07. This example does not cover that case. - The internal structure of other elements (health, hotbar and so on) was not checked in this wiki, so they are not used as examples.
- A complete example that uses the title as a data channel is in section 10 of HUD and title channels.
Proposed rules
The rules below lack evidence or are not adopted yet. Check the evidence before using them.
- [MOD-20] (proposal) The official guideline for Marketplace cooperative add-ons forbids overriding
ui/andfont/files (because several add-ons cannot modify the same asset together). A pack to be released as cooperative should avoid even themodificationsof MOD-13 and first choose a workaround outside JSON UI. The evidence is a policy document, not a measurement. Not checked: whether a pack using onlymodificationsis also rejected in actual review.{inferred}(Source: ms-learn, Guidelines for Building Cooperative Add-Ons) - [MOD-21] (proposal) Server form packs that change the
controlsofserver_form.long_format the same path (Chest-UI, upgrader) cannot coexist with each other. Both packs redeclarelong_format the same path without@(type: panel, twocontrols) and split the vanilla look and their own screen with a title prefix check expression. Only one pack'scontrolsremain (on the same property the pack higher in the world pack list wins, FILE-21). If coexistence is needed, switch to MOD-09 wrapping or MOD-13modificationsonly.{working pack, inferred}(Source: CU, UP) - [MOD-22] (proposal) When replacing a texture shared by several vanilla controls, copy the original under another name such as
_original, and relink the controls you will not change to the copy with path keys in a same-path UI file ("parent/child": {"texture": "textures/ui/text_label_box_original"}).{working pack}(Source: SP) - Operation usage in this project's sources is
insert_back11,insert_front4 andremove3. A pack file at the same path as vanilla is merged with the vanilla definitions (FILE-21).{working pack}
Facts added by community reports (community)
(Source: private research) All are at the report level.
- All 11 operations work (MOD-14, Windows 1.26.65.1 measurement). The community often uses
replaceandwherefilters. If youreplaceafterremove-ing the same control, it fails, which is the same as the property that within onemodificationsa later operation cannot pick again an element an earlier operation inserted (MOD-17). - An idiom for adding content to a vanilla screen: leave the vanilla namespace as is and fill a slot variable. Example:
"inventory_screen": { "$additional_screen_content": "crafting.custom_panel" }. When complete, replace the whole screen with$screen_content(MOD-11). - When several packs
modificationsthe same vanilla element, the changes accumulate in pack order (MOD-02): on Windows 1.26.65.1, three packs each did aninsert_backinto the samemain_screen_contentand all three went in (claim measurements). For a property override the higher pack wins: when two packs setsizeofchat_grid_item/chat_backgroundto"50%"and"75%"in the same-pathhud_screen.json, the 75% of the pack higher in the world pack list remained (FILE-21). The game restored its own pack order, so the reverse order was not measured (record). Cases that mix inreplacewere not measured. - Marketplace add-ons cannot modify vanilla UI files (world templates can).
Conflict verdicts (related to this chapter's rules)
| ID | Topic | Claim and evidence | Verdict |
|---|---|---|---|
| C-64 | The arrays modifications reaches | One measurement (BC-facts) says only controls and bindings and variables is ignored. On Windows 1.26.65.1, modifying variables on a definition without its own variables array had an effect. The engine resolution finds the same-named member so any array is resolved (NB-03) | Open: a definition with variables and button_mappings were not measured. Do not use the rest before measuring |
Items that need measurement
- Which one remains when
replacemixes into themodificationsof several packs. - Whether
button_mappings, andvariableson a definition with its ownvariablesarray, have an effect (C-64).
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 | |
repo-survey | JSON UI material survey (this repository) (survey/) | This project's material | 2026-11-13 | |
private-research | Private research (-) | - | 2026-11-13 | |
bedrock-wiki | Bedrock Wiki | CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) | 0930b39 | 2026-11-13 |
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 2026-11-13 |
cinnabar | Cinnabar (json-ui crate) | PolyForm Noncommercial License 1.0.0 (confirmed in the repository LICENSE). Used only to check behavior and as an implementation reference; the original text is not copied | ceb0fb6 (analysis baseline, clone HEAD df826f5) | 2026-11-13 |
bedrock-core | bedrock-core UI (@bedrock-core/ui) | MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core) | aee2bbd (analysis baseline, clone HEAD 51d5cf2) | 2026-11-13 |
advancementpack | AdvancementPack (r4isen1920) | MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920) | 0a79929 (analyzed v4.2, researched 2026-10-20) | 2026-11-13 |
chest-ui | Chest-UI | CC BY 4.0 (confirmed in the repository License file) | 115d95c | 2026-11-13 |
upgrader | upgrader | No LICENSE file. Facts only, rewritten | 0119a5a | 2026-11-13 |
repo-small-packs | Collection of six small packs, abbreviation SP (small-packs/) | Varies by material (no license, or includes ND). Facts only, rewritten | 2026-11-13 |