Skip to main content

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 wantThis methodAlternative
Draw an ActionFormData button list as a grid, shop or tab screenFits. Five wiki examples worked in game with this setup-
Open a list of a few hundred to 2000 buttonsFits. 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 formPossible, 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 windowDoes 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 screenDoes not fit. A form cannot change values after it opens; it has to be sent againA chest screen (Chest UI) or a HUD channel
A checkbox multi-select row is neededThe Script API has no multiselectSeveral 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.jsonDDUI server guide
Release it as a Marketplace cooperative add-onAvoid. 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.

rp/manifest.json
{
"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]
}
]
}
rp/ui/_ui_defs.json
{
"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).

rp/ui/server_form.json
{
"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"
}
]
}
}
rp/ui/jup.json
{
"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" }
]
}
}
bp/manifest.json
{
"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" }
]
}
bp/scripts/main.js
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.

  1. When the title starts with §b§w, vanilla long_form and its button row are hidden, and the factory of the hidden button row creates no cells because its length binding has the visible condition (BND-32).
  2. The router prepends '#' to the first 10 bytes of the title and looks the result up in property_bag. If the key exists it creates one window, otherwise nothing (HOST-06, COL-22, COL-23).
  3. The grid creates a cell for each button of the form_buttons collection, and a cell sends the pressed button number to the script through collection_details and button.form_button_click (COL-04).
  4. The cell labels cut the button text by byte count into a name and a description.

Must match​

Entry and title check​

  • The namespace of server_form.json is server_form, and the file goes to ui/server_form.json in the resource pack.
  • Do not redeclare third_party_server_screen. Insert the router into the controls of main_screen_content with insert_back (HOST-51, MOD-13).
  • Set the size of main_screen_content to ["100%", "100%"]. Vanilla has [0, 0] (HOST-51).
  • The expression that hides vanilla long_form and 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§w is 6 bytes and §b§wjp:J is 10 bytes.
  • The property_bag key is # followed by the cut title as is ("#§b§wjp:J"), and the value is an array of control_ids keys (["j"]) (COL-22).
  • Put the router's factory on a collection container such as collection_panel. panel + factory created 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_form without @ to replace its controls. 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_details binding and $pressed_button_name: "button.form_button_click" on the cell itself. Without them the script gets canceled (COL-04).
  • Inside a window created by the router, set the grid length and the cell's collection_details to binding_condition: "always" (COL-47). Labels filled without always when the collection binding came first and the view binding that cuts its value came after (BND-37).
  • A fixed collection_index cell must be a direct child of a stack_panel that has collection_name. For a 2D layout, put horizontal stack rows with collection_name inside 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 under main_screen_content and was readable only inside long_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() and divider() also become collection items, but selection counts 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 $variable placed 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).
  • A modal form is created through the custom_form key of the control_ids of the same server_form_factory. The server_form.json above does not touch custom_form, so every modal form is drawn by vanilla.
  • To change a modal form, insert_back a "hide when my marker" binding into vanilla custom_form, and put your screen under the custom_form key of control_ids (HOST-04, PAT-01) {inferred}.
  • The rows are the custom_form collection with length #custom_form_length, and the row kinds are label, toggle, slider, step_slider, dropdown, input, header, divider and multiselect (COL-09).
  • The engine gives row values through bindings: label and header #custom_text, toggle #custom_toggle_state, slider #custom_slider_text and #custom_slider_value, dropdown #custom_dropdown_length and #custom_radio_text, input #custom_input_text and #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_form row factory with your own, put multiselect in its control_ids. Without it that row is not drawn (HOST-47).
  • formValues has one place per row in row order, and a label's place is null (COL-20). A multiselect place is an array of chosen indexes, and null when nothing is chosen (HOST-46).

Common mistakes​

SymptomCauseFix
My window does not showmain_screen_content has the vanilla size [0, 0]size: ["100%", "100%"] (HOST-51)
The vanilla form shows behind my windowThe vanilla long_form hiding binding is missing or uses a different marker from the routerAdd the hiding binding with the same prefix (HOST-51)
Ordinary forms are also drawn as my windowThe title gate is an or expression or a visible gateA property_bag dictionary lookup router (COL-39, HOST-06)
With another server form pack on, one pack's screen disappearsthird_party_server_screen redeclared, long_form controls redefined, or overrides with different valuesInsert only with modifications, and keep overridden values identical (MOD-13, MOD-09)
Pressing a button gives canceledThe pressable cell has no collection_details on itselfA collection_details binding on the cell (COL-04)
Cells are empty on first open and fill after pressing somethingBindings of the cells in the router window have the default conditionalways on collection_details and the length binding (COL-47)
A factory inside the router window creates nothingThe length binding has binding_condition: "visible"Change it to always (COL-36)
Every cell draws button 0The parent of the fixed cells is a panelHorizontal stack rows with collection_name (COL-38, COL-50)
Only the text inside the scroll area is empty while icons showThe label is on the same layer as the backgroundIcon layer: 2, label layer: 3 (LAY-55)
Buttons and the close button of other forms cannot be pressedThe scroll area is always present in every formPut it only inside that form's window (LAY-57)
The pressed button number does not match the celllabel(), header() or divider() mixed inSend all data entries with button() (COL-19)
Number values disappear or comparisons go wrongA number-like string such as "12" turns into a numberA letter prefix §f12 (EXP-15)
On Windows the client freezes when the list opensAn expression divides a string by a number(#v - 0) before dividing (EXP-49, EXP-16)
A marker passed through a variable does not matchQuotes put inside the variable valueAn unquoted value (BND-33)
The body label in the router window is empty#form_text is not readable under main_screen_contentSend the value as a button
A hidden slider of another screen assertsSliders placed staticallyCreate them only when there is a slider row (HOST-12)
The multiselect row of a modal form is missingYour row factory's control_ids has no multiselectAdd the multiselect key (HOST-47)
The same form piles up several timesA form is sent on every item use eventAdd a cooldown or a check for an open form
The form does not show and is canceled at onceAnother 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_length staying 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 multiselect row 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-ui has no multiselect in ModalFormData up to the 26.70 preview versions (2.4.0-rc, 2.5.0-beta) (COL-21).

How to check​

  1. 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.
  2. Turn on Content Log GUI in the creator section of the settings.
  3. Open a form without the marker. The vanilla window and buttons must appear unchanged. In the example this is the first menu form.
  4. 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).
  5. Press a cell and check that the number in chat matches the pressed cell. If it is canceled, see COL-04.
  6. In the content log, look for Unknown property, UI control reference not found, JSON UI parse failure and The 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).
  7. Turn it on together with other server form packs and check that each title opens its own window.
  8. If you changed a modal form, check the number and order of value places with console.warn(r.formValues).

Further reading​

Sources
idSourceLicenseCommitAccessed
private-researchPrivate research (-)-2026-11-13
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13
bedrock-samplesMojang bedrock-samplesMinecraft EULA applies, (c) Mojang AB. All rights reserved15701fa9 (guide baseline 46ba6ea)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
repo-multiselectModal form multiselect research (this repository) (server-form-multiselect/)This project's material2026-11-13
repo-chest-uiChest-UI analysis (this repository) (chest-ui/)This project's material2026-11-13
repo-bedrock-corebedrock-core UI analysis (this repository) (bedrock-core/)This project's material2026-11-13