Tooltip and name for items fail to render NBT text components.
Example with /give
Execute as player:
/give @s stick[ item_name=[ { "type":"nbt", "entity":"@s", "nbt":"Health" } ]]Expected Result In Lore:
20Actual Result In Lore:
Example with /item
Execute as player:
/item modify entity @s weapon.mainhand {"function":"minecraft:set_components","components":{"minecraft:lore":[{"text":"Health:","type":"text"},{"entity":"this","nbt":"Health","type":"nbt","interpret":true}]},"conditions":[]}Expected Result In Lore:
Health: 20Actual Result In Lore:
Health: Environment
Windows 11 pro
You can do this with the
set_nameitem modifier 🙂