Item renderer
inventory_item_renderer draws an item from one number, #item_id_aux. The value is item number x 65536 + data value, and the enchantment glint adds 32768 (ANI-23, proposal). Unlike drawing from a texture path, blocks show in 3D and the glint shows.
The problem is that item numbers change with the version and with the custom items turned on. For a static icon, write the item identifier in #item_name and the game fills in the number when the world is entered. An item picked at run time needs the number bound.
"diamond_sword_icon": {
"type": "custom",
"renderer": "inventory_item_renderer",
"size": [ 16, 16 ],
"property_bag": { "#item_name": "minecraft:diamond_sword", "#item_id_aux": 0 }
}
#item_id_aux and #item_name
- [ANI-06] An item icon gives
#item_id_auxtoinventory_item_renderer. The value isnumeric item ID x 65536 (+ data value). If a runtime value, bind it. A number written as a constant inproperty_bagis read as an old numeric ID when it is 257 or above and becomes a different item (ANI-51). Numeric IDs partly shift when custom items are registered and can differ per world. The shifting range differs by version: everything from 256 up to 26.30, 850 and above in 26.40 (850 and 851 not measured, C-33), 852~883 in 26.50, and 853 and above in 1.26.63 (measured, item numeric ID plan). Check that version's table or the game before use. Name a fixed icon by its identifier (ANI-51), and otherwise use a texture path when possible.{working pack, measured, conflict}(Source: AP 4.7, BC-facts, BW-ids, conflict C-33) - [ANI-51] When a
property_bagholds an item identifier in#item_nametogether with a numeric#item_id_aux(any value), the game rewrites#item_id_auxto that item's currentID x 65536 + data valuewhen the world loads. Soinventory_item_rendererdraws an item by name with no numeric ID table, and the icon does not break when numeric IDs shift between versions or because of custom items. The same apple was 883 on 1.26.65.1 and 887 on Preview 26.70.26. Theminecraft:prefix can be left out (golden_apple), andname:data valuesuch asminecraft:potion:21works. Blocks are drawn in 3D. When a name is given, the original#item_id_auxvalue is dropped (a bow given 7 got data value 0), and without the#item_id_auxkey nothing happens. An unknown name gives 0 and draws nothing. Only a name written literally worked. A variable ("#item_name": "$n", defined on a parent or on the control itself) and a#item_nameset by a view binding both gave 0. A community report says the opposite, that only a variable works. This happens in a pass over all UI definition JSON, not in the renderer, so#item_id_auxon apaneland animagewas rewritten too. Controls added by reloading the UI while in a world were not rewritten until the world was entered again (Preview). When#item_nameis missing or an empty string and the number is 257 or above (0x1010000or above), it works the other way. The number is then read as an old numeric ID, not the current one. 318 x 65536 becameminecraft:flint, not the diamond sword (318 today), so flint was drawn and the value was rewritten to flint's current number (359 x 65536). 430 x 65536 + 21 becameminecraft:acacia_door:21. Another control could read the written name withsource_control_nameand#item_name. Numbers of 256 and below (2 x 65536) are left as they are and get no name. So writing a current numeric ID directly in aproperty_bagdraws a different item for 257 and above (ANI-06). This pass runs once, after the resource packs are applied when a world is entered, and reads only the definition JSON loaded from the packs. On 1.26.65.1 it ran once on world entry (about 0.6 s, about 250,000 keys and values across all definitions) and did not run again on a UI reload in the world (Ctrl+R),/reload, opening the inventory or changing dimension. So values bound at run time are not rewritten. In a test that took the/titletext through a global binding, an icon givenminecraft:applein#item_namedrew nothing whether#item_id_auxwas 0 or missing, and an icon given apple's current number (57868288) in#item_id_auxdrew the apple. The renderer does not read#item_name; it uses only the#item_id_auxnumber. For items picked at run time, such as from a script form, send the number instead of the name (ANI-06), or keep one control per candidate with the name written literally and show only one. Custom item names work too: with a behavior pack holding one itemiir:probe_item, the name became 853 x 65536 and the item's icon was drawn, so a resource pack can tell whether another add-on's item exists. Turning that behavior pack on moved apple from 883 to 884 in the same world. Numbers of 257 and above that are not in the old ID table (600 x 65536, 2000 x 65536) got no name and kept their value, so they draw whatever has that current number (600 drew an item, 2000 drew nothing).{measured, code (binary)}(Source: 2026-12-03 Windows 1.26.65.1 and Preview 26.70.26 measurement and decompilation, community report 2026-12-03)
Cases at a glance
On world entry, every numeric #item_id_aux in a property_bag is rewritten from the #item_name in the same object as below (ANI-51).
#item_name | #item_id_aux | Result |
|---|---|---|
| A name | Any number | That name's current number. The original number is dropped |
| A name | No key | Nothing happens |
| An unknown name | A number | 0, nothing is drawn |
| Missing or empty | 257 x 65536 or above | Read as an old numeric ID, the name is written and the value becomes the current number. Left as is when not in the old ID table |
| Missing or empty | 256 x 65536 or below | Left as is |
A name given by a variable ("$n") or a binding, and a number bound at run time, do not go through this pass.
Layer
When the sum of ancestor layers is high, item icons are not drawn. In a chest screen they drew up to a sum of 94 and not from 99. The details are in ANI-38 in the renderer overview.
Related documents
- Inferring numeric item IDs from the Script API: how numeric IDs are laid out and what a script can compute
- HUD item icons: drawing items on the HUD by borrowing a player slot
- Renderer overview and list
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
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 |
private-research | Private research (-) | - | 2026-11-13 | |
advancementpack | AdvancementPack (r4isen1920) | MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920) | 0a79929 (analyzed v4.2, researched 2026-10-20) | 2026-11-13 |
bedrock-core | bedrock-core UI (@bedrock-core/ui) | MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core) | aee2bbd (analysis baseline, clone HEAD 51d5cf2) | 2026-11-13 |