mojira.dev
MCPE-152500

30 second despawn immunity does not exist

The despawn changes made in 1.16.0 were supposed to include a 30 second despawn immunity timer according to bolded part of the following changelog statement:

  • If mobs are between 32 and 44 blocks from the nearest player, they must not take damage for 30 seconds as well as succeeding a 1 in 800 chance

The 30s despawn immunity does not exist in the current version and it appears it was never fully implemented. Mobs have a HurtTime signed integer NBT entry but it is always set to 0. (Checked with MCCToolchest in world with chunks generated prior to the 1.16.100 chunk storage format changes.) It should probably be set to 600 at spawn and whenever the mob takes damage, and then reduced by 1 each game tick.

This has two major impacts:

  • Mobs can spawn in sight of the player but then despawn before the player has enough time to reach them for an interaction (whether to kill, to tame, to nametag, etc.). This makes it harder to get rarer mobs like zombie villagers, donkeys, and axolotl (MCPE-140859) when you go looking for them.

  • Mob farm rates are significantly lower than they would otherwise be. For example, a farm module that averages only 9 seconds to kill a mob after it spawns will lose 20% of its mobs to random depsawns before they are killed, if the module and kill area is >32 blocks from the player. (This can be calculated using https://www.dskjal.com/statistics/chance-calculator.html)

Steps to reproduce

  1. Open

[media]
  1. . It is a flat world set to simulation distance 4 with two platforms 32 blocks apart.

  2. Stand on the blocks at X = -1, Y = 100 and watch the platform at X = 32, Y = 100.

  3. When a monster spawns, start a stopwatch and watch the monster until it despawns.

  4. Repeat steps (1) - (2), then when a mob spawns fly over and hit it and start a stopwatch, then fly back to the X = -1 platform and watch the mob.

Expected results

Mobs would never despawn sooner than 30s after spawning or 30s after taking damage.

Observed results

Mobs often despawn sooner than 30s after spawning or after taking damage.

Related issues

Attachments

Comments

migrated
[media][media]
migrated

In the current latest Bedrock 1.18 version this is still valid. I have zombie piglins spawn into existence in my nether gold farm, take a few steps towards a turtle egg and despawn before they reach it. Its not consistent in that it happens to all of them all the time, but enough to reduce the rates.

Its on a BDS if that makes any difference.

migrated

Can confirm this is also present on PS4 1.18.12 on all simulation distances.

Mobs despawn instantly after spawning between 30 - 40 blocks from player.

AlexMc

Affects 1.18.32 hotfix
1.19.0.30/31 beta and preview

GoldenHelmet

I have been re-testing mob farms (general overworld monster farms and creeper farms) with others in the technical community and we are finding that farm rates are 10-20% lower than they were in 1.17.40. We have determined that caps, split density, and water pushing speed are unchanged. I also asked someone with a version switcher to test for this bug in earlier versions and they are pretty sure it did not exist in 1.17.30. I've also been informed by a code-digger that the spawn rate has not changed. So it looks like this despawn immunity bug may have started in 1.18.10 and is responsible for the significantly lower mob farm rates in the current version.

GoldenHelmet

(Unassigned)

720310

Confirmed

Windows

1.18.11 Hotfix, 1.18.10, 1.18.12 Hotfix, 1.18.30, 1.18.31

1.19.0

Retrieved