Reskinning a server form
The script decides the text and the number of buttons of a server form, and the client's vanilla ui/server_form.json decides how it looks. When a resource pack inserts one router into this file, it can draw only the forms whose title carries a marker as its own screen and leave every other form in the vanilla look.
When to use it
| What you want | This method | Alternative |
|---|---|---|
Draw an ActionFormData button list as a grid, shop or tab screen | Fits. Five wiki examples worked in game with this setup | - |
| Open a list of a few hundred to 2000 buttons | Fits. A 2-column grid drew up to 2000 (COL-49) | From 3000 up the cells were drawn on top of each other. Split pages on the server |
Change the look of a ModalFormData input form | Possible, but the wiki has no modal form reskin example checked in game {inferred} | If the rows need no new look, leave vanilla custom_form as it is |
Change the look of a MessageFormData confirmation window | Does not fit. There is a record that the confirmation window (modal) does not take the long_form and custom_form themes and appears as a light default window (no measurement conditions kept) | Send it as an ActionFormData with two buttons |
| Values must keep changing on the open screen | Does not fit. A form cannot change values after it opens; it has to be sent again | A chest screen (Chest UI) or a HUD channel |
| A checkbox multi-select row is needed | The Script API has no multiselect | Several toggles from a script; a server that sends form JSON itself can use the multiselect row (multiselect) |
Change CustomForm or MessageBox (DDUI) | Does not fit. They are drawn by Ore UI and have nothing to do with server_form.json | DDUI server guide |
| Release it as a Marketplace cooperative add-on | Avoid. The guideline forbids overriding ui/ files (MOD-20) {inferred} | A method outside JSON UI |
Minimal example
This is the wiki example add-on json-ui-performance v1.4.0 (Grid button list) with the progress bar and the test item removed and the icon list shortened. The kept definitions are the same as the original; only the pack names, descriptions, versions, menu title and script event name changed. The files below, turned on as they are in a BDS 1.26.65.1 world and joined from a Windows 1.26.65 client, were checked on 2026-12-04: the menu form with a plain title opened in the vanilla look, the 100-button list form opened as a 2-column grid window, and pressing the third cell sent Pressed button 3 of 100. to chat {measured}. It uses the same namespace (jup) and title, so do not turn it on together with the original add-on. The UUIDs below are the original add-on's, so make new ones, and keep the BP dependencies UUID and version equal to the RP header.
{
"format_version": 2,
"header": {
"name": "Server form reskin example RP",
"description": "Draws the action form whose title starts with the marker as a 2-column grid",
"uuid": "07fd68f1-2fd4-43d6-9034-8bbf374553a0",
"version": [1, 0, 0],
"min_engine_version": [1, 21, 90]
},
"modules": [
{
"type": "resources",
"uuid": "39dea20b-1e19-4267-907c-2c7173915b1a",
"version": [1, 0, 0]
}
]
}
{
"ui_defs": [
"ui/jup.json"
]
}
server_form.json has the vanilla path, so it is not listed in _ui_defs.json. It differs from the other wiki server form examples only in the router line (HOST-51).
{
"namespace": "server_form",
"main_screen_content": {
"size": [ "100%", "100%" ],
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [ { "jup_router@jup.screen_router": {} } ]
}
]
},
"long_form": {
"modifications": [
{
"array_name": "bindings",
"operation": "insert_back",
"value": [
{ "binding_name": "#title_text", "binding_condition": "always" },
{
"binding_type": "view",
"binding_condition": "always",
"source_property_name": "(not (('%.6s' * #title_text) = '§b§w'))",
"target_property_name": "#visible"
}
]
}
]
},
"long_form_scrolling_content/wrapping_panel": {
"visible": false,
"bindings": [
{ "binding_name": "#title_text", "binding_condition": "always" },
{
"binding_type": "view",
"binding_condition": "always",
"source_property_name": "(not (('%.6s' * #title_text) = '§b§w'))",
"target_property_name": "#visible"
}
]
},
"long_form_dynamic_buttons_panel": {
"bindings": [
{
"binding_name": "#form_button_contents",
"binding_name_override": "#collection_length",
"binding_condition": "visible"
}
]
}
}
{
"namespace": "jup",
"list_face": {
"type": "panel",
"size": [ "100%", "100%" ],
"$bg_texture|default": "textures/ui/button_borderless_light",
"controls": [
{ "bg": { "type": "image", "texture": "$bg_texture", "size": [ "100% - 2px", "100% - 2px" ] } },
{
"icon": {
"type": "image", "layer": 2, "size": [ 16, 16 ], "offset": [ 3, 3 ], "anchor_from": "top_left", "anchor_to": "top_left",
"bindings": [ { "binding_type": "collection", "binding_collection_name": "form_buttons", "binding_name": "#form_button_texture", "binding_name_override": "#texture" } ]
}
},
{
"name": {
"type": "label", "layer": 3, "size": [ 76, 10 ], "offset": [ 22, 3 ], "anchor_from": "top_left", "anchor_to": "top_left",
"color": [ 0.1, 0.1, 0.1 ], "localize": false, "text": "#text",
"bindings": [
{ "binding_type": "collection", "binding_collection_name": "form_buttons", "binding_name": "#form_button_text" },
{ "binding_type": "view", "source_property_name": "('%.12s' * #form_button_text)", "target_property_name": "#text" }
]
}
},
{
"desc": {
"type": "label", "layer": 3, "size": [ 76, 8 ], "offset": [ 22, 13 ], "anchor_from": "top_left", "anchor_to": "top_left",
"font_scale_factor": 0.7, "color": [ 0.3, 0.3, 0.3 ], "localize": false, "text": "#text",
"bindings": [
{ "binding_type": "collection", "binding_collection_name": "form_buttons", "binding_name": "#form_button_text" },
{ "binding_type": "view", "source_property_name": "(('%.32s' * #form_button_text) - ('%.12s' * #form_button_text))", "target_property_name": "#text" }
]
}
}
]
},
"list_cell@common.button": {
"size": [ 100, 30 ],
"$focus_enabled": false,
"$pressed_button_name": "button.form_button_click",
"bindings": [ { "binding_type": "collection_details", "binding_collection_name": "form_buttons", "binding_condition": "always" } ],
"controls": [
{ "default@jup.list_face": {} },
{ "hover@jup.list_face": { "$bg_texture": "textures/ui/button_borderless_lighthover" } },
{ "pressed@jup.list_face": { "$bg_texture": "textures/ui/button_borderless_lightpressed" } }
]
},
"list_grid": {
"type": "grid",
"size": [ 200, "100%c" ],
"grid_rescaling_type": "horizontal",
"grid_item_template": "jup.list_cell",
"collection_name": "form_buttons",
"bindings": [
{ "binding_name": "#form_button_length", "binding_name_override": "#maximum_grid_items", "binding_condition": "always" }
]
},
"list_body": {
"type": "panel",
"size": [ "100% - 4px", "100%c" ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"controls": [ { "grid@jup.list_grid": { "anchor_from": "top_left", "anchor_to": "top_left" } } ]
},
"list_scroll": {
"type": "panel",
"size": [ 216, "100% - 24px" ],
"offset": [ 0, 18 ],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"controls": [
{
"scrolling_panel@common.scrolling_panel": {
"anchor_to": "top_left",
"anchor_from": "top_left",
"$show_background": false,
"size": [ "100%", "100%" ],
"$scrolling_content": "jup.list_body",
"$scroll_size": [ 5, "100% - 4px" ],
"$scrolling_pane_size": [ "100% - 4px", "100% - 2px" ],
"$scrolling_pane_offset": [ 2, 0 ],
"$scroll_bar_right_padding_size": [ 0, 0 ]
}
}
]
},
"list_window": {
"type": "image",
"texture": "textures/ui/dialog_background_opaque",
"size": [ 224, "85%" ],
"layer": 60,
"controls": [
{ "head": { "type": "label", "layer": 3, "anchor_from": "top_left", "anchor_to": "top_left", "offset": [ 6, 6 ], "text": "Screen router + 2-column grid", "localize": false, "color": [ 0.25, 0.25, 0.25 ], "font_scale_factor": 0.8 } },
{ "close@common.close_button": {} },
{ "scroll@jup.list_scroll": {} }
]
},
"screen_router": {
"type": "collection_panel",
"size": [ "100%", "100%" ],
"factory": {
"name": "jup_screen",
"control_ids": { "j": "@jup.list_window" }
},
"property_bag": { "#§b§wjp:J": [ "j" ] },
"bindings": [
{ "binding_name": "#title_text" },
{ "binding_type": "view", "source_property_name": "('#' + ('%.10s' * #title_text))", "target_property_name": "#collection_length" }
]
}
}
{
"format_version": 2,
"header": {
"name": "Server form reskin example BP",
"description": "Opens a plain menu form and a marked list form",
"uuid": "874506d5-43d7-4982-a2bb-79e07467480b",
"version": [1, 0, 0],
"min_engine_version": [1, 21, 90]
},
"modules": [
{
"type": "data",
"uuid": "30d8743e-4d9e-4fb5-80e9-d20648ed48c8",
"version": [1, 0, 0]
},
{
"type": "script",
"language": "javascript",
"uuid": "2f5ac828-a794-4943-9375-1f26bd79f431",
"entry": "scripts/main.js",
"version": [1, 0, 0]
}
],
"dependencies": [
{ "uuid": "07fd68f1-2fd4-43d6-9034-8bbf374553a0", "version": [1, 0, 0] },
{ "module_name": "@minecraft/server", "version": "2.0.0" },
{ "module_name": "@minecraft/server-ui", "version": "2.0.0" }
]
}
import { system } from "@minecraft/server";
import { ActionFormData } from "@minecraft/server-ui";
const COUNTS = [100, 500, 1000, 2000];
const ICONS = [
"textures/items/diamond",
"textures/items/apple",
"textures/items/iron_ingot",
"textures/items/gold_ingot",
"textures/items/emerald",
];
function pad(text, width) {
return (text + " ".repeat(width)).slice(0, width);
}
function openList(player, count) {
const form = new ActionFormData().title("§b§wjp:J").body(`${count} buttons`);
for (let i = 0; i < count; i++) {
form.button(pad(`Item ${i + 1}`, 12) + pad(`desc line ${i + 1}`, 20), ICONS[i % ICONS.length]);
}
form.show(player).then((res) => {
if (res.canceled || res.selection === undefined) return;
player.sendMessage(`Pressed button ${res.selection + 1} of ${count}.`);
openMenu(player);
});
}
function openMenu(player) {
const form = new ActionFormData().title("Server form reskin").body("Pick the number of buttons.");
for (const count of COUNTS) form.button(`${count} buttons`);
form.show(player).then((res) => {
if (res.canceled || res.selection === undefined) return;
openList(player, COUNTS[res.selection]);
});
}
system.afterEvents.scriptEventReceive.subscribe((event) => {
if (event.sourceEntity?.typeId !== "minecraft:player") return;
if (event.id === "bwiki:reskin_example") openMenu(event.sourceEntity);
});
/scriptevent bwiki:reskin_example opens a menu form with a plain title in the vanilla look, and picking a button count opens a list form titled §b§wjp:J as a 2-column grid window. It works in this order.
- When the title starts with
§b§w, vanillalong_formand its button row are hidden, and the factory of the hidden button row creates no cells because its length binding has thevisiblecondition (BND-32). - The router prepends
'#'to the first 10 bytes of the title and looks the result up inproperty_bag. If the key exists it creates one window, otherwise nothing (HOST-06, COL-22, COL-23). - The grid creates a cell for each button of the
form_buttonscollection, and a cell sends the pressed button number to the script throughcollection_detailsandbutton.form_button_click(COL-04). - The cell labels cut the button text by byte count into a name and a description.
Must match
Entry and title check
- The
namespaceofserver_form.jsonisserver_form, and the file goes toui/server_form.jsonin the resource pack. - Do not redeclare
third_party_server_screen. Insert the router into thecontrolsofmain_screen_contentwithinsert_back(HOST-51, MOD-13). - Set the
sizeofmain_screen_contentto["100%", "100%"]. Vanilla has[0, 0](HOST-51). - The expression that hides vanilla
long_formand the prefix the router looks up check the same marker. The shared prefix of the wiki examples is§b§w, compared with(not (('%.6s' * #title_text) = '§b§w'))(HOST-51). - N in
'%.Ns'is a UTF-8 byte count.§is 2 bytes and a Korean character is 3 bytes, so§b§wis 6 bytes and§b§wjp:Jis 10 bytes. - The
property_bagkey is#followed by the cut title as is ("#§b§wjp:J"), and the value is an array ofcontrol_idskeys (["j"]) (COL-22). - Put the router's
factoryon a collection container such ascollection_panel.panel+factorycreated nothing (COL-40). - When you write the same vanilla definitions (
size, hiding bindings) as another pack, write byte-identical values. If they differ, only one survives depending on pack order (MOD-13, HOST-51). - Do not redeclare
long_formwithout@to replace itscontrols. The array is replaced wholesale and the screens of other server form packs disappear (MOD-09){inferred}.
Button data and cells
- The action form collection is named
form_buttons, and its values are#form_button_text(text) and#form_button_texture(icon path). The button count is#form_button_length, and the vanilla factory length is#form_button_contents. - A pressable cell needs a
collection_detailsbinding and$pressed_button_name: "button.form_button_click"on the cell itself. Without them the script getscanceled(COL-04). - Inside a window created by the router, set the grid length and the cell's
collection_detailstobinding_condition: "always"(COL-47). Labels filled withoutalwayswhen the collection binding came first and the view binding that cuts its value came after (BND-37). - A fixed
collection_indexcell must be a direct child of astack_panelthat hascollection_name. For a 2D layout, put horizontal stack rows withcollection_nameinside a vertical stack (COL-38, COL-50). - Give the grid
grid_rescaling_type: "horizontal", a fixed width and height"100%c", and set the count with#maximum_grid_items(LAY-30). - Put labels inside a scroll area on a layer above the background (icon 2, label 3) (LAY-55).
- Create the scroll area only in the form that uses it. If it is always there, the buttons of other forms cannot be pressed (LAY-57).
#form_text(the body) read as empty in controls inserted undermain_screen_contentand was readable only insidelong_form{measured}. Send values the router window needs as buttons.
What the script sends
- The title starts with the marker. Make the marker long and unique, and do not put
*or@in it (EXP-36). A marker with§before every character does not show in the title even in the vanilla look (HOST-34). - Send every entry used as data with
button().label(),header()anddivider()also become collection items, butselectioncounts only buttons, so the numbers drift apart (COL-19). - The script pads fixed-width fields by bytes. The example is English, so the character count and the byte count are the same.
- Give number-like values a letter prefix (
§f16,P050). Otherwise they turn into numbers in expressions and text comparison and subtraction break (EXP-15). - To turn a value into a number in the pack, use
(#v - 0).(#v * 1)does not turn a string into a number (EXP-16). - Put only unquoted values in a
$variableplaced inside an expression (BND-33). - With fixed cells, always send the same number and order of buttons, and send an empty marker button for an unused place (Server form research screen).
Modal forms (custom_form)
- A modal form is created through the
custom_formkey of thecontrol_idsof the sameserver_form_factory. Theserver_form.jsonabove does not touchcustom_form, so every modal form is drawn by vanilla. - To change a modal form,
insert_backa "hide when my marker" binding into vanillacustom_form, and put your screen under thecustom_formkey ofcontrol_ids(HOST-04, PAT-01){inferred}. - The rows are the
custom_formcollection with length#custom_form_length, and the row kinds arelabel,toggle,slider,step_slider,dropdown,input,header,dividerandmultiselect(COL-09). - The engine gives row values through bindings: label and header
#custom_text, toggle#custom_toggle_state, slider#custom_slider_textand#custom_slider_value, dropdown#custom_dropdown_lengthand#custom_radio_text, input#custom_input_textand#custom_placeholder_text, tooltip#custom_tooltip_text. A row template must have the same bindings as vanilla (HOST-11). - The submit button has
$pressed_button_name: "button.submit_custom_form"and the text#submit_text(HOST-11). - Do not place sliders statically. Let the row factory create a slider only when there is a slider row. A hidden slider still asserts when it is created (HOST-12, COL-10).
- If you replace the
custom_formrow factory with your own, putmultiselectin itscontrol_ids. Without it that row is not drawn (HOST-47). formValueshas one place per row in row order, and a label's place isnull(COL-20). Amultiselectplace is an array of chosen indexes, andnullwhen nothing is chosen (HOST-46).
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| My window does not show | main_screen_content has the vanilla size [0, 0] | size: ["100%", "100%"] (HOST-51) |
| The vanilla form shows behind my window | The vanilla long_form hiding binding is missing or uses a different marker from the router | Add the hiding binding with the same prefix (HOST-51) |
| Ordinary forms are also drawn as my window | The title gate is an or expression or a visible gate | A property_bag dictionary lookup router (COL-39, HOST-06) |
| With another server form pack on, one pack's screen disappears | third_party_server_screen redeclared, long_form controls redefined, or overrides with different values | Insert only with modifications, and keep overridden values identical (MOD-13, MOD-09) |
Pressing a button gives canceled | The pressable cell has no collection_details on itself | A collection_details binding on the cell (COL-04) |
| Cells are empty on first open and fill after pressing something | Bindings of the cells in the router window have the default condition | always on collection_details and the length binding (COL-47) |
| A factory inside the router window creates nothing | The length binding has binding_condition: "visible" | Change it to always (COL-36) |
| Every cell draws button 0 | The parent of the fixed cells is a panel | Horizontal stack rows with collection_name (COL-38, COL-50) |
| Only the text inside the scroll area is empty while icons show | The label is on the same layer as the background | Icon layer: 2, label layer: 3 (LAY-55) |
| Buttons and the close button of other forms cannot be pressed | The scroll area is always present in every form | Put it only inside that form's window (LAY-57) |
| The pressed button number does not match the cell | label(), header() or divider() mixed in | Send all data entries with button() (COL-19) |
| Number values disappear or comparisons go wrong | A number-like string such as "12" turns into a number | A letter prefix §f12 (EXP-15) |
| On Windows the client freezes when the list opens | An expression divides a string by a number | (#v - 0) before dividing (EXP-49, EXP-16) |
| A marker passed through a variable does not match | Quotes put inside the variable value | An unquoted value (BND-33) |
| The body label in the router window is empty | #form_text is not readable under main_screen_content | Send the value as a button |
| A hidden slider of another screen asserts | Sliders placed statically | Create them only when there is a slider row (HOST-12) |
The multiselect row of a modal form is missing | Your row factory's control_ids has no multiselect | Add the multiselect key (HOST-47) |
| The same form piles up several times | A form is sent on every item use event | Add a cooldown or a check for an open form |
| The form does not show and is canceled at once | Another UI such as chat is open (UserBusy) | Reopen at intervals of a few ticks |
Version conditions
- On Windows 1.26.65, an expression that divides a string by a number froze the client. It did not freeze on mobile 1.26.63. On every version, convert with
(#v - 0)before dividing (EXP-49). #form_button_lengthstaying at the button count of the largest form seen so far was measured on Windows 1.26.52 and did not reproduce on Windows 1.26.65.1{conflict}(COL-34). If the grid cell count must be exact, send the cell count separately.- The modal form
multiselectrow exists in vanilla from 1.26.50. The 1.26.60 preview vanilla gives this row an upper label and a tooltip and changes the head button text to#multiselect_option_text. A pack that redraws this row checks the vanilla file again on each version (HOST-47). @minecraft/server-uihas nomultiselectinModalFormDataup to the 26.70 preview versions (2.4.0-rc, 2.5.0-beta) (COL-21).
How to check
- If the pack was just added, restart the game. The game reads the development pack folders at startup (DBG-18). If the screen does not change after editing a UI file, restart the game too.
- Turn on Content Log GUI in the creator section of the settings.
- Open a form without the marker. The vanilla window and buttons must appear unchanged. In the example this is the first menu form.
- Open the marked form. Icons and text of the cells must be filled from the first open. If they are empty, check the binding conditions (COL-47) and layers (LAY-55).
- Press a cell and check that the number in chat matches the pressed cell. If it is
canceled, see COL-04. - In the content log, look for
Unknown property,UI control reference not found,JSON UI parse failureandThe factory name should not be empty!(DBG-01, DBG-34).Unknown property [collection_index]means the cell parent is not a collection stack (COL-38). An expression is not correct just because the log is silent (DBG-33). - Turn it on together with other server form packs and check that each title opens its own window.
- If you changed a modal form, check the number and order of value places with
console.warn(r.formValues).
Further reading
- Reskinning server forms: title markers, the wrapping approach, layout gates, fixed-width records, performance measurements
- Server form API and form types: the three form classes, responses, raw form JSON, the vanilla
server_form.jsonstructure - Modal form multiselect row: row JSON, response, measurements
- JSON UI optimization section 9: the shared
server_form.jsonand the reason for each line - Grid button list: the original add-on of the minimal example
- Server form research screen: tabs, fixed cells, client-side selection, button order
- Screen hosts and data channels: HOST-04, HOST-06, HOST-11, HOST-12, HOST-34, HOST-46, HOST-47, HOST-51
- Collections and factories: COL-04, COL-09, COL-10, COL-19 ~ COL-23, COL-34, COL-36, COL-38 ~ COL-40, COL-47, COL-49, COL-50
- Bindings: BND-32, BND-33, BND-37
- Expressions and operators: EXP-15, EXP-16, EXP-36, EXP-49
- Modifying vanilla screens: MOD-09, MOD-13, MOD-20
- Controls and layout: LAY-30, LAY-55, LAY-57
- Pattern recipes: PAT-01
- Debugging, validation and version management: DBG-01, DBG-18, DBG-33, DBG-34
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
private-research | Private research (-) | - | 2026-11-13 | |
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 | |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 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 |
repo-multiselect | Modal form multiselect research (this repository) (server-form-multiselect/) | This project's material | 2026-11-13 | |
repo-chest-ui | Chest-UI analysis (this repository) (chest-ui/) | This project's material | 2026-11-13 | |
repo-bedrock-core | bedrock-core UI analysis (this repository) (bedrock-core/) | This project's material | 2026-11-13 |