Skip to main content

Rules: Modifying vanilla screens

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 Modifying vanilla screens.

IDRuleLevelEvidence environmentSource
MOD-01modifications 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, measuredWindows 1.26.65.1AP-samples hud_screen.json, BA chapter 2, BC 4.1, VN 0 uses, NB-01, 2026-11-18 Windows 1.26.65.1
MOD-02modifications 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).measuredunknownBC-facts, CN
MOD-03modifications 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), conflictWindows 1.26.65.1BC-facts, NB-02, NB-03, conflict C-64, 2026-11-18 Windows 1.26.65.1
MOD-04If 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 packWindows 1.26.65.1BC-facts, AP-samples hud_screen.json, 2026-11-18 Windows 1.26.65.1
MOD-05If 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 packunknownBC-facts, AP 4.4, BW-doc
MOD-06Do 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 packunknownBC 6.3-7, BA chapter 2, AP 4.4, BW-doc
MOD-07To 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-AP 4.4, AP-samples chat_screen.json
MOD-08For 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)-BC 4.1-(1), BW-form, BW-intro
MOD-09Do 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-BA chapter 2
MOD-10When 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-AP 4.8
MOD-11To 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, measuredunknownVN chest_screen.json:240 and 258, BC 4.3-(2), BC-facts
MOD-12If 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-AP 4.2
MOD-13If 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, inferredWindows 1.26.65.1BC 6.3-9, BC-facts, BW-best, 2026-11-18 Windows 1.26.65.1
MOD-14The 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), measuredWindows 1.26.65.1NB-01, NB-02, 2026-11-18 Windows 1.26.65.1
MOD-15Gather 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-BW-best, BW-hud
MOD-16The 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-BW-doc "HardCoded Toggles"
MOD-17modifications 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)-CN
MOD-18If 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)-CN
MOD-19If 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)-CN
MOD-23The 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), measuredWindows 1.26.65.1NB-01, 2026-11-18 Windows 1.26.65.1
MOD-24For 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)unknownNB-02
MOD-25array_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, conflictWindows 1.26.65.1NB-03, conflict C-64, 2026-11-18 Windows 1.26.65.1

Proposed rules​

These proposals are not merged into the adopted rules yet. Check the evidence before using them.

IDRuleLevelEvidence environmentSource
MOD-20The 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-ms-learn, Guidelines for Building Cooperative Add-Ons
MOD-21Server 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-CU, UP
MOD-22When 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-SP
Sources
idSourceLicenseCommitAccessed
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13
private-researchPrivate research (-)-2026-11-13