Skip to main content

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

  1. 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 } }
  2. Use the modification strategy. If you write your own control directly into the controls of vanilla's root panel again (which requires copying every vanilla item), it breaks when vanilla names change. Splice it in with modifications.

    {
    "root_panel": {
    "modifications": [
    { "array_name": "controls", "operation": "insert_front",
    "value": [ { "custom_ui@namespace.custom_ui": {} } ] }
    ]
    }
    }
  3. 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
ModificationDescription
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 foo control below the second_target control from the list:

{
"control_name": "second_target",
"operation": "insert_after",
"value": [ { "foo@example.bar": {} } ]
}

Move the existing #example_binding_1 binding below the #example_binding_2 binding 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_1 and #example_binding_2 bindings:

{
"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.

MethodHow to writeCoexistence with other packsRepresentative cases
modificationsInsert into and remove from arrays (controls, bindings) in a same-path fileAccumulates in pack orderBC form hook, AP HUD
Property overrideWrite only properties with a same-named definition or path key in a same-path fileIf the same property, the later pack winsBA control_ids replacement, AP in_bed_screen
RedeclarationRewrite the screen definition from @base in a same-path fileOnly one side remainsAP 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] modifications is written with array_name, operation, value (the array of items to insert) and where (the condition that finds the item to delete). There are 11 operations (MOD-23), and all of them worked on Windows 1.26.65.1 (MOD-14). Vanilla itself never uses modifications (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] modifications is 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] modifications reaches controls and bindings. For variables the results split: in one measurement (BC-facts) it was ignored, and on Windows 1.26.65.1 an insert_back with array_name: "variables" on text_panel of thanks_for_testing, which has no variables array of its own, changed $description_text_line_2 to FROM_VARIABLES (claim measurements). A definition with its own variables array was not measured (conflict C-64). The engine does not filter array_name by a fixed list (MOD-25), so other arrays such as button_mappings are also resolved but their effect was not measured. The engine actually reads the target_control key (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 bindings of hud_title_text, which has no bindings) is no problem. On Windows 1.26.65.1, insert_front into long_form of server_form, which only inherits controls, also removed the whole form body, while inserting into long_form_scrolling_content, which declares controls itself, 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 remove an inherited child control in a derived definition, with no log, all modifications of that file do not apply. On the other hand, remove of a binding item the definition itself has, specified with where, 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 #visible view 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, replace and remove. The reference item is found with "control_name": "name" in controls and with "where": { "binding_name": "#x" } in bindings, and move_after, move_before and swap, which need a second reference, use "target": { … }. replace swaps the item found with where for value. The engine's operation name table also has exactly these 11 (MOD-23), and for the second reference it reads target_control first and target if absent (MOD-24). In a Windows 1.26.65.1 measurement, insert_after, insert_before, move_front, move_back, move_after, move_before, swap and replace all worked. They were measured by moving the children of text_panel of thanks_for_testing from a same-path file, and the resulting orders are in claim measurements. move_before worked with target, swap and move_after with target_control, and an insert_back whose value was 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 operation name 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 and target only when it is absent. The item keys the engine reads are array_name, control_name, operation, where, target_control, target and value. {code (binary)} (Source: NB-02)
  • [MOD-25] array_name is 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. If array_name is empty and control_name is a string it is filled with "controls", so control operations may omit array_name. So at the resolution stage arrays outside controls and bindings can also be targets. In a Windows 1.26.65.1 measurement, modifying variables on a definition without its own variables array had an effect, which matches this reading. For a definition with its own variables array, see MOD-03. {code (binary), measured, conflict} (Source: NB-03, conflict C-64, 2026-11-18 Windows 1.26.65.1)
  • [MOD-17] modifications is applied after the ordinary property merge of the same item is finished. Within one modifications, 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 where is 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 #visible binding with my condition, remove the original binding (specified with where) and then insert_front to 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 #visible binding, you can hide with just a view binding appended with insert_back (the approach of attaching a title prefix check to vanilla long_form and custom_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 replaces long_form wholesale, 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": false and a child wrapped with ignored to common_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 insert into 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, like shulker_box_screen@chest.small_chest_screen and barrel_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 modifications that 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, the insert_backs of three packs on the same main_screen_content all 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 @base from 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​

  1. If you only need to hide: add a view binding to bindings (MOD-08) or AND with the existing condition (MOD-07).
  2. To splice in my control: insert_back into the controls of a definition that declares the array directly (MOD-04).
  3. If another UI pack is likely to change the same vanilla definition: wrapping (MOD-09).
  4. To replace the whole screen with other content: redeclaration (MOD-11), preserving the vanilla content by wrapping it.
  5. 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 #visible view binding instead of deleting (MOD-06). remove of an inherited child control (title_frame and so on) would make all modifications of that file not apply, so it is not used (MOD-05). The hidden target is the whole hud_title_text, not a child, so the subtitle frame is hidden with it.
  • Vanilla hud_title_text has no bindings to 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 #visible binding is MOD-08 {code (source)}.
  • The expression must contain a #property or the binding is discarded (BND-05). The expression above is always false, so #visible becomes 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 #visible binding, this example is not enough. In that case, remove the original binding with where and 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/ and font/ files (because several add-ons cannot modify the same asset together). A pack to be released as cooperative should avoid even the modifications of 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 only modifications is also rejected in actual review. {inferred} (Source: ms-learn, Guidelines for Building Cooperative Add-Ons)
  • [MOD-21] (proposal) Server form packs that change the controls of server_form.long_form at the same path (Chest-UI, upgrader) cannot coexist with each other. Both packs redeclare long_form at the same path without @ (type: panel, two controls) and split the vanilla look and their own screen with a title prefix check expression. Only one pack's controls remain (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-13 modifications only. {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_back 11, insert_front 4 and remove 3. 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 replace and where filters. If you replace after remove-ing the same control, it fails, which is the same as the property that within one modifications a 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 modifications the same vanilla element, the changes accumulate in pack order (MOD-02): on Windows 1.26.65.1, three packs each did an insert_back into the same main_screen_content and all three went in (claim measurements). For a property override the higher pack wins: when two packs set size of chat_grid_item/chat_background to "50%" and "75%" in the same-path hud_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 in replace were not measured.
  • Marketplace add-ons cannot modify vanilla UI files (world templates can).
IDTopicClaim and evidenceVerdict
C-64The arrays modifications reachesOne 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 replace mixes into the modifications of several packs.
  • Whether button_mappings, and variables on a definition with its own variables array, have an effect (C-64).
Sources
idSourceLicenseCommitAccessed
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13
repo-surveyJSON UI material survey (this repository) (survey/)This project's material2026-11-13
private-researchPrivate research (-)-2026-11-13
bedrock-wikiBedrock WikiCC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository)0930b392026-11-13
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13
bedrock-samplesMojang bedrock-samplesMinecraft EULA applies, (c) Mojang AB. All rights reserved15701fa9 (guide baseline 46ba6ea)2026-11-13
cinnabarCinnabar (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 copiedceb0fb6 (analysis baseline, clone HEAD df826f5)2026-11-13
bedrock-corebedrock-core UI (@bedrock-core/ui)MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core)aee2bbd (analysis baseline, clone HEAD 51d5cf2)2026-11-13
advancementpackAdvancementPack (r4isen1920)MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920)0a79929 (analyzed v4.2, researched 2026-10-20)2026-11-13
chest-uiChest-UICC BY 4.0 (confirmed in the repository License file)115d95c2026-11-13
upgraderupgraderNo LICENSE file. Facts only, rewritten0119a5a2026-11-13
repo-small-packsCollection of six small packs, abbreviation SP (small-packs/)Varies by material (no license, or includes ND). Facts only, rewritten2026-11-13