The bug
When a mob transforms into another mob (ex. zombie villager → villager, mooshroom → cow), it loses most of its NBT tags. This also affects conversions to the same mob, like slimes and magma cubes splitting.
It is worth noting CustomName
and NoAI
are preserved (MC-6773 & MC-67437), so other tags are expected to be saved as well.
Examples
The following is a list of tags that aren't transferred between entities.
From | Husk | Zombie | Skeleton | Zombie Villager | Villager | Villager | Pig | Piglin | Piglin Brute | Hoglin | Slime | Magma Cube | Tadpole | Mooshroom |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
To | Zombie | Drowned | Stray | Villager | Zombie Villager | Witch | Zombified Piglin | Zombified Piglin | Zombified Piglin | Zoglin | Smaller Slime | Smaller Magame Cube | Frog | Cow |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ✔ | ✔ | N/A | ✔ 7 | ✔ 7 | N/A | ✔ | ✔ | N/A | ✔ | N/A | N/A | N/A | ❌ |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A | ❌ | ❌ | N/A | N/A | N/A | N/A | N/A |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A | ❌ | ❌ | N/A | N/A | N/A | N/A | N/A |
| ✔ | ✔ | ✔ | ❌ 8 | ❌ 8 | ❌ 8 | ❌ 8 | ✔ | ✔ | ✔ | N/A19 | N/A19 | ❌ 8 | ❌ 8 |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ✔ | ❌ | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| ✔ | ✔ | ✔ | ⚠️ 9 | ❌ | ❌ | ❌ | ❌ | ❌ | ✔ | ❌ | ❌ | ❌ | ❌ |
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ 20 | ✔ 20 | ✔ | ✔ |
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ | ❌ | ✔ | ✔ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ 8 | ❌ 8 | ❌ 8 | ❌ 8 | ❌ | ❌ | ❌ | N/A19 | N/A19 | ❌ 8 | ❌ 8 |
| ❌ | ❌ | N/A5 | ❌ | ❌ | ❌ | N/A15 | N/A15 | N/A15 | N/A15 | ❌ | N/A23 | ❌ | ❌ |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | ❌ |
| N/A | N/A | N/A | ✔ | ✔ | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| ✔ | ✔ | ✔ | ❌ 8 | ❌ 8 | ❌ 8 | ❌ 8 | ✔ | ✔ | ✔ | N/A19 | N/A19 | ❌ 8 | ❌ 8 |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | N/A10 | ❌ | ❌ | ❌ | ❌ | ❌ | N/A21 | N/A21 | ❌ | ✔ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ ) |
| ✔ | ✔ | ✔ | ✔ | N/A10 | ❌ | ❌ | ❌ | ❌ | ✔ | ✔ | ✔ | ❌ | ✔ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| N/A4 | N/A4 | N/A6 | ✔ | ✔ 11 | ✔ 13 | ✔ 13 | N/A17 | N/A17 | N/A18 | ✔ | ✔ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| N/A | N/A | N/A | ✔ | ✔ | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | N/A | N/A | ❌ | ❌ |
| ✔ | ✔ | ❌ | ✔ | ✔ | ⚠️ 14 | ⚠️ 16 | ✔ | ✔ | ❌ | ✔ | ✔ | ⚠️ 16 | ✔ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ✔ | ✔ | ✔ | ✔ | ✔ 12 | ❌ | ❌ | ✔ | ✔ | ✔ | ❌ | ❌ | ❌ | ❌ |
| ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ❌ 22 | ❌ 22 | ✔ | ✔ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ 23 | ❌ 23 | ❌ | ❌ |
| N/A | N/A | N/A | ✔ | ✔ | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| N/A | N/A | N/A | ✔ | ✔ | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
| N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | ❌ | ❌ | N/A | N/A |
1 See MC-193083.
2 Not an actual tag saved on mobs, but it's the corresponding tag name on player data: the vehicle this entity rides, see also MC-193083.
3 Desynced, see MC-248587.
4 Cannot be converted (even when setting DrownedConversionTime
with commands), see MC-148935, consider to only not trigger/count down the timer if NoAI is present, and allow value 0 to convert.
5 Skeletons MUST be in powdered snow to convert, even via commands. Powdered snow extinguishes burning mobs.
6 Cannot be converted (even when setting StrayConversionTime
with commands), consider to only not trigger/count down the timer if NoAI is present, and allow value 0 to convert.
7 Since zombie villagers use IsBaby
instead of Age
, the time until growing up/being able to breed again is lost. Age gets set to 0 for adults and -24000 for babies upon converting to villagers.
8 The equipment is not dropped, nor brought over to the new form.
9 Always 1b
, MC-73178.
10 Mob needs to die to convert, cannot be converted by creative players.
11 MC-183860, fixed.
12 MC-163767,fixed
13 MC-67437, fixed.
14 Always 1b
, MC-239883, this could be resolved by making all villagers that spawned naturally be persistent instead and copying the value over.
15 Converted-to mob cannot burn, if this behavior will ever be toggle-able (for example via entity type tag), this should be synchronized though.
16 Always 1b
.
17 Cannot be converted (even when setting TimeInOverworld
with commands), see MC-172077, consider to only not trigger/count down the timer if NoAI is present, and allow value 0 to convert.
18 Cannot be converted (even when setting TimeInOverworld
with commands), consider to only not trigger/count down the timer if NoAI is present, and allow value 0 to convert.
19 Loot is dropped due to mob death.
20 MC-6773, fixed.
21 Mob needs to die to convert, can be converted by creative players.
22 Desynced, and randomized, see MC-248587.
23 Mob splits into multiple mobs, so UUID cannot be preserved for all. However, 1 of the mob should be capable to get it.
24 Magma cubes can't burn, if this behavior will ever be toggle-able (for example via entity type tag), this should be synchronized though.
Since zombie villagers can be converted to villagers and vise versa, the following data is problematic due to not being stored on one of the 2 parties, causing loss of data upon converting and converting back to the original form. This should probably be it's own report, but until the rest of this is fixed, it's just another "tags lost on conversion" entry.
Zombie villagers don't have
ForcedAge
,InLove
,Inventory
,LastGossipDecay
,LastRestock
,LoveCause
,RestocksToday
andWilling
.Zombie villagers don't use
Brain.memories.minecraft:home
,Brain.memories.minecraft:job_site
,Brain.memories.minecraft:last_woken
,Brain.memories.minecraft:last_worked_at_poi
,Brain.memories.minecraft:meeting_point
andBrain.memories.minecraft:potential_job_site
.Villagers don't have
CanBreakDoors
.
How to reproduce
Summon a mob with any of the above tags, and convert it.
/summon minecraft:zombie_villager ~ ~ ~ {Health:10.0f,Invulnerable:1b,Fire:100s,Tags:["foo","bar"],ConversionTime:0}
Once the mob converted, look at its NBT data
/data get entity @e[type=villager,limit=1,sort=nearest]
→ ❌ Note that the tags marked with ❌ do not persist
Related issues
is duplicated by
relates to
Attachments
Comments


Confirmed, but the title is wrong, it only apply to mobs that turn into an other one : Pigs and Villagers.
Kinda related to MC-67437.

This is MC-67437 (reopened that)

Okay but NoAI status does remain.

Yes, I was wrong.
The "villager -> zombie villager" case is covered by MC-11883.
edit: But only the profession and maybe the trades, your ticket is about tags in general.

Something like this could work to "fix" this:
For all tags in the entity:
If the tag is also a tag of the target entity (for example Witch), use the value for the tag
If the tag is not a tag of the target entitiy, ignore the tag

Confirmed for 1.12 release.
Zombie → Drowned is also affected by this, see MC-127307.
Is the set of tags that are transferred over the same between all current conversions?
Can confirm for 1.13-pre5.
Can confirm for 1.13-pre6.
Confirmed for 19w02a.
this creates a noticeable issue in the 1.14.4 version; as players infect and cure villagers for cheaper trades, named villagers become able to despawn when in the zombie villager state despite still having their names (appearing to the player to have Persistence).
Just watched MumboJumbo's video where his named villagers were converted to zombies and despawned. The player expectation is if you name the villager it makes the zombie villager safe, and given how much effort goes into unlocking the villagers this would be a very frustrating bug for anyone who's making villager trading setups.

Affects 1.15.1
Also effects zombie -> drowned conversion, but interestingly, not their PersistenceRequired tag, which gets transferred correctly.

Drowned | Villager | Cow | Slime | Zombie Villager | |
---|---|---|---|---|---|
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ✔ | ❌ | ❌ intended |
| ✔ | ✔ | ✔ | ✔ | ❌ |
| ✔ | ✔ | ✔ | ✔ | ? |
| ✔ | ✔ | ✔ | ✔ | ✔ |
I can confirm that this affects version 1.15.2. Another important nbt tag that gets lost when converting a Zombie Villager into a villager is the “CanPickUpLoot” tag.
| Drowned | Villager | Cow | Slime | Zombie Villager |
---|---|---|---|---|---|
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ❌ | ❌ | ❌ |
| ❌ | ❌ | ✔ | ❌ | ❌ intended |
| ✔ | ✔ | ✔ | ✔ | ❌ |
| ✔ | ✔ | ✔ | ✔ | ? |
| ✔ | ✔ | ✔ | ✔ | ✔ |
CanPickUpLoot | ✔ | ❌ | - | - | ❌ |

Of note, in 1.15.2 this still affects tags. Tags are lost when villager converts to zombie, and rescued back to villager.
Tags:["test_tag"]

@unknown Could I have ownership of this ticket to keep it up-to-date?
According to MC-172196, PortalCooldown
is affected as well.

Yes you can have this. It's been 4 years and nothing has happened with this bug so I lost interest long ago.

Same happens for the zombification of Piglins.

In 20w10a

In 20w11a

In 20w12a

Apparently NoAI affects cows again (in 20w15a): https://youtu.be/-mfiua5M6qg?t=236
I have noticed this with the direction the mob is looking. Mobs that convert into another mob don't keep the direction they are looking. This issue does not affect mobs that change the variant. For example if a mooshroom gets stuck by a lightning it keeps the direction, because it is not a seperate mob it is just a variant. Other data of the mooshroom should be also be kept.

In 20w18a

In 20w19a

In 1.16 pre-2

In 1.16 Pre 3
Confirmed for 1.16.1

you should add an image of piglins and piglin brutes transformed into zombified piglins, because that image with a zombie pigman refers to an old version, and with the 1.16 is useful having two images of that.
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05b.
Can confirm in 21w06a.
Can confirm in 21w07a.
I've attached an example video.
Can confirm in 21w13a.

Also affects the Attributes
tag.
This ticket is actively updated by @unknown, so I don't think there is any need to transfer ownership.
Wouldn't it just be easy to save the NBT data the mob had, and merge the data into the new mob (and apply other changes like the regeneration effect for villagers, and the dropping of equipment for drowned after that)?
(as permanent fix for this issue with all conversions)
Can confirm in 1.18.
Can confirm in 1.18.2.
This also affects Shulker Mob Duplication, tags like the colour are kept, but things like the DeathLootTable get deleted. Can confirm this on 1.18.2 (MC-251930)
I'd suggest reporting that separately, as it isn't a mob converting to another, but a new mob being spawned in.
Also affects villager to witch, husk to zombie, skeleton to stray, magma cube to smaller magma cube and hoglin to zoglin.
Also for slime to smaller slime, health should be "-" as that only happens on death.

Slimes and magma cubes should also not get the bigger mob's UUID because that would result in several entities with duplicated UUIDs.

This might also affect red mooshroom / brown mooshroom conversion.

This might also affect red mooshroom / brown mooshroom conversion.
That should not be the case since that conversion is done with an NBT tag rather than changing the entity ID.

Oops, I thought that they were separate entities 😛 You're right.
Zombie villager to villager does keep rotation, it's just desynced on the client: MC-248587.
Don't forget Pigs to Zombified Piglins via lightning
Can confirm in 1.19.2.
Villager to zombie villager keeps rotation, but it is desynced; only client believes it faces south.
Needs a HandItems/ArmorItems row, see MC-264717.

Confirm in 1.20.2 pre1, aslo affect trial spawners.
Spawn method has no relation to convertion.
Attrobites are also affected.

Can confirm in 1.21-pre2.

Villagers to witches one still does not work: ArmorItems-8 The equipment is not dropped, nor brought over to the new form.