mojira.dev
MC-121758

Item particle command doesn't properly display certain item NBT

The bug

When attempting to use items with NBT in the item particle command, it shows the particle of the default item without NBT, which is incorrect.

To find this, simply place a command block, and activate it with the following command inside:

/particle item minecraft:leather_chestplate{display:{color:11546150}} ~ ~ ~ 1 1 1 0 100 force @a

This should produce particles of a red leather chest plate breaking, however, it doesn't. It just shows a white leather chest plate breaking. This is true for any color value inputted.

Linked issues

Attachments

Comments 13

I can't test right now, but - what do you mean by "fails"? Does the command run successfully, but not behave right? (That's what it sounds like)

Interestingly, the particle packet should (if I read the code write when I updated that article) support full itemstack data now – including NBT. I guess that could be seen ingame by whether an enchanted pick displays the glint when it breaks (though, of course, there's a chance that the glimmer wouldn't render for other reasons...)

OK, checked the code – it does at least attempt to read and transmit the NBT. It would just be the particle rendering code that doesn't do anything with it (as is the case currently). I assume that the same thing would happen with leather armor breaking (which is a valid case, since A) that can be dyed so colors matter and B) uses NBT).

So this probably is valid, pending checking exactly where it's failing.

Sorry for the late reply, @unknown, I just reread your post. Yes, I mean the command is not working correctly, as it is not displaying NBT, and that is an issue for leather armor, as I updated the post.

Leather armor is at this moment, the only thing affected that I can find. CustomModelData works as expected (shows NBT properly.)

Can confirm in 20w48a.

3 more comments

Can confirm in 1.17.1. Video attached.

Can confirm in 1.18.2.

Can confirm in 1.19.

Can confirm in 1.19.2.

Also affects minecraft:potion, minecraft:splash_potion, minecraft:lingering_potion, and minecraft:tipped_arrow, they're always white (like the texture file), and ignore Potion, CustomPotionColor and custom_potion_effects. (Note that the splash and lingering potion can be observed without commands.)

CreeperMagnet_

(Unassigned)

Confirmed

Platform

Low

Rendering

Minecraft 17w45a, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w47a, Minecraft 17w47b, ..., 1.20.1, 23w31a, 23w32a, 1.20.4, 24w06a

Retrieved