This works as expected:
{"sprite":"block/emerald_block"}This does not, the missing-texture is displayed instead:
{"sprite":"item/emerald"}Expected behavior: should work, as it is the example provided in the wiki. (or at least was, I edited it)
I think the cause for this is the splitting of the “items“ and “blocks” atlases in 1.21.11.
Maybe a potential fix could be to just have some kind of smart thingy to automatically pick the right atlas depending on what prefix there is.
You could also just force the user to provide an atlas
Command to reproduce in-game:
/tellraw @s [{"text":"This works: "},{"sprite":"block/emerald_block"},{"text":" (block/emerald_block)"},{"text":"\nThis does not: "},{"sprite":"item/emerald"},{"text":" (item/emerald)"}]
Workaround: providing the items atlas
[{"sprite":"item/emerald","atlas":"items"}]
Thank you for helping us improve Minecraft! We saved your files: