mojira.dev
MCPE-21416

Mobs and Entities can despawn randomly

Update November 2021

We are tracking an issue with all or nearly all mobs in the area around the player vanishing when the world is reloaded in versions 1.17.30 through 1.18.2 Hotfix at MCPE-144208. Please do not comment here if that describes your experience.

Moderator Note by [~DrAwesome4333] and [~GoldenHelmet]

Please limit comments to New information about the issue. A short list of what is most helpful and what is not is listed below. Please take the time to read this brief list before commenting.

A list of mobs you have lost is not helpful information. We know this bug can impact any mob, we know that leashed mobs that despawn will leave behind a leash knot, and we know that when villagers despawn their beds and workstations remain linked to the missing villager until you break them or 20 minutes pass. What might be helpful are details about things like

  • what you were doing leading up to the mobs disappearing

  • single vs. multiplayer, local vs server/realm

  • how far you traveled

  • how long the current or previous play session lasted

  • whether the despawns were near a player spawn point or if you had changed your player spawn point during the session,

  • if you experienced lag or anything else abnormal.

Workaround (updated Dec. 5, 2020)

Some cases of persistent mobs despawning can be traced to them crossing chunk borders between saves, so one way to guard against randomly losing mobs is to prevent them from crossing chunk borders (you can read about finding chunk borders on the wiki). However, this is not a guarantee or a fix. Positioning mobs away from chunk borders does not mean you will never lose a persistent mob again. Many cases of mobs randomly despawning remain unexplained by the tracker staff and player community.

Updated description by @unknown July 22, 2020
This ticket is used as parent for all otherwise unexplained mob disappearances. It covers mobs disappearing related to nether portal travel, long distance single-dimension travel, crashes, realm lag, and any other circumstance, except for the specific circumstances covered by MCPE-88322, MCPE-66818, MCPE-51837, MCPE-16863, and MCPE-108568, MCPE-141539, and MCPE-144208.

Some random mob despawns can be explained by the mobs crossing chunk borders between auto-saves. Other random mob despawns are reported for mobs that were unable to cross chunk borders.

I have attached a test world that can be used to reproduce despawning on chunk borders due to a crash with the following steps to reproduce:

  1. Load [^[EX] Chunk border despawn demo.mcworld].

  2. Press the button to spawn a villager.

  3. Save & quit, then reload, to confirm that the the villager is kept in the world save.

  4. Open the world, flip the lever, and start a stopwatch.

  5. After about 10-15 seconds, close Minecraft without exiting the world (for example, in Windows 10 press alt-F4).

  6. Reopen Minecraft and reopen the test world.

Expected result

The villager is still present.

Actual result

Sometimes the villager will be gone. I estimate this occurs about once out of 20 attempts. You can see the entire sequence in

[media]

.

What happens when the villager disappears is that sometime between flipping the lever and force-closing the game, the chunk in which the player is located gets auto-saved and the chunk to the right does not. You can verify this by observing that a honey block is also missing--the fact it was pushed out of the left chunk by the piston is saved, but the fact it was pushed into the right chunk is not.


Original description
When I go to Nether and I went back my horses an my animal that I feed is disappear

Edit by @unknown: When playing on multiplayer, entities can despawn when you travel to the Nether and back to the Overworld.

Keep in mind that naturally-spawned monsters and animals that have never been interacted with are SUPPOSED to despawn. When testing this bug, please make sure to interact with monsters or animals you're observing first, by tempting them with food, breeding, or name-tagging them. This is not necessary for villagers or iron golems.

Linked issues

BDS-884 Minecarts despawning Resolved BDS-1026 When I come back from leaving my game all my pets are gone. Resolved BDS-1027 Villagers despawning withing village level areas Resolved BDS-1030 Mobs keep disappearing when reload/restart server Resolved BDS-1058 Disappearing villagers Resolved

Attachments

Comments 726

[^[EX] Chunk border despawn demo.mcworld]

[media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media][media]
[Mojang] Mega_Spud (Jay)

⚠️ Please do not mark issues as private, unless your bug report is an exploit or contains information about your username or server.

SuperGeniusZeb

Did this occur on Realms? If not, did it occur using LAN (local area network) or Xbox Live multiplayer?

CHUMPOL JARUKITJAROON

Yeah on realms

SuperGeniusZeb

Revised title & description to be more descriptive.

716 more comments
Debra-ann W Phipps

On my realm I noticed all hostile mobs despawn at 2.5 chunks away (measured using foxys markers). Had also been having trouble with non hostile mobs unpredictably despawning but I just saw why it happened; I went into spectator near some non hostile mobs that I could see from my vantage point, as soon as I was in spectator they despawned. I tested this again and they didn't despawn so it is intermittent, maybe because it was the first time I went into spectator that day so only that first time caused it or maybe only happens sometimes.  Also not sure if it is related but both type of squid only spawn in newly loaded chunks not anywhere we have been previously.

We have encountered this bug several times on our Minecraft Realms server. We have users playing on Switch, PS5, and Windows PCs. The user who has noticed this the most is the Switch user (but this may be because they spent more time around the animals). These animals all had nametags applied.

Using the World Utilities Chunk Border we did see that the enclosures from which animals have disappeared the most were on the intersection of four chunks. The animals were always noticed missing when the chunk was unloaded and then reloaded.

Probably not something you're too concerned about, but we also noticed any mob captured with a Safari Net from the World Utilities Add-On vanished after a seemingly random amount of time (one vanished a minute after release, others lasted multiple Minecraft days and loading/reloading the chunk.) I mention this only because the issues could be related or give ideas as to where to look for the issue. 

In order to better address issues with unexpected entity loss going forward Mojang community mangement and the volunteer bug tracker staff have decided to resolve this report. We believe that random entity loss was fixed for most players in the 1.18.30 update by changes to how entities are stored in the world databse. For that reason, I have added 1.18.30 as the fix version in the report header.

We recognize that some players have continued to experience unexpected despawns. Resolving this report is not meant to dismiss your stories. Rather, it is to enable us to focus on information that is current and helpful for understanding and reproducing specific issues. If you have an an entity loss issue that is not explained by any of the points below, and you cannot find another open report describing the same issue, then you may make a new report. Please make sure to be a specific as possible and give steps to reproduce the issue.

Some of the cases described in comments here can be explained by intentional game mechanics:

  • Mobs that spawn naturally and have not been interacted with are expected to despawn, both at specific distances from the player, and randomly if they are old enough.

  • Mobs face dangers from the natural environment such as wandering into lava (some mobs do not avoid dangers by design), being struck by lightning, or being attacked by natural predators/enemies that can spawn near them.

  • Allays that a player has given an item will teleport out of enclosures to the player, and travel through nether portals with the player within a certain distance.

Some other recent comments here reflect specific, ongoing issues:

  • MCPE-143979 bees tend to wander off to the northwest

  • MCPE-167346 frogs suffocate under doors

  • MCPE-170425 mobs may teleport back to a nether portal when the terrain fully loads

  • MCPE-175546 mobs may come out of different nether portals than the player

  • MCPE-181306 paintings may break during loading

  • MCPE-183649 villagers glitch through blocks in certain orientations when getting out of bed

  • MCPE-186753 villagers or other mobs on positioned on chunk borders may glitch through blocks when loading

Finally, please do not comment here. This report will not be reopened.

That's stupid, I was playing a month ago, and sent in a video of when I was playing on a realm and an hour in, the villager despawned while I was inside the village after trading with him and moving on to the next villager. 

I got dumb replies like maybe he changed jobs or maybe he died. After looking for hik for 20 to 30 mins, the villagers reproduced, so it could not have been a job change. And I was very close to the villager, there were no hostile mobs or hazards near the village. 

Since this happens frequently with other mobs that are bred and named, I decided to add a bunch of more beds to increase the village population. A week later the villager reappears, the same one, with the same trade level. 

Instead of calling it resolved, why not say we are not sure how to fix it at this ttime. Mobs dissapearing is very common, especially when playing in different chunks. I understand that in large worlds, chunks get unloaded and things magically don't get loaded back in when you go back. But when you're in the same chunk and it happens...

[media]

I have a 12+k day survival world and over the last week I have had 1 villager (named and traded with) disappear.  He was trapped in a one block area linked to bed and workstation.  I hvae just logged on and returned to the trading area to find 3 more have disappered - also traded and named in the same set up.  I have been Afking for a while lower down and logged out, plus moved out of the area, so I am not sure when it happened.  These were also converted natural zombie villagers not regular ones or ones that I forced into a zombie state.  You can see the missing three [spaces] here. The villager marked [B] is the replacement for the other one.  I have been losing villagers a lot in another trading area but I assumed they were somehow falling through the walls when waking up into the farm below as I had seen a couple in there.  But now wondering if this is a problem with them just disappearing aswell. Bedrock v 1.21.51 Thank you Cjsgoose

CHUMPOL JARUKITJAROON

(Unassigned)

97757, 112005, 248300

Confirmed

Multiple

Ios 10.3.1

entity, lan, multiplayer, nether, realms

1.19.60.25 Preview, 1.19.20.20 Preview, 1.18.32, 1.18.30.23 Preview, 1.18.30.22 Beta, ..., 1.21.1 Hotfix, 1.21.2 Hotfix, 1.21.21 Hotfix, 1.21.22 Hotfix, 1.21.23 Hotfix

1.18.30

Retrieved