Skip to main content

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_aux to inventory_item_renderer. The value is numeric item ID x 65536 (+ data value). If a runtime value, bind it. A number written as a constant in property_bag is 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_bag holds an item identifier in #item_name together with a numeric #item_id_aux (any value), the game rewrites #item_id_aux to that item's current ID x 65536 + data value when the world loads. So inventory_item_renderer draws 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. The minecraft: prefix can be left out (golden_apple), and name:data value such as minecraft:potion:21 works. Blocks are drawn in 3D. When a name is given, the original #item_id_aux value is dropped (a bow given 7 got data value 0), and without the #item_id_aux key 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_name set 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_aux on a panel and an image was rewritten too. Controls added by reloading the UI while in a world were not rewritten until the world was entered again (Preview). When #item_name is missing or an empty string and the number is 257 or above (0x1010000 or above), it works the other way. The number is then read as an old numeric ID, not the current one. 318 x 65536 became minecraft: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 became minecraft:acacia_door:21. Another control could read the written name with source_control_name and #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 a property_bag draws 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 /title text through a global binding, an icon given minecraft:apple in #item_name drew nothing whether #item_id_aux was 0 or missing, and an icon given apple's current number (57868288) in #item_id_aux drew the apple. The renderer does not read #item_name; it uses only the #item_id_aux number. 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 item iir: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_auxResult
A nameAny numberThat name's current number. The original number is dropped
A nameNo keyNothing happens
An unknown nameA number0, nothing is drawn
Missing or empty257 x 65536 or aboveRead 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 empty256 x 65536 or belowLeft 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.

Sources
idSourceLicenseCommitAccessed
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
private-researchPrivate research (-)-2026-11-13
advancementpackAdvancementPack (r4isen1920)MIT (confirmed in the repository LICENSE, Copyright 2024 r4isen1920)0a79929 (analyzed v4.2, researched 2026-10-20)2026-11-13
bedrock-corebedrock-core UI (@bedrock-core/ui)MIT (confirmed in the repository LICENSE, Copyright 2026 bedrock-core)aee2bbd (analysis baseline, clone HEAD 51d5cf2)2026-11-13