[~panda4994]:
Several causes of this issue been fixed:
Zombiefying a renamed Villager would not copy the PersitenceRequired-flag
It was possible that a nametag appeared to have been applied while this was not actually the case for the server.
Mobs in boats disappeared when they were saved in a different chunk than the boat
With the amount of duplicates this issue has it is entirely possible that there is still remaining issues of entities disappearing that have not been resolved. However these are most likely not related to nametags and despawning and should be tracked individually as their own report with context and if possible reproduction steps.
Thanks you!
The bug
When a few mobs were named with a name tag, some would occasionally despawn.
Related issues
is duplicated by
Attachments
Comments


Do they really despawn or burn in the sunlight ?

Please force a crash by pressing F3 + C for 10 seconds while ingame and attach the crash report ([minecraft|http://hopper.minecraft.net/help/finding-minecraft-data-folder]/crash-reports/crash-<DATE>-client.txt
) here.
They really despawn. They are under ground, no direct sunlight.
Do you think it could have been because some of the mobs were named with a tag, and some named through an anvil directly by the egg?

Confirmed the despawning of Zombies created from a renamed egg (Multiplayer)
Cannot confirm the despawning of NameTagged Zombies
Confirmed the despawning of NameTagged creepers.
Also, the NameTag is placed back in the user's inventory after the despawn.
Reproduce:
1) Use a NameTag on a creeper and trap underground
2) Teleport away
3) Leave Server
4) Creeper will despawn and NameTag will be in inventory
Zombies, Spiders, and Skeletons did not despawn.

@Jacob Wall: Single / Multiplayer ? Survival (likely not 😉 ) / Creative ?
Actually yes, Survival Multiplayer 🙂
We love pets in Cloud city🙂 But our creeper box is empty😞
Not easy to get a creeper boxed though in 1x2 glass panels🙂
It was sad when he despawned shortly after the painful efforts.
We then reproduced the bug several times just in caves.

@Jacob Wall: Can still not reproduced. Name tagged hostile mobs (Zombies, Creeper) do not despawn.
Please force a crash by pressing F3 + C for 10 seconds while ingame and attach the crash report ([minecraft|http://hopper.minecraft.net/help/finding-minecraft-data-folder]/crash-reports/crash-<DATE>-client.txt
) here.
I can confirm that renaming Creepers is bugged. It is bugged only in survival though. Bug occurs in both singleplayer and multiplayer.
Steps to reproduce:
1) Get a nametag and put a name on it.
2) Rename a Creeper (make sure you do it in Survival)
3) Try to put anything (Dirt perhaps) into your empty hand and see that the nametag returns into your hand. Creeper should still has it's name.
4)Leave the game and then return. Creeper will no longer have the name.

Can confirm in creative following this procedure:
1. Spawn a named mob using commands. Eg. /summon Skeleton ~ ~ ~ {CustomName:"Skelly"}
2. Go 150 - 200 blocks away from it.
3. Go back to see it gone.

I don't believe the CustomName tag is sufficient to prevent mobs from despawning. For that, you need the PersistenceRequired tag. Nametags should set both, but this is either failing, or PersistenceRequired is being ignored on some mobs.
I also had a pet donkey (on snapshot 14w05b), and I left it to the nether while I was busy working couple of hundreds blocks away, and it despawned with a lot of items in it's backpack.

Green snake : That's MC-23320
I had this recently happen in my survival world. I have a jail underground, no sunlight, hard difficulty. I had a named zombie, skeleton, and witch. After a long while, the skeleton despawned. There was no way it could have escaped, it was behind iron bars and a box of stone. Even if it got out, it was a locked room, couldn't have went anywhere else. Now I don't know if I should get another skeleton...
This still happens in 14w20b.
This still happens in 14w31a
Happened to me with named ghasts in minecarts in 1.8pre2. Makes it a real pain trying to keep a Zipkrowd Wither Wiper working. 😛

Seems to affect 1.8.1-pre2 as well.
Happens in 1.8 and is really anyonig for gold faming
Still occurring in 1.8.1, observed in the nether with named zombie pigmen.
Still happens in 1.8 on SMP server.
Named ghast, move away it despawns, name tag appears a moment later at character's feet. Happened 3 times.
Hi, I think this happened to me, on 1.8.1 server(which I'm running), here is what I did
1) I lured creeper into a 4x4x4 box made of dirt(so 2x2x2 empty space inside)
2) Carefully replaced dirt with glass
3) Renamed a name tag using anvil
4) applied the nametag to the creeper
5) Got my renamed nametag back(are nametags reusable?)
6) If I would come close enough to the creeper, a label would appear above it(with the name). So I suppose I renamed it correctly
7) I went onto other adventures
8) Came back, my creeper is gone!
I thing this is a bug. I'd like to have a collection of mobs in glass cases, but it looks like I can't do this 😞

Name Tags are single-use. If you get the name tag back after using it, then it didn't actually use it. That's probably the result of a disagreement between the client and server, possibly caused by latency.
And it just happened to me the other day, named creeper despawned, grrrrr.
No nametag on ground, just creeper gone.
We updated out server from 1.8.8 to 15w32b, and all the named Creepers at our charged Creeper farm (none of them were actually charged yet) despawned, along with a named zombie nearby. A named skeleton directly next to spawn survived the update.
Affects 15w32b.
(The named skeleton likely picked up an item, though. The only other nametagged mob that survived the update is a wither in our wood farm.)

@@unknown: This is most probably MC-85285

Relates to MC-107103
I have been unable to reproduce this bug after playing several months with various mobs named with nametags. Obviously it's not a simple step-by-step reproduction, but can anyone reproduce consistently in 1.12.1?
I have a skeleton spawner that generates skeleton mobs. I kill all but one and put a nametag on them and leave, going at least 128 blocks or more away. Sometimes they stay, sometimes they don't. I logged off for about 12-16 hours and when I came back, the named skeleton was gone again. This is on 1.12.2 Survival MP. Server is set to Hard mode and is not switched between modes.
This is still an issue in the current (1.4 after Aquatic Update Phase 1) Xbox One version in a Realm. A named skeleton horse has lost the name tag. The horse did not despawn, it still remains in the enclosure, but the name has disappeared. Unfortunately, 3 other skeleton horses (also in enclosures) did despawn completely. A birdcage containing 5 parrots, fenced off with no access by either mob or player, is now down to 2 parrots. Random sheep are missing from the animal enclosure.

@unknown, this ticket is for the Java Edition of Minecraft, for the Bedrock Edittion please go to https://bugs.mojang.com/projects/MCPE
I witness this bug when I tried to have dolphins in my aquarium. Even if I renamed like Joey, Allison, Magalie and more, I noticed that they are gone. But, if you are in creative, you can use the {PersistenceRequired:1} nbt in the summon command for the mob and this is how I got real dolphins that doesn't despawn.
I figured out what causes the phantom name tag on ghasts. If you are naming them while a block is inside their head (so they don't shoot at you) it won't work. You have to name them without their vision being blocked (So while you are under attack!!!)

Zombie pigmen are strange:
Summon pig, name pig. Lightning hits pig, it turns into a named Zombie Pigman. Move away, return. Zombie Pigman is gone. (This can also be done by summoning a pig using a named pig spawn egg.)
Summon pig. Lightning hits pig, it turns into a Zombie Pigman. Name Zombie Pigman. Move away, return. Zombie Pigman is still there.
Clearly, a Custom Name isn't sufficient for persistence.
I have a hunch this bug has multiple causes. No persistence on named entities, entities despawning at chunk boundaries...
@unknown "Most NBT tags are not kept when a mob converts to another mob" > that's MC-88967
When you have e.g. a renamed pig and it gets struck by lightning, it gets turned into a Pigman which still got the name of the pig, but its PersistenceRequired tag which was 1b by renaming is gone (= 0b), which results in despawning of the Pigman.
The same goes for e.g. a Villager turning into a Witch, the Witch will keep the Villagers' name, but will despawn/her PersistenceRequired tag will not be set automatically to 1b.
You can check that with/data get entity @e[type=!player,limit=1,sort=nearest]
This sounds a lot like this issue where all entities are disappearing. This includes not only named mobs, but also item frames & items on the ground: https://bugs.mojang.com/browse/MC-144879. It is marked as resolved but definitely isn't
you can manually change the "PersistenceRequired" tag on villagers one by one using this command while standing next to villager:
/data modify entity @e[type=!player,limit=1,sort=nearest] PersistenceRequired set value 1b
I think it works, non of my villagers have disappear so far after doing that

Noticed this problem still exists in 1.14.3-pre2 while testing new iron farm designs. The named zombie I'm using to scare the villagers sometimes disappears.
Had 3 name tagged (in boats) zombies despawn on me one after the other in 1.14.3. I use these for a variety of reasons. Other than naming nothing changed on these entities
Is everyone that's got this problem using glass or glass panes? I've had a named mob that kept "despawning", but it turns out it was actually suffocating inside of a glass pane, with no way to get out, and this has happened 3 times now. I have a screenshot since I caught it this time but not sure how to post it.
This issue still exists in 1.14.3. My iron farm zombie despawned, my wandering villager despawned and my snowman despawned all on my survival career. Ironically, my villager trading hub still runs strong and those are unnamed. @James I am using glass in two of the three instances, but not glass panes. In the third instance however, my wandering villager was just contained by standard cobble. he vanished out of thin air as well. Does not appear to be solely, or even in part, a glass issue
This was an issue for me in 1.14.4 - renamed zombie villagers despawned multiple times. They were not suffocating inside any blocks and could not have taken damage.
This is still in 1.14.4. A few friends and I have a multiplayer realm and have had named zombie pigmen respawn from our gold farm on top of the nether. I have named some with name tags and renamed spawn eggs on an anvil. I had one of my friends tonight the farm and I used spectator mode to watch the pigmen. One by one, most despawned in a few minutes.
@casey wandering traders are intended to despawn after a set amount of time even if name-tagged, so it's just your zombie that's bugged, and @austin things spawned from renamed spawn eggs don't have persistence despite having a name, it's been that way for a while, don't know whether it's intended or not tho. but obvs the name tags should be working.
We are also having this issue on our server, please fix this asap !
I split of a very similar issue: Zombie villagers being able to despawn if they have been named before they became a zombie is now tracked in MC-159298.
Encountered this issue with 2 named dolphins. They are in a fully enclosed tank with 2 air blocks. The tank is located near the ocean where multiple dolphins spawn regularly.
Version 1.14.4, multiplayer server. Left them unattended for a few in game days and they disappeared.
Just had this happen with a witch on 1.14.4 multiplayer server. The witch was in a minecart I was chasing after into unloaded chunks. There's an activator rail to empty the cart at the station. As I approached the station, I saw the witch for a second, and then she vanished.
Edit: The witch mysteriously reappeared later.
Can confirm this, 1.14.4.
Just had this happen several times on Hard difficulty, 1.14.4. Multiple zombies and zombie villagers, who were nametagged before they were converted. All mobs were protected in an enclose environment, named, and still despawned
Same as Brett Fitch, Hard difficulty, 1.14.4, Vanilla. Tagged a pillager captain in a mine cart, on a rail. enclosed with 1 block ring around at head level (at 2 blocks above the ground). He stayed there for hours (more than 24 hours), he was a couple of blocks behind me while i was enclosed in glass walls and glass ceiling, AFK fish farming for 10 hours. Now he's gone, vanished, poof, went with the wind.
Also, since my base is at the side a village, the Wandering Trader keeps spawning on top of roofs, he's stuck there. And when i right click him to see his goods, he starts running at x5 walk speed, dropping his leads until he falls from the ground and then stops going crazy. At least i get the leads.
Same experience. Hard mode 1.14.4 survival multiplayer, name tagged a zombie for an iron farm, and had it floating in a cauldron at least 40 blocks above the ground. No chance of escape. He vanished. This also permanently broke the iron farm, as I had to respawn all villagers to fix it.
Confirmed happening in 1.15.1 - had two named zombies secure and protected from sunlight that vanished.
Just had it happen to me as well. Named zombie villager, in a hole and covered!?
Still happening in 1.15.2.
I have an iron golem farm 160 blocks above the ground and it works perfectly, but the moment I go to my main base the zombie despawns and the farm remains broken. I either have to spawn in another zombie or torture myself by trying to bring one with me to the cauldron. Named, covered and out of reach for the iron golems, still despawns.
In 1.15.2 I ran a bit of a test.
I used spawn eggs to spawn in villagers, creepers, mooshrooms, and pigs.
I used nametags to name the mobs, then summoned lightning to convert them (and in the case of the villager, I did a separate test with a zombie).
In each case, the PersistenceRequired bit was set to 1 immediately following NameTag use.
In the case of the mooshroom and creeper transformations, lightning did NOT set/clear the PersistenceRequired to 0. It remained 1.
In the case of the villager>witch, pig>zombie_pigman, and villager>zombie_villager conversions, they DID lose their PersistenceRequired bit.
While I can't know if this is the actual original bug reported, or a separate bug, this is likely one cause of the bug in question, and has a very easy set of reproduction steps.
Â
I can reproduce this despawning when the named mob is riding an entity and they reload on a chunk border https://bugs.mojang.com/browse/MC-170787
For first snapshot of 1.16 it happens too if u leave chunk they just despawn either named or no... this is bad in some way, i cant make mob zoo anymore... tryed to get 2 dolphins from ocean thats about 8 K blocks, and in base they both despawned with nametags on....
1.15.2 Server/client. Disappears when in a mine cart, removing the mine cart with it. Running Gnembon's iron farm, with a roof covering the entire thing, Zombie helmeted, named, and carrying an item. Zombie will despawn when I go out of range, consistently, every time.
@unknown Might not necessarily be about the nametagging in that case, but would be good to know.
As I currently can't do that myself, could you test if this happens also with any mob riding? Villager would be an adequate test entity, as it's also similarly large.
If you test with nametagged hostiles, could you please also check their persistence-tag before going out of range? Just to make sure, nametag/item holding works as it should.
Could you please also have your launcher log open and ready, in case anything would appear in there?
@unknown Could you please also check the persistence-tag on your zoo mobs, before going out of range? Just to make sure.
I have named several passive and hostile mobs with a nametags, but after some time (maybe 24 or so hours) they despawn.
Example 1.
I have several horses and donkeys in a fence, out of the 15 mobs total, about 7 of them had a nametag, and all 7 have despawned.
Example 2.
I trapped and successfully attached nametags to several hostile mobs (Zombie, Zombie Pigman, Pilligar Captain, Creeper, Witch, Slime, ect.) all of which despawned within a 24 hour period of the naming of each one.
Example 3.
I attached a nametag to an iron golem, who was kept in a secure fence, and again after a 24 hour period of it's naming, it despawned.
Example 4.
I attached a nametag to 1 of my 4 dogs and 2 of 6 of my cats and left them all sitting in my house (on a world where I strictly play alone) and all of which I assigned a nametag have despawned.
I hope that you will look into fixing this issue promptly because I would like to retry my mob collection, as well as be able to name my tamed/untamed mobs. Thank you for your consideration.
I just had 2 zombie villagers despawn (one name-tagged and the other wearing an elytra).
@unknown Which version are you in?
My zombie (in a minecart) keeps despawning. Nametagged, holding a item,etc. The minecart doesn't disappear but the Zombie in it does. My iron farm is no longer working :/. P.S I am on a 1.15.2 server running Paper, tried changing it to spigot and the default minecraft server but no different results.
Anyone see a bug fix for this? Or was it fixed in a snapshot?
On a 1.15.2 server, my friend made a giant iron farm, when there is a zombie, it brings in multiple stacks per minute, but with no zombie it is useless. We've tried naming the zombie and having it hold items but it just keeps disappearing (it's been wearing mob heads so the sun can't burn it). This is a big issue as the only known way to prevent mobs despairing is naming them, but that doesn't seem to work. Also, when the zombie despawns, the minecraft stops moving, so we can't even make a zombie spawner to replenish the minecraft constantly.
Same issue vanilla 1.15.2 server even when chunks are loaded they despawn (after some afk hours). We run spigot tho so maybe it is not an issue in the vanilla version. Only with pigmen.
Me and my friends had the same problem in our 1.14.6 world. We are playing together with the multiplayer function and had built a farm. We had collected some animals (cows, pigs, sheep, chickens, and bees) which we named and attached to fences with leads. However, after some time we noticed that they had disappeared. It only seems to be happening if we leave the game and enter again at a later time. As long as we are in the game they don't seem to disappear, maybe because one of us is always at the farm. It seems that mostly the oldest animals disappear first though our oldest cows are still there and some recenter animals have disappeared. It is really annoying as it is really hard to get nametags to name the animals and we really like them and they are often gone the next day.Â
Still happened to me in 20w16a
Happens at 20w16 (and previous 1.16 snapshots) aswell. Have a iron at spawnchunks. I have tried giving items, armor, nametag... (there is blocks above it and hopper below so that I am sure that it doesnt die) I am tired of replacing the zombie every so often

I spawned in 50 dolphins, all named, but they despawned when the chunk was unloaded
i have too this bug.
With pillagers,vindicators and this bulls
This also happens to me, with a zombie and nametag. Even if it is holding something or wearing armour it still despawns. However, it seems to happen with me in the loaded chunk, while I was AFK at my iron farm.Â
Happened to me as well right now.
1.15.2 unmodded singleplayer
Zombie was nametagged, had armor (including helmet) and a sword.
Despawned on me while I was in the same chunk.
~Edit: That mob also was sitting in a boat. When it got back into view, Zombert was gone and boat still there.
 Contrary to other reports, I did NOT get the nametag back.
Attached forced crash report
I have this too. 1.15.2 unmodded multiplayer and singleplayer.
Dolphins despawn even tho they are name tagged etc.Â
I experienced this with the Iron farm that I've been working on. First, I had a Drowned which I just picked up from the ocean that I built the farm over. I gave it a leather hat, and it was fine for a while, then randomly despawned. I tried again, and no luck.Â
This last time, I used a husk from a nearby desert, named it with a nametag, and went from there. It lasted a long while, but alas, it despawned.
In all three instances, they despawned when I had the chunks loaded.
They were all in a minecart going around the iron farm.
Version: 1.15.2 Singleplayer w/Optifine Client.
I have that problem in snapshot 20w20a. some named zombies still despawn. it turns out that applying a nametag doesn't always fully take; eventhough the custom name is being displayed, /data get shows that CustomName is not present. Several tries maybe necessary for the name to actually be recorded.
But hang on, that'd mean that they only despawn after a short time and if they stay, the tag was properly recorded and they shouldnt despawn, right? My Iron Farm Zombie was there for about a month and a half, that wouldnt make sense
I seem to have encountered this today when playing on my realms server (1.15.2).
Â
I had trapped, then named, then converted a zombie villager to a nice healthy villager, but I forgot to light the space i was keeping him.. I was playing in chunk with him (not 50 blocks away) and a zombie spawned in with him and converted him back to a zombie villager. I killed the zombie, and checked that he was still named (he was), so I figured I'd come back and cure him later. Came back and he had despawned. Â
Â
Just had a named zombie in my 20w21a snapshot world despawn. Had him in my iron farm. Despawned after like 10 hours. Never left the nearby chunks.

I can confirm (in 1.15.2), as I have a zombie in an iron farmed that I named using a nametag, and once i walked out of distance of it the zombie had despawned. In other versions (1.14 & below( of the game I do the same and the zombie will still be there when I return to the chunks.
I have every mob listed on one Minecraft world and they all have NoAI, Silent, PersistenceRequired and Invulnerable tags and PersistenceRequired is supposed to keep mobs from despawning, but the only one that despawns is The trader llama.
happened to me the other day. i was creating a pillager village and had done the broken crossbow trick to make them friendly. nametagged them then dropped them a banner to hold. went away for a bit to work on something else and when i came back they were gone.Â
Several causes of this issue been fixed:
Zombiefying a renamed Villager would not copy the PersitenceRequired-flag
It was possible that a nametag appeared to have been applied while this was not actually the case for the server.
Mobs in boats disappeared when they were saved in a different chunk than the boat
With the amount of duplicates this issue has it is entirely possible that there is still remaining issues of entities disappearing that have not been resolved. However these are most likely not related to nametags and despawning and should be tracked individually as their own report with context and if possible reproduction steps.
Thanks you!
Tamed horses also despawn. Dogs are cool bros.
I didnt add a nametag but I already tamed the horse.