The bug
Invulnerable item entities and XP orbs disappear / are removed from the world client-side when they take damage. However, they are still in the world server-side and once the player gets close to them he collects them.
How to reproduce (item)
Summon an invulnerable item entity
/summon item ~2 ~ ~ {Invulnerable:1b,Item:{id:"stone",Count:1b}}
Ignite the block below it with a Flint and Steel and put out the fire afterwards
→ The item is not visible anymoreMove towards the position the item was
→ It is still there and you can collect it
How to reproduce (XP orb)
Place a command block with the following command
/summon armor_stand ~ ~ ~ {Invulnerable:1b,Passengers:[{id:"experience_orb",Value:10s,Invulnerable:1b}]}
Set the top of the command block on fire and put out the fire afterwards
→ The XP orb is not visible anymoreMove towards the position the XP orb was
→ It is still there and you can collect it
Types of damage
Fire
Lava
Cactus
Code analysis
Code analysis by @unknown can be found in this comment.
Attachments
Comments 40
I've alwasy considered the Invulnerable Tag as a way to create Entities that can only be damaged by /kill or by the Void, that's why I think the fire should not affect the Item Entity if it's invulnerable. Also, the Invulnerable Tag works like a boolean (but it's TAG_Byte), so anything with Invulnerable:1 is invulnerabe forever. You can confirm that easily by spawning an invulnerable Cow (for example), waiting for a while and then hitting it (you have to be in Survival, because you can damage invulnerable mobs in Creative). I've tested your suggestion anyway and I had the same results like the ones that I put into the report (Item Entity is still there, but invisible when set on fire). So I guess it's not invalid, but either the Item Entity should get deleted, or it should stay visible.
MC-51195 happens when you hit a mob with the Invulnerable Tag while you're in creative mode. This happens when you set an invulnerable item on fire. If I set a cow with the invulnerable tag on fire neither does it stop rendering nor does it take damage, it takes no damage at all, no matter if I'm in creative mode or survival mode.
But I've still tested your suggestion Blah and the item stops rendering, no matter if I'm in creative mode or in survival mode. Therefore my report is not invalid.
Blah, stop linking incorrect issues please!
The "Invulnerable" tag says if the item can get killed/destroyed (exeptions: Player in creative/"/kill" command). This is for all kind of damage which means it is not destroyable by lava, fire, tnt, hits, drowning...
First of all, when the item would really get destroyed, it would be incorrect because it should be immune against every kind of damage (with exeptions).
Second like I wrote and the other users here too, you can still pick it up, water makes it visible again and reloading also works to make it visible, so this is neither a duplicate nor invalid.
I can no longer reproduce this in 22w07a, looking at the diff, this was fixed at the same time as MC-246465
The Item Entity is flagged as Invulnerable in the NBT Tags and therefore should not be affected by the fire, also it does not go away as you said, in the screenshots you can clearly see that the same Item Entity still exists in the world it just isn't getting rendered/shown.