mojira.dev
MCPE-170208

30 second despawn immunity is broken again

Non-persistent mobs are supposed to have 30 seconds of despawn immunity after spawning or taking damage. This is once again not working, like in 1.18.10 through 1.18.31 (MCPE-152500).

Steps to reproduce

  1. Open the test world from MCPE-152500. 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 sometimes despawn sooner than 30s after spawning or after taking damage.

Related issues

Attachments

Comments

migrated
[media][media]
GoldenHelmet

This is not properly fixed in 1.20.10. The changelog refers to “normal despawn rate at nighttime” and the change in 1.20.10 applies the 30 second despawn immunity only during nighttime. However, this bug has nothing to do with the time of day and despawn rules in general have never had anything to do with the time of day. Nowhere in this report or in any previous changelog about despawning is “nighttime” ever mentioned!

To reproduce in the current version, use the test world and wait until you get a spider, creeper, or witch (only because these mobs do not burn in daylight) and change the time to day immediately after it spawns.

[media]

An alternative repro would be to enclose the platform in tinted glass and change the time to day, then watch for spawns and despawns.

From limited testing with a grass platform during the day and night, it appears that passive animals follow the 30 second despawn immunity at all times. So in addition to the extra "nighttime" logic, it appears that extra "monster" logic may have been inserted as well. No previous published statements have said anything about special despawn rules for monsters. All natural/environmental mobs should get 30 seconds despawn immunity upon spawning, and the 30 seconds should reset whenever they take damage. That's it, no extra logic beyond that.

GoldenHelmet

Updating my previous comment, this issue is in fact at parity with Java Edition after the fix that was applied in 1.20.10, so I am re-resolving the report as Fixed.

The changelog was misleading in referring to the time of day. In both Editions, monsters/hostiles can randomly despawn 30 seconds after taking damage when in darkness and 10 seconds after after taking damage when in light.

GoldenHelmet

(Unassigned)

1082932

Confirmed

Windows

1.19.81 Hotfix, 1.20.1 Hotfix, 1.20.12 Hotfix

1.20.10.21 Preview, 1.20.10

Retrieved