Building menu screens from an entity inventory
Server form buttons draw item icons only from a texture path or a numeric ID, and a script often cannot settle the numeric ID (item numeric ID plan section 3). An entity inventory screen has the engine draw the real items in the entity slots, so vanilla items, custom items and other packs' items all come out right.
In this wiki, InvUI is a menu screen made by redrawing the chest screen of an invisible container entity with a resource pack. This page covers using InvUI as a menu like the research screen. The plan that uses InvUI to imitate server forms (DDUI) is in Imitating DDUI with InvUI.
Status: tested on 1.26.63 mobile (2026-11-14). The tests covered screen routing, the icon grid, client-side selection, elements drawn from slot names and durability, a button that reaches the script, and ways to open the screen. On 2026-11-15 a 2048 test covered modifications routing, picking by entity name, animation replay and flicker (sections 2.2 and 8). Several players and other devices remain (section 5).
1. Compared with a server form
| Topic | Server form | Entity inventory screen |
|---|---|---|
| Opening | The script opens it directly | A script cannot force it open. One player action is needed (section 3) |
| Icons | Texture path, or numeric ID | The engine draws the entity slots. Every item, 3D, glint |
| Icon count | As many as buttons | As many as entity inventory slots (more slots are readable even on the 27-slot screen, HOST-16) |
| Changing content | Close and reopen the form | Slot changes by the script show at once in the open screen |
| Text, conditions, textures, bars | Passed as form text | Passed as slot item names, lore and durability (section 2.4) |
| Input that reaches the script | Button index | Slot actions only. Buttons go through a slot quick move (section 2.5) |
| In-screen actions | Client-side with radio toggles | The same |
2. Setup
2.1 Entity
"minecraft:inventory": {
"container_type": "container",
"inventory_size": 27,
"private": false,
"can_be_siphoned_from": false
}
- It opens through
chest_screen.jsononly withcontainer_type: "container"andprivate: false(HOST-16). - A menu entity gets
minecraft:physics(no gravity, no collision),minecraft:pushable(not pushable) andminecraft:damage_sensor(no damage). - The resource pack entity uses an empty geometry with no bones so it is invisible.
2.2 Screen routing
The example add-ons insert their own window into the vanilla chest panels (chest.small_chest_panel, pocket_containers.panel) with modifications and pick it by the entity name ($container_title). They do not redeclare the screen definition small_chest_screen.
With two add-ons that redeclare the same screen, only one was used, by pack order: another test add-on's chest_screen.json was above, and the vanilla screen came out instead of the redeclaring one (measured, HOST-49). So the examples use neither the redeclaration of small_chest_screen that replaces $screen_content (HOST-18) nor a slot 0 marker item. Slot 0 of the examples is empty. The rule for identifying a screen by a slot item's durability is HOST-17.
A window that uses only modifications is drawn inside the chest panel that another add-on keeps on its vanilla side, even when that add-on redeclares the screen and is above it. This was checked only in the JSON UI tester (jsonui-tester) static simulation {unverified}.
2.2.1 Naming convention
The script names the menu entity's nameTag with the shared prefix §b§w, made only of format codes, plus a suffix that differs per example. $container_title of an entity chest screen is this nameTag (HOST-19).
| Example | Entity name |
|---|---|
| 2048 (section 8) | §b§w§2§0 |
| Entity Menu Lab (section 6) | §b§w§m§l. Only the menu mode gets the name; the lock experiment entity has no name, so the vanilla chest screen opens |
| Research screen (section 7) | §b§w§r§s |
| Matchmaking (section 9) | §b§w§m§m |
| Figure lobby (section 10) | §b§w§m§f |
The menu entity's name tag was not visible in first person (measured). Whether it shows in third person or to other players was not tested {unverified} (section 8.4).
2.2.2 Hiding vanilla (shared by the examples)
No property of a vanilla definition is overridden. One view binding is inserted with modifications into the bindings of each vanilla control to hide, and that binding reads a marker control inside the example's window.
pocket_containers.json (the 2048 example file; only the overlay name inserted into panel differs per example):
"panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [ { "e2048_overlay@e2048.overlay": {} } ]
}
]
},
"header_area": {
"modifications": [
{
"array_name": "bindings",
"operation": "insert_back",
"value": [ { "binding_type": "view", "source_control_name": "entity_ui_hide_vanilla", "source_property_name": "#entity_ui_vanilla_visible", "target_property_name": "#visible", "binding_condition": "always" } ]
}
]
}
background_panel and half_screen get the same binding. chest_screen.json inserts the same binding at the path key small_chest_panel/root_panel. These definitions have no bindings of their own (MOD-04, MOD-08).
The marker control sits inside host of the overlay in section 2.2.3.
"entity_ui_hide_vanilla": { "type": "panel", "size": [ 0, 0 ], "property_bag": { "#entity_ui_vanilla_visible": false } }
- The binding finds the marker on the screen through
source_control_nameand sets#visibleto false. The marker is insidehost, so it is built only when the name matches. Hidden controls are still found by the name lookup (BND-25), so the marker must be left out withignored, not hidden withvisible. - On screens without the marker (ordinary chest, barrel) the binding did not hide vanilla (measured, compatibility test packs).
- On mobile the grey background also disappeared and the window floated over the world like the classic UI, and there was no flicker while slot items changed every 0.5 s (measured, compatibility test packs).
- When several packs insert bindings into the same vanilla control, they all read the marker of the same name and write the same value.
modificationsfrom several packs stack (MOD-02). So add-ons outside the wiki that follow the marker nameentity_ui_hide_vanillaand the property#entity_ui_vanilla_visiblecan be turned on together. In a test with two test packs that know nothing of each other and the 2048 and matchmaking test packs switched to the same approach, all in one world, each opened only its own window (measured). - Leaving vanilla controls out with
ignoredwould be lighter, since they would not be built. Butignoredis a property that takes only$variables (FILE-16), so it has to be written on the vanilla definition, and that competes with other packs that write the same property (MOD-13).modificationscannot change properties (MOD-03). So vanilla is built and then hidden. The control count of the matchmaking test screen went from 369 to 2,375{unverified}(static simulation), but no slowdown was noticed in game (measured). - Desktop was not checked, because jsonui-tester does not apply
modificationsat a path key{unverified}.
2.2.3 Inserting the window
Each example inserts only its own overlay into the same two panels with modifications (small_chest_panel in chest_screen.json, panel in pocket_containers.json). The overlays of several examples stack in the same panel.
"small_chest_panel": {
"modifications": [
{
"array_name": "controls",
"operation": "insert_back",
"value": [ { "e2048_overlay@e2048.overlay": {} } ]
}
]
}
The overlay is built only when the full name matches. This is the definition in the 2048 example (rp/ui/e2048.json).
"overlay": {
"type": "panel",
"size": [ "100%", "100%" ],
"layer": 1,
"$bwiki_title": "$container_title",
"controls": [
{
"host": {
"type": "panel",
"size": [ "100%", "100%" ],
"ignored": "(not ($bwiki_title = '§b§w§2§0'))",
"controls": [
{ "entity_ui_hide_vanilla": { "type": "panel", "size": [ 0, 0 ], "property_bag": { "#entity_ui_vanilla_visible": false } } },
{
"cover": {
"type": "input_panel",
"modal": true,
"size": [ "100%", "100%" ],
"layer": 1,
"controls": [
{
"sync_grid": {
"type": "grid",
"size": [ 162, 54 ],
"layer": 1,
"grid_rescaling_type": "horizontal",
"maximum_grid_items": 27,
"collection_name": "container_items",
"grid_item_template": "e2048.empty_cell"
}
},
{ "window@e2048.factory_window": { "layer": 2 } }
]
}
}
]
}
}
]
}
ignoreddoes not see the control's own$declarations and is evaluated in the parent scope (FILE-34). So the copy variable goes on the parentoverlayand the childhostcompares it. In game only the setup with the copy on the parent was tested (measured).- When
ignoredis true the control is not built, so a chest with another name has none of that example's controls. In jsonui-tester the control count of a mobile ordinary chest went from 3,569 when hidden only withvisibleto 2,207{unverified}(static simulation). sync_gridis an empty grid placed to stop flicker when slots change. With this binding-hide setup, no flicker was seen even without the grid. Item type changes and many slots changing at once were not tested, so the example keeps the grid as a precaution (section 8.3).overlayandcoverare atlayer1. Withoverlayat 50 andcoverat 100, only the window'sinventory_item_renderericons were not drawn, while names, counts and backgrounds were (measured). Lowering both to 1 drew the icons (measured, ANI-38). This agrees with a community report that an item renderer at layer 100 hid items while 4 and 50 were fine.- The limit depends on the sum of all ancestor layers, not on the control's own
layer. In a chest screen with an outer window at 1, a cover at 1 and a window at 2, item renderers andlive_player_renderercontrols were lined up at layers 0 to 999. Both were drawn up to a sum of 94 inside the example and neither was drawn from 99. Wrapping the same cells in a panel with 148 more layers (sums of 152 and up) drew none of them (measured, mobile, 2026-11-16). The sum leaves out the ancestor layers of the vanilla chest panel, so the exact limit can only be placed between 94 and 99. Alive_horse_rendererin the same screen was drawn at every sum (measured). This renderer places the model at a fixed depth and draws with its own projection, so screen layers do not affect it (code). - A jsonui-tester check with the resource packs of the four examples and three test packs from outside the wiki, loaded together in both orders, showed only each name's own window with vanilla hidden, and only vanilla for a plain unnamed chest. In a game test with the four examples in one world, each entity also opened its own window without vanilla, and the unnamed Entity Menu Lab lock test entity opened the vanilla chest screen (measured).
2.3 Icon grid and selection
- Each cell's
inventory_item_rendererreads#item_id_auxofcontainer_itemsat itscollection_index. - Cells are radio toggles as in the research screen (
radio_toggle_group,toggle_group_forced_index). Selecting one shows a border and a large detail icon. Selection is handled only on the client and does not reach the server. - The toggles keep items in their slots. The toggle takes the cell press, so the item did not move.
lockModedoes not stop taking items out of entity slots. It does stop putting locked items into entity slots and dropping them (below). In the test, items with none, inventory and slot locks in a vanilla chest screen could all be taken out at once. The lock only worked in the player inventory: an inventory lock let the item move within the inventory, and a slot lock did not let it move.- The other direction is blocked. Items with inventory and slot locks could not be moved from the inventory into an entity chest slot. Inventory and slot locked items in entity slots could be taken out but could not be dropped (measured, mobile, 2026-11-16).
- A locked item's tooltip gets a "cannot be moved" line. That line also goes into the
#hover_textof section 2.4.
2.4 Drawing from slot names, lore and durability
#hover_text of container_items is read per slot. Different slots on one screen gave different values. When the script changed a slot item, the value in the open screen changed at once (lore updated every second, the name updated on every button press, HOST-17).
#hover_text holds every line the tooltip shows:
- The name. A renamed item is white italic, and an item with a rarity has that color (the totem of undying is yellow).
- Vanilla description lines (a storage line on a chest, the attack damage line on a sword).
- The lore (purple italic).
- The lock notice line.
So a data item that carries a value is an item with no vanilla description lines (paper) with only a name, and it is not locked. Then (#hover_text - '§o' - '§f' - '§r') leaves just the name. With locked items the lock line was attached, and both the texture path and the number conversion failed.
| Drawn | Expression | Result |
|---|---|---|
| Label | #hover_text to #text | Name, lore and description lines in tooltip format |
| Name and lore of the selected slot | The same label inside the cell toggle's checked control | The selected slot's value |
| Visibility | (not ((#hover_text - 'STATE_ON') = #hover_text)) to #visible | Switched every second with the name |
| Texture | ('textures/blocks/wool_colored_' + (#hover_text - '§o' - '§f' - '§r')) to #texture | The wool color followed the name |
| Bar (name) | (1 - ((#hover_text - '§o' - '§f' - '§r') * .1)) to #clip_ratio | Filled by the name 0 to 10 |
| Bar (durability) | (1 - (#item_durability_current_amount * .004)) to #clip_ratio | Shrank with the iron sword's remaining durability |

Bars have two conditions.
-
Real literals start with a dot.
0.1evaluates to 0 (EXP-27) and the bar stayed empty. With.1it filled. -
Put
#clip_ratioin through a binding that reads a slot value. In the test, a fill withclip_directionstayed empty whenever its ratio came from any of these:property_bagvalues 0 and 0.5- expressions that use no slot value,
(1 - 1)and(5 * .1) - a changed size,
clip_pixelperfector direction - a bar placed outside the rows that read slots
A fill with no
clip_directionshowed.

A label draws its value only when the value is text. This comes from a side by side comparison in a chest screen (measured, mobile, 2026-11-16).
| Value | As is | With 'v' or '§r' in front |
|---|---|---|
Durability #item_durability_total_amount, #item_durability_current_amount | Not shown | 'v' + showed only v, '§r' + showed nothing |
Slot name 219 read with (#hover_text - '§o' - '§f' - '§r') | Not shown | 'v' + showed v219 |
Slot name 219 (leading space) | Not shown | '§r' + showed 219 |
Slot name 1,532/4,096 | Not shown | '§r' + showed 1 (only the leading integer is kept, EXP-30) |
Comparison (#inventory_stack_count = '') | Not tested | 'v' + showed vtrue or vfalse |
A value that became an integer, like a number read from a slot name, shows as text once 'v' or '§r' is put in front of it. The durability values did not show in any way. The durability bindings most likely arrive as real numbers, and joining a real number to text gives empty text (EXP-22) (code, inference). Put durability meant for the screen into the name or lore as text.
A variable inside a size array such as [160, "$line_h"] gave a height of 0 and the rows overlapped. Pass a whole-array variable such as "size": "$line_size".
2.5 A button that reaches the script
In JSON UI, the only direct path to a script is a server form button. What reaches the server from a container screen is a slot action, so the visible button is mapped to a quick move of a hidden slot.
"start_button": {
"type": "button", "size": [ 144, 20 ], "layer": 2,
"default_control": "default", "hover_control": "hover", "pressed_control": "pressed",
"bindings": [ { "binding_type": "collection_details", "binding_collection_name": "container_items" } ],
"button_mappings": [
{ "from_button_id": "button.menu_select", "to_button_id": "button.container_auto_place", "mapping_type": "pressed", "consume_event": false },
{ "from_button_id": "button.menu_ok", "to_button_id": "button.container_auto_place", "mapping_type": "focused", "consume_event": false }
]
}
- The button sits at
collection_index: 26inside a stack panel withcollection_name: "container_items". - The script keeps a button item with a marker name in slot 26.
- A press quick-moves that item into the player inventory.
- Every 2 ticks the script checks slot 26. When the marker item is gone, it counts a press and refills the slot.
world.afterEvents.playerInventoryItemChangedeletes the marker item that entered the player inventory.
Writing the result of a press into a data item name makes the open screen react at once. In the test, every press changed the slot 12 name Pressed N and the label showed it.
Pressing the slot itself stopped being detected after 2 presses on a touch screen. On touch, the first tap on a slot press (button.container_take_all_place_all) button left the slot as it was, and a second tap on the same button did too. A tap on another slot press button then swapped the items of the two slots. No item went to the inventory or the cursor (measured, mobile, 2026-11-16). A slot press on touch picks the slot with the first tap and swaps it with the slot tapped next (this matches "the cursor is not filled on touch" in HOST-20). A quick move does not go through this picking.
3. Ways to open the screen
The Script API has no function that opens a container screen. On Discord the answer "it cannot be forced open" came up again and again (2025-10-23, 2026-03-09, 2026-09-10). So one player action is always needed.
| Method | How | Result on 1.26.63 mobile |
|---|---|---|
| C: tap a visible entity | Spawn the entity in front of the player, who taps it | Opens. The entity has to be visible to be found, which is awkward for a menu |
| C2: entity in the line of sight | While the menu item is held, an invisible 1.2x1.2 entity moves every tick to 1.2 blocks along the view direction from the eyes, 0.6 blocks down. Tapping the middle of the screen taps that entity | Opens with one tap. Switching to another item removes the entity. The best usability |
| C3: ride + inventory button | The script seats the player on an invisible entity with Rideable.addRider. When the player presses the inventory button, the entity's screen opens instead of the player inventory | Opens. Sneaking gets off. Getting off removes the entity |
The menu entity opens with C2.
C3 works because the inventory button does not pick the screen on the client. The button only sends an open-inventory request to the server, and the server picks what opens. While the player rides, the server can open the vehicle's container, the same path that opens the inventory of a chest boat or a donkey (code).
Seating the menu entity on the player is not used. An entity with the parrot_tame family can ride the shoulder seats of the vanilla player.json. A shoulder rider is not tappable unless it has minecraft:rideable with rider_can_interact: true, and even then only from one direction.
When the client picks the entity to tap, it leaves out its own passengers, the vehicle it rides, and other passengers of the same vehicle (code). A shoulder rider not being tappable as is matches this, and rider_can_interact turns on the exception to it (code). Leaving out the vehicle and fellow passengers was not tested in game. So an entity the player rides, as in C3, most likely cannot be opened by tapping, and C3 opens with the inventory button (inference).
Giving the riding entity its own minecraft:rideable with rider_can_interact: true made it tappable. It has 1 seat and family_types set to a family nothing has, so nothing actually rides it. With it on one shoulder and a cube without this value on the other, the interact button showed from one direction only, and pressing it opened the chest screen of the entity with this value (measured, mobile, 2026-11-16). Since the button shows from one direction only, C2 stays the better way to open a menu.
"minecraft:rideable": {
"seat_count": 1,
"family_types": [ "bwiki_nobody" ],
"rider_can_interact": true,
"seats": [ { "position": [ 0, 0.5, 0 ] } ]
}
C2 position in the line of sight:
function spotInFront(player, distance, drop) {
const view = player.getViewDirection();
const eye = player.getHeadLocation();
return { x: eye.x + view.x * distance, y: eye.y + view.y * distance - drop, z: eye.z + view.z * distance };
}
The C3 entity has minecraft:rideable with family_types: ["player"] and seat position: [0, 0, 0]. While riding, the hint action.hint.exit.<entity identifier> showed untranslated. Add this key to the resource pack language file. Depending on the input method, the client first looks up action.hint.exit.scheme.<name> or action.hint.exit.console.<name>, and uses action.hint.exit.<name> when that has no translation (code). The vanilla language file has both forms, as in action.hint.exit.pig and action.hint.exit.scheme.pig. Add the scheme. and console. keys only for different text per input method; otherwise the one default key is enough.
Other workarounds mentioned on Discord were not tested.
- Put an entity inside a furniture block with a hit box a little larger than the block, so tapping the block taps the entity (2025-10-22, 2026-03-09).
- A 26.50 preview mention that interacting with a custom block that has a container opens the inventory screen (2026-08-21). On Windows 1.26.65 with the "Upcoming Creator Features" experiment on, a block with
containerinminecraft:block_entityopened a chest UI when used (section 8.4, measured). Using it as a block menu was not tested. - A report that a seat far from the entity center opens the screen and closes it at once (2026-05-05). C3 put the seat at the center.
4. Test summary (1.26.63 mobile, 2026-11-14)
| Checked | Result |
|---|---|
| Picking the window by the durability of the slot 0 item | Works. The vanilla chest screen is unchanged. The examples pick by entity name instead (section 2.2) |
| Slot durability bindings | #item_durability_total_amount and #item_durability_current_amount hold the maximum durability (4242 for the tested item). #item_durability_max does not exist |
| Icon grid | Vanilla items, 3D blocks and custom items all drew |
| Toggle selection with detail icon, name and lore | Works. Items do not move |
| Locked items | Taken out of entity slots regardless of the lock. Locked items in the inventory could not be put into entity slots, and locked items in entity slots could not be dropped |
Per-slot #hover_text | Differs per slot and updates in the open screen |
| Condition, texture and bar from the name | Works. The data item is unlocked paper |
| Bar from durability | Works |
Constant #clip_ratio | The bar stayed empty |
| Number to text | A value read from a slot name that became an integer showed with 'v' or '§r' in front. The durability values did not show (section 2.4, 2026-11-16) |
| Button by pressing the slot | Stopped being detected after 2 presses on touch. The first tap only picks the slot, and a tap on another slot button swapped the two slots |
| Quick move button | The count rose every time, past 10 presses. No button item stayed in the player inventory after closing (C, C2 and C3) |
| Opening with C, C2, C3 | All open. C2 was the easiest to use |
| C2 | One tap opened it while walking or turning. Moving the entity every tick while open did not close or flicker the screen. Other actions while holding the menu item were not hindered |
| C3 | The inventory button opened the menu instead of the player inventory. Sneaking got off |
| Entity on the player's shoulder | Not tappable as is. With minecraft:rideable and rider_can_interact: true it was tappable from one direction (section 3, 2026-11-16) |
5. What remains
- Several players: whether one player can tap another player's menu entity, and cleanup when each player has an entity. The client's open check lets only the entity's owner through when
restrict_to_ownerofminecraft:inventoryis true, and treats every player the same when it is false (code). One menu entity per player with that player as owner could keep others from opening it (inference, not tested). How to set the owner was not checked.privateis not part of this check (code). The interact button shows only while the entity's container private flag is off, though, so the need forprivate: false(section 2.1) may come fromprivateturning that flag on (inference). - Behavior on Windows, iOS and controller input (the
button.menu_okmapping). - Whether the name tag shows in third person and to other players when picking by entity name (section 8.4).
6. Test add-on
Entity Menu Lab puts the setup of sections 2.2 to 2.5 on one screen. The menu entity opens with C2.
- Turn on the behavior pack whose name starts with
[bedrock-research]entity-menu-lab-bpin a new world. The resource pack turns on with it as a dependency. - Take "Entity Menu Lab" (book and quill) from the end of the items category of the creative inventory, or use
/give @s bwiki:entity_menu_lab. - Hold the item and tap the middle of the screen to open the menu.
- Sneak and use the item to open the settings. Choose between the menu screen and the lock test (diamonds with none, inventory and slot locks in a vanilla chest screen). The lock test reports in chat whenever a count changes. The menu entity is named
§b§w§m§l, and the lock test entity gets no name, so the vanilla chest screen opens (section 2.2.1). - It can be turned on in the same world as the other entity inventory examples (section 2.2.3, measured).
| Row | Slot read | Content |
|---|---|---|
| Top eight cells | 1 to 8 | Icon grid. Selecting one shows a large icon, name and lore on the right |
| Slot 12 raw | 12 | Pressed N on every button press |
| Slot 14 gate | 14 | The name switches between STATE_ON and STATE_OFF every second |
| Slot 15 texture | 15 | Wool texture from the color in the name |
| Bag and View bars | 16 | Constant #clip_ratio. Empty bars follow the rule in section 2.4 |
| Slot 16 name | 16 | Bar from the name 0 to 10 |
| Slot 17 dur | 17 | Bar from the iron sword's remaining durability |
| 15 raw, 16 raw, 15 path | 15, 16 | Raw values and the built path |
| Press: rename slot 12 | 26 | Quick move button |
Test add-on measurement video (mobile 1.26.63, 2026-11-14, v1.6.0).
7. Example: research screen
This example draws the same window as the server form research screen (two tabs on top, an 8x6 grid with page arrows on the left, details and a start button on the right) as an entity inventory screen. Every third of the 120 research entries starts out done, and a research really runs when the materials are there.

7.1 Slot layout
The entity has 243 slots (HOST-16).
| Slot | Content |
|---|---|
| 0 | Unused (empty) |
| 1 to 48 | The 48 cells of the current page of the To do tab |
| 49 to 96 | The 48 cells of the current page of the Done tab |
| 97, 98 | Tab heads (icon, To do N, Done N) |
| 99 to 102 | Previous and next page buttons per tab |
| 103 to 124 | To do tab details: icon and name, status, description, 8 materials, 8 rewards, start button, done note, message |
| 125 to 146 | Done tab details (same layout) |
| 147 to 242 | One pick button slot per cell |
7.2 Compared with the server form version
| Topic | Server form research screen | Entity research screen |
|---|---|---|
| Icons | Numeric IDs | The engine draws the slot items |
| Picking a cell | Cell toggles. The server sends 20 detail buttons for every cell up front | A press quick-moves the cell's pick slot, and the script fills the 22 detail slots with that research |
| Switching tabs | Radio toggles | The same |
| Pages and starting | Form buttons. The form closes and opens again | Quick move buttons. The screen stays open and only slots change |
| Material and reward counts | Button text | The slot item amount, drawn with #inventory_stack_count |
Picking goes through the server, but the delay before the details changed was barely noticeable. The selection mark (yellow border) checks the cell item's lore for SELECTED.
7.3 Decisions
- Keep pick buttons in slots apart from the icon slots. Quick-moving the icon slot item emptied the slot for a moment, the empty-cell rule hid it, and the row shrank and grew back. Each cell gets its own hidden pick slot, and the cell keeps its size even when empty.
- Pass the start button state through the button slot item. Every half second the script counts the materials and adds or removes
READYin the button item's lore. WithREADYthe button draws a greenStart research, without it a greyNot enough materials. - Show the first tab's content when the screen opens. The first tab's content is visible while the second tab toggle is off (
(not #toggle_state)), and the first tab toggle hastoggle_default_state: true.
7.4 Example add-on
- Turn on the behavior pack whose name starts with
[bedrock-research]entity-research-screen-bpin a new world. The resource pack turns on with it as a dependency. It can be turned on in the same world as Entity Menu Lab and the other entity inventory examples (section 2.2.3, measured). - Take "Research" (enchanted book) from the end of the items category of the creative inventory, or use
/give @s bwiki:entity_research. - Hold the item and tap the middle of the screen to open the research screen.
- Sneak and use the item to reset the research and get 64 of each of the 10 materials.
Example add-on measurement video (mobile 1.26.63, 2026-11-15).
8. 2048 test: animation replay and flicker
This test draws 2048 with entity slots to check whether the tile slide animations can replay on every move in an open chest screen (mobile 1.26.63, 2026-11-15). The screen opens with C2 and is inserted the way section 2.2 describes. The example add-on Entity 2048 (section 8.5) is that test pack tidied up, and the code below is copied from its files. The example add-on differs from the test pack in names, identifiers, the prefix convention of section 2.2 and the layers of section 2.2.3. The example add-on also opened its own screen in game (measured, in a test with all ten wiki examples in one world).
8.1 Slot layout
The entity has inventory_size: 243.
| Slot | Content |
|---|---|
| 1 to 16 | Mover layer. Old value at the old position. Name example L2at5 (left by 2 cells, marker a, value 2 to the 5th) |
| 17 to 32 | Result layer. New value at the new position. Name examples Mbt6 (merged), Pat1 (spawned), Nat3 (unchanged) |
| 33, 34 | Score, status text |
| 36 to 40 | Up, down, left, right and New buttons (quick move buttons, section 2.5) |
Mover codes are S0 (stays) or a direction U, D, L, R followed by a distance of 1 to 3. Result codes are N, M and P. Empty cells have no item. Data items are paper with only a name, read with (#hover_text - '§o' - '§f' - '§r') (section 2.4).
8.2 Animation replay
To replay an animation from the start in an open screen, make the factory build its control again (measured, ANI-37).
This is factory_mover_cell from rp/ui/e2048.json with only two keys kept. The real file lists every key.
"factory_mover_cell": {
"type": "stack_panel",
"size": [ 30, 30 ],
"factory": {
"name": "e2048_mover",
"control_ids": {
"S0at1": "@e2048.ft_S0_1",
"S0bt1": "@e2048.ft_S0_1"
}
},
"property_bag": {
"#k": [],
"#kS0at1": [ "S0at1" ],
"#kS0bt1": [ "S0bt1" ]
},
"bindings": [
{
"binding_type": "collection",
"binding_collection_name": "container_items",
"binding_name": "#hover_text",
"binding_condition": "always"
},
{
"binding_type": "view",
"binding_condition": "always",
"source_property_name": "('#k' + (#hover_text - '§o' - '§f' - '§r'))",
"target_property_name": "#collection_length"
}
]
}
- In each cell one
stack_panelfactory looks upproperty_bagwith('#k' + name)to set#collection_length(COL-22, COL-23) and builds the one control of that key fromcontrol_ids. For an empty cell#kis an empty array, so nothing is built. The real pack has a generator make keys for 13 mover codes and 3 result codes times 13 values and 2 markers. - On every move the script flips the marker in the names between
aandb. Even when the same tile stays in the same place the key changes, so the factory builds a new control and that control'sanimsplayed from the start (measured). - Keeping one variant panel per marker and switching only
#visibleshowed no slide. Being hidden and shown again does not replay an animation (measured).
The tile animations:
- A mover tile goes to its destination with
offsetover 0.12 seconds and reachesalpha0 at 0.17 seconds. - A result tile stays at
alpha0 for 0.12 seconds and then shows. A merged cell grows fromsize28 to 34 and back, and a spawned cell grows from 0. - Waiting steps are
alphaandsizeanimations with equalfromandto, chained withnext. - The result layer is on a layer above the mover layer.
8.3 Flicker and the empty grid
At the moment a slot item changed, the cells of a container_items grid were drawn above other controls for one frame. Grey cells came up over our window for an instant, and the whole board seemed to flicker (measured, HOST-50).
| Setup behind the window | Result |
|---|---|
| Vanilla chest screen not hidden | No flicker was seen. The vanilla chest screen showed next to the window |
Vanilla hidden with visible: false, no grid | The whole board flickered grey |
Vanilla hidden, grid of 27 common.pocket_ui_container_item cells | The whole board flickered |
| Vanilla hidden, grid of 1 vanilla cell | Only that cell's area flickered |
Vanilla hidden, container_items grid of 27 empty panel cells | No flicker |
| Vanilla not hidden, whole screen covered with an opaque backdrop | No flicker, but with the whole screen covered it no longer looked like a form |
All of these are measured. Forcing a layout pass with a label whose width changed on every move did not remove the flicker (measured). So a grid of empty panel cells goes behind the window. That grid is sync_grid inside cover of the overlay in section 2.2.3, and its cell template is:
"empty_cell": {
"type": "panel",
"size": [ 18, 18 ]
}
- The tests in the table hid vanilla with
visible: false. The current setup, which turns#visibleoff with a binding (section 2.2.2), also had no flicker with the empty grid in place (measured, compatibility test packs). - With the binding setup there was no flicker even without a grid. The names of five paper items changed every 0.5 seconds while the grid behind the window was switched among five variants: a
container_itemsgrid of 27 empty panel cells, no grid, the same grid withvisible: false, aninventory_itemsgrid, and a grid of 1 empty panel cell. Whether the changing slots were inside the vanilla chest grid (slots 5 to 9) or outside it (slots 30 to 34), a frame by frame comparison of the recording at 1/30 second steps found no flickering frame (measured, mobile, 2026-11-16). Changes of item type and many slots changing at once were not tested, so the example keeps the empty grid. - Whether the grey drawn without a grid is the hidden vanilla cells, and why an empty grid makes the flicker go away, is not known.
- With vanilla cells visible, the flicker may have gone unnoticed because the vanilla cells or background covered it (inferred).
- If the screen flickers on every click, the cause may be
#hover_textrather than this grid. On every slot press (an empty one too) the client empties the slot's#hover_textfor about 50 to 100 ms, so titles, entity renderers and(#hover_text = '')silhouettes that read it directly flickered together. Reading data slots through a BND-18 latch and testing empty slots with(#item_id_aux < 1)removed it (HOST-50, InventoryMonitor, Windows 1.26.65, measured 2026-11-28).
8.4 Container title and name tag
- The title of an entity chest screen is the nameTag (measured, HOST-19).
minecraft:inventoryand the Script APIContainerandEntityInventoryComponenthave no field or function that sets the title apart from the nameTag (Microsoft Learn documentation). - Community reports disagree on whether the language file's
entity.<id>.namebecomes the title when there is no nameTag.{conflict} - A custom block can give a title with
container.title(a language key or text) ofminecraft:block_entity, and opens on tap withshow_ui_on_interaction(on by default), according to documentation and reports. A user reports it as an experimental feature in 26.50 and 26.60{single report}. The stringshow_ui_on_interactionis absent from the 1.26.52.3 (Android) and 1.26.63 (Windows) clients, and in 1.26.52.3containerreads only one key,slot_count(code). So these builds cannot use that field or the title, and both most likely arrived in a later build (inference). On Windows 1.26.65 with the "Upcoming Creator Features" experiment on, a block with onlycontainer: { "slot_count": 3 }opened a chest UI with 3 slots and no title when used (measured). minecraft:nameablehas no field that hides the name tag (allow_name_tag_renaming,always_show,default_trigger,name_actions). There is a report that a behavior-pack-only entity with no client entity file draws no name tag{single report}.- A candidate for hiding the name tag is
Entity.nameplateRenderDistance(writable from@minecraft/server2.8.0). Whether 0 hides it was not tested{unverified}.
8.5 Example add-on
- Turn on the behavior pack whose name starts with
[bedrock-research]entity-2048-bpin a new world. The resource pack turns on with it as a dependency. - Take "2048" from the end of the items category of the creative inventory, or use
/give @s bwiki:entity_2048. - Hold the item and tap the middle of the screen to open the 2048 screen. The direction buttons on both sides slide the tiles, and New starts a new board.
It can be turned on in the same world as the other entity inventory examples (Entity Menu Lab, the research screen) (section 2.2.3, measured).
9. Example: matchmaking queue
A matchmaking mockup for a server with several minigames. Each game has its own queue. Pressing Play joins the queue and the player slots fill up. The queue can be cancelled while waiting, and when the match is full a 10 second ready check appears. The other players are simulated players that the behavior pack adds and removes with random timing, and real players in the same world who join the same game's queue are put in one lobby. The open screen changes as soon as the script changes slot items (section 1).


9.1 States
| State | Screen | Buttons |
|---|---|---|
| Not queued | Name and description of the chosen game, "Not in queue", usual wait, players per match | Play |
| Queued | "Finding match...", time in queue, estimate, player slots (you, others, empty), 5 / 8 players, the last join or leave | Cancel |
| Match found | "Match found!", seconds left, a bar that drains over 10 seconds, green checks on the slots of players who accepted | Accept, Decline |
| Starting | "Match starting", a 4 second count | None |
- The list on the left is Sky Duels (2 players), Bed Rush (8), Parkour Race (6) and Hide and Seek (10). Tapping a row chooses it. The game cannot be switched while queued. The chosen row has a blue frame, and the queued row has a green frame and a blinking dot. The "N playing" numbers drift a little every 3 seconds.
- The queue continues after the screen is closed, and the action bar shows the game, the time in queue and the player count. When a match is found, a sound plays and the action bar says how to accept.
- If anyone declines, the ready check fails at once. Whoever declined leaves the queue, and the others go back to the queue with their queue time kept. Anyone who does not answer within 10 seconds is removed. When everyone accepts, the screen goes back to the start after 4 seconds. No game is played.
9.2 Slot layout
The entity has inventory_size: 243 and the name §b§w§m§m (section 2.2.1).
| Slots | Content |
|---|---|
| 1-20 | 4 game rows x 5 slots: button, name, subtitle (mode or "In queue 0:12"), player count, row state key (S chosen, Q queued) |
| 21-28 | Game name, description, header, clock, estimate, player count text, last event, footer (notice or version) |
| 29, 30 | Main button (Play, Cancel, Accept), second button (Decline) |
| 31 | Ready check bar key (Ta, Tb) |
| 32-41 | 10 player slot keys (E empty, F other player, Y you, A accepted, X declined). Games with fewer than 10 players use the middle slots |
| 42, 43 | Main and second button labels |
9.3 Screen
- Text reads the slot name with
(#hover_text - '§o' - '§f' - '§r')(section 2.4). Font size and alignment come from the variables$emm_scaleand$emm_align. - Player slots, row frames and the ready bar are built like the 2048 tiles: a
stack_panelfactory looks upproperty_bagwith the slot name as the key and builds one control (COL-22). When the key changes the control is built again, so the grow animation plays each time a slot fills (ANI-37). - The ready bar drains over 10 seconds with a single
sizeanimation. The script does not send the time left; it switches the key betweenTaandTbfor each ready check so the bar is built again. - Buttons reach the script through quick move of a slot (section 2.5). The main and second buttons hide when their own slot is empty, through
#visible. Button labels are read from other slots and drawn over the buttons. - Text that starts with a digit gets a color code in front (
§1for the clock,§8for the player count). Otherwise the expression reads it as a number and0 / 8 acceptedbecomes0(EXP-30, EXP-44, jsonui-tester).
9.4 Random values
| Value | Range |
|---|---|
| Simulated players already in a new lobby | 0 to min(size - 2, half the size) |
| Time to the next join | Sky Duels 3-12 s, Bed Rush 1.5-6 s, Parkour Race 3-10 s, Hide and Seek 1-5 s |
| Party joins | 15%, 2-3 players (when there is room) |
| A simulated player leaves | 2.5% per second |
| A simulated player accepts | after 0.6 to 7.5 s |
| Ready check fails | 10% chance that one simulated player declines at 2-9 s, 5% chance that one does not answer |
| A simulated player stays after a failed check | 85% |
In a Node run with a stand-in for @minecraft/server, accepting automatically for 40 matches per game, the median time to the first match found was 9 to 23 seconds and about 9 to 15% of ready checks failed.
9.5 Example add-on
- Turn on the behavior pack whose name starts with
[bedrock-research]entity-matchmaking-bpin a new world. The resource pack turns on with it as a dependency. It can be turned on in the same world as the other entity inventory examples (section 2.2.2). - Take "Matchmaking" (compass) from the end of the items category of the creative inventory, or use
/give @s bwiki:entity_matchmaking. - Hold the item and tap the middle of the screen to open the matchmaking screen.
Measurement video (mobile, 2026-11-15). The video and the screenshots above come from the test pack v1.0.0 that this example was built from. The screen and the script behavior are the same as the example add-on; only the names, identifiers, vanilla hiding (section 2.2.2) and layers (section 2.2.3) differ. No problems were seen with the test pack (measured).
10. Example: figure lobby
This example uses the same queue flow as the matchmaking example in section 9 and draws every lobby member as a standing figure (an entity doll). A grid of 2 rows x 4 figure cells replaces the player slots (up to 8 people, you included), there are four emote buttons, and simulated players slowly look around. Its names and identifiers differ from the section 9 example, so both can be turned on in the same world.
10.1 Drawing the figures
Each cell has one live_horse_renderer that draws one entity. Several community reports say the renderer draws an entity when its #entity_id gets the Script API entity.id string. How to pass that id through slot names in a chest screen was found by measurement:
| Way | Slot name | Binding | Result (measured) |
|---|---|---|---|
| As is | -4294967295 | #hover_text straight into #entity_id | Not drawn. The value carries format codes |
| Quoted name | "-4294967295" | (#hover_text - '§o' - '§f' - '§r') | Drawn. The received value is -4294967295 without quotes |
| Two numbers joined | -4294, 967295 (two slots) | ('"' + #hi + #lo + '"') | Drawn |
| Digits only | -4294967295 | (#hover_text - '§o' - '§f' - '§r') | Not drawn. It turns into a number (EXP-30) |
| Screen value | none | global #entity_id | Not drawn. The chest screen does not provide it |
- The example uses quoted names. Real player cells hold
p"<id>"and simulated player cells holdb"<id>". Each cell has two renderers that receive the value withporbremoved, and only the one whose value changed is visible (#visible). - A
live_player_rendererin the same cell drew neither you nor other entities (measured). That test was inside an outer window at 50 and a cover at 100. With the layer sum lowered to 94 or less,live_player_rendererdrew you in the chest screen too (section 2.2.3, measured). Whether it draws other entities at low layers was not tested{unverified}. - The model is about twice as tall as the renderer control and spills out of the cell, so the cell uses
clips_children: true(measured). - A player's head sits at the top of the control, but a custom entity is drawn higher in the same control. Moving the control down by 1.35 times its size puts it where a player would be (measured at sizes 16, 24 and 32). With a center line drawn on a control that was not moved, the custom entity's feet sat on the control center. Comparing 1.35, 1.5 and 1.62 times at size 16 side by side, 1.35 matched the player best and the others sat lower (measured, mobile, 2026-11-16).
- An entity out of view (10 blocks behind you) was still drawn (measured). Cells for other real players were not tested
{unverified}. - Community reports say the renderer turns the model toward the cursor and that
#look_at_cursor: falsedoes not stop it. The code agrees: the onlyproperty_bagkey this renderer reads is#entity_id, and the angle depends only on the input method (code). Mobile has no cursor, so this report could not be checked in game. On mobile the figure was always drawn at the same default angle regardless of the entity's real facing, and a facing changed withsetRotationdid not show either (measured). Turning bones with an animation, as in section 10.3, did show in the figure (measured). - The renderer overwrites the entity's body and head rotation only while drawing and restores the original values afterwards. So the entity seen in the world and the server never see the changed rotation. This overwrite is also why
setRotationdid not show in the figure (code, not tested separately in game). - With a desktop mouse, the angle follows the distance between the control center and the cursor and turns at most about 31 degrees. On a phone with no cursor, the angle is fixed: about 16 degrees looking down and about 25 degrees to the side (code, angles not measured in game).
- The fixed phone angle can be cancelled by a root bone animation that turns the other way only when
q.is_in_ui. In alive_horse_rendererportrait inside a server form, a Steve figure with the root bone turned x -16 degrees and y +25 degrees faced forward (of the four combinations of x +-16 and y +-25, mobile, 2026-11-19, measured by the user,touch-probesadd-on). With a desktop mouse the angle changes, so this cancelling does not fit there (code, inference).
10.2 Simulated player entities
For every viewer, each simulated player gets its own entity bwiki:entity_matchmaking_figures_bot (Steve or Alex) placed at the viewer's feet. Its collision box is 0.1, so it does not catch the tap that opens the screen.
| Hiding it from the world | Result (measured) |
|---|---|
{ "*": "q.is_in_ui" } in the render controller part_visibility | Hidden in the world and drawn in the figure cell. The example uses this |
An animation that sets the root bone scale to q.is_in_ui ? 1.0 : 0.0 | Same |
!q.property('…') || q.is_in_ui in part_visibility (with a bool property) | Recorded as visible in the world in the first test. Hidden in two other tests (below) |
The same expression worked in another test. On dummies standing still, !q.property('…') \|\| q.is_in_ui (bool) and q.property('…') == 0 \|\| q.is_in_ui (int) hid them from the start when the property was set right after spawning. A bool dummy whose property was set 2 seconds later disappeared at that moment (measured, mobile, 2026-11-16). Two things differ from the test in the table: the entity in the table was moved in front of the player every tick and had a single render controller, while the entities in this test did not move and used a conditional render controller list picked by q.variant.
The two differences were then tested apart. Three dummies had a bool property set right after spawning: one with a single render controller moved every tick, one with a single render controller standing still, and one with the conditional list moved every tick. All three were hidden in the world. Only the conditional list dummy showed for a moment right after spawning and then disappeared (measured, mobile, 2026-11-16). That dummy changes its variant through an event after spawning, so before the event a controller without the property condition was likely picked (inference). Moving every tick and the render controller setup are not the cause of the first failure. The first test also had a control dummy with the property off at the same distance, so the dummy seen in the world may have been the control (inference).
10.3 Emotes and looking around
- The emotes are Hi (wave), Clap, Jump and Nod. A press plays
playAnimationon your player entity, and for a simulated player on that player's entity for every viewer. The emotes showed in the figure cells (measured). The player entity definition did not need to list the animations. - Body and head angles changed with
setRotationdid not show in the figures (measured). - So the gaze is passed as integer entity properties (
bwiki:yaw,bwiki:head_yaw,bwiki:pitch), and an always-running animation turns the root bone (root) and the head bone (head).q.propertywas readable inside the animation (measured). - The properties are targets. The client entity's
pre_animationmoves variables toward them every frame in proportion toq.delta_time(the body slowly, the head faster), and the animation uses those variables. The figures turned smoothly through the values in between (measured). The server sends properties only when the gaze changes. - A simulated player picks a new gaze every 1.5 to 4 seconds: head left and right -50 to 50 degrees, up and down -25 to 25 degrees, and with a 40% chance a new body angle of -45 to 45 degrees (near the front).
10.4 Slot layout
The entity has inventory_size: 243 and the name §b§w§m§f (section 2.2.1). Slots 1 to 43 match section 9.2, except that the player slot keys (32 to 41) are unused.
| Slots | Content |
|---|---|
| 44 to 67 | 8 figure cells x 3 slots: entity id (p"<id>" or b"<id>"), cell key (E empty seat, M another member, Y you, followed by A accepted or X declined), name |
| 68 to 71, 72 to 75 | 4 emote buttons and their labels |
10.5 Example add-on
- Turn on the behavior pack whose name starts with
[bedrock-research]entity-matchmaking-figures-bpin a new world. The resource pack turns on with it as a dependency. It can be turned on in the same world as the other entity inventory examples (section 2.2.2). - Take "Minigame Lobby" from the end of the items category of the creative inventory, or use
/give @s bwiki:entity_matchmaking_figures. - Hold the item and tap the middle of the screen to open the lobby. Pick a game and press Play to fill the figure cells.
The measurements (mobile, 2026-11-15) used the test packs v1.0.0 to v1.3.0 that this example was built from. The screen and the script behavior are the same as the example add-on; only the names, identifiers and layers differ (section 2.2.3; the test packs used 50 and 100). The example add-on itself has not been run in game yet {unverified}.
Related rules
| ID | Page | Content |
|---|---|---|
| HOST-16 to HOST-20 | Screen hosts and data | Entity inventory screen, slot identity, screen redeclaration, script-side cautions |
| HOST-48 to HOST-50 | Screen hosts and data | Picking by entity name, inserting the window with modifications, an empty grid against flicker |
| BND-25 | Bindings | source_control_name search scope, hidden subtrees are searched too |
| ANI-37, ANI-38 | Images and animation | Replaying animations by building the control again, an item renderer not drawn at a high layer |
| COL-22, COL-23 | Collections and factories | Picking factory kinds with a property_bag dictionary lookup |
| FILE-16, FILE-34 | Files and definitions | ignored takes only $ variables and is evaluated in the parent scope |
| MOD-02, MOD-08, MOD-13 | Modifying vanilla screens | modifications from several packs stack, hiding by adding a binding, using only modifications that define nothing |
| ANI-03 | Images and animation | Progress bars drawn with #clip_ratio |
| ANI-06 | Images and animation | The item renderer and #item_id_aux |
| EXP-27 | Expressions | Real literals that start with a dot |
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 | |
private-research | Private research (-) | - | 2026-11-13 |