mojira.dev
MCPE-78840

Instant despawn radius for simulation distance = 4 is too short

The 1.16.0.61 beta introduces scaled instant despawn radius based on simulation distance. The radii for simulation distances 6 and 8 appear to be consistent with the forumula

(simulation_distance * 16) - 10

so that the instant despawn radius for sim 8 is 118, and the instant despawn radius for sim 6 is 86. This is consistent with the previous instant despawn radius since 1.16.0.51 beta being 54 based on the minimum simulation distance of 4. However, in 1.16.0.61, the instant despawn radius for sim 4 is 44 instead of 54. This appears to be a typo because it is inconsistent with the others, and because it causes mobs to be instantly despawned after they are spawned between r44 and r54.

Steps to reproduce
1. Set world simulation distance to 4
2. Allow a mob to spawn naturally and do not interact with it.
3. Move 44 blocks away from the mob.

Expected result
The mob stays in existence.

Actual result
The mob instantly despawns.

The attached test world contains a non-persistent creeper trapped at 0, 110, 0, and colored glass at Z = 44, 54, 86, and 118 to facilitate testing different instant despawn radii. Change the simulation distance of the world before opening it to test a particular distance.

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media][media][media]
racartwright

Here are three picture showing the despawn locations and ticking areas for sim distances of 4, 6, and 8. The player is standing at 0,0. Clearly there is an inconsistency with the scaling.

[media]

[media][media]
migrated

Can confirm, I made a video testing all of the despawning ranges: https://youtu.be/vZCa7KcjT6I

racartwright

While we are on the subject of despawning, I want to suggest a slight change in how despawning happens.

1) The beta documentation lists "despawn_from_simulation_edge" as a data-driven configuration option for mob despawning. I assume that this is supposed to despawn any mob that walks outside of simulation range or is in a chunk when it is taken out of simulation range. This would be a good thing. If this can be fully implemented and enabled for mobs, then I suggest that the despawning range be scaled to 16*simulation_distance, with 128 as the max. This would provide parity with Java Edition at simulation distance 8.

2) Scale the spawning distance to 16*simulation_distance-10, with 118 as the max. This would allow any mob to move 10 blocks away from a player before they instantly despawn, regardless of simulation distance.

silentwisperer

Pretty sure this is a WAI change in the recent beta. A 44 block instant despawn range would make it so if you're in the corner of the center chunk the entire thing is still completely within the sim distance (54 extends into unloaded chunks if you're in the corner).

migrated

The despawn is WAI, perhaps. However, this bug highlights the inconsistency in the different sim distances. It does not scale consistently.

GoldenHelmet

@silentwisperer If r44 is intended for sim 4 for the reason you suggest, then the values for sim 6 and sim 8 should be 66 and 88 rather than 86 and 118.

racartwright

To be clear. Only on sim-distance 4 does the despawn radius not extend into unloaded chunks. On sim-distances 6 and 8, it extends into unloaded chunks. The other reason why I think it is a typo (44 instead of 54) is because the spawn radius is still 54 in the beta, so lots of things are spawning and instantly despawning at sim-distance 4, which would be inefficient game design.

migrated

To add in, current ranges I tested are:

4 - 44
6 - 81
8 - 113

10 & 12 - 128

 

Except the 128 the other numbers seem very random.

silentwisperer

@GoldenHelmet yes, that would be a reasonable expectation for the higher sim-distances. My assumption would be that it simply hasn't been added for the higher sim ranges. Who knows! Would be lovely hear from the devs on this one. No real information about this, and no information about the changes in the change log is causing a lot of confusion on this topic!

migrated

@MaybeJNaz there seems to be a formula to the sim distances:

((simulation distance)x16)-10

Although the formula doesn't actually appear anywhere, the devs may have used this as a guide to figure out the distances, and then they hard-coded them in. This explains why there would be an error, as all the others except sim distance 4 seem to loosely follow this, as all your numbers are relatively close to the numbers that this formula gives.

racartwright

Here is another view of the issue. Currently in the beta, on simulation distance 4, only the blocks between 24 and 44 distance of a player can spawn mobs (shaded region). This clearly too small, and the majority of a ticking area is lifeless.

[media]

The spawning area is much larger in 1.14, and the ticking area has more mobs in it.

[media]
GoldenHelmet

I’ve watched MaybeJNaz’s video and his method seems to be rigorous, perhaps moreso than the tests I was relying on. His numbers for sim 6 and 8 are consistent with

(simulation_distance * 16) - 15

So this may be the formula for higher sim distances, but even with this formula r44 for sim 4 is inconsistently short. Also the problem of some spawns being instantly despawned would remain if this formula was applied to sim 4.

migrated

On Windows 10 Bedrock v. 1.16.0.61 Beta, zombie villagers are de-spawning 52 blocks away from the player. The Simulation distance is set at 12. I captured a zombie villager, and I went to get the potion which is 52 blocks away from the zombie villager's capture area. When I returned, the zombie villager de-spawned. This happened multiple times, so I moved the potions to capture area. The next time I caught a zombie villager, I splashed him with the potion. This time everything worked like previous versions.  It appears the Simulation distance does not matter.

[Mojang] Mega_Spud (Jay)

Thank you for your report!
However, this issue has been closed as Working as Intended.

If you need help or have a suggestion you might like to follow a link below.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

migrated

I am confused. How can mobs spawning and instantly despawning be marked as Working As Intended?

gruva

That is what happens in java so....

migrated

An explanation for such a big change would be nice, considering how much of an impact it will have.

migrated

@gruva They randomly despawn (which also happens in Bedrock), but not spawn and instantly despawn.
When spawning and instantly despawning, the player never gets to interact with the mob.
Whereas in the random despawn range, which is from 32 radius up until the instant despawn radius, mobs exist for a reason.

migrated

@Gruva That's not what happens on Java, just like was added to Bedrock in Java mobs have a 1/800 chance to despawn each tick, mobs in Java farther than 44 blocks do not spawn to immediately despawn each and every time.

gruva

My point was that the spawning in java happens all over the place within the loaded area around a player but mobs outside 128 blocks despawn instantly (in java). 64 to 128 they're just immobile. I'm not saying this is good for bedrock as the distance of 44 blocks is painfully small but it is a similar set up as java, at least what I can see of it currently. This is why I'd assume it's WAI.

racartwright

Can someone with access to the 1.16 beta code confirm that this is the difference between distance 4 and distance 6? I'm trying to understand how despawn_from_simulation edge works and interacts with realms or doesn't. Below is my best guess from testing and this thread.

Sim Distance 4 (realms)?

  1. mobs spawn between r=24 and r=54 distance of the player (white arc)

  2. instant despawning happens beyond r=44 (black circle), half of the spawning sphere is no longer useful.

  3. instant despawning at simulation edge is disabled

[media]

Sim Distance 6 (not realms)?

  1. spawning happens between r=24 and r=54 distance of the player (white arc)

  2. instant despawning happens in the outer-most chunks, green squares.

  3. instant despawning happens beyond r=128 (black circle, only matters vertically?)

[media]

Note that (at least in 1.14) the game will attempt to spawn mobs in all simulated chunks whose centers that are withing 96 blocks of the player, horizontally. However, the spawning will fail if the mobs are beyond r=54 of the player.

migrated

It makes sense for r128 to have a chance of despawn at certain range since the area is very large with more than 4x mob cap. TBH, 4 chunk never need 1/xxx chance of despawning since it falls within range, keeping mobs actively near the player in small area. They will be most likely insta-despawn when move away in seconds to a few minutes after they spawned. That said having despawn by chance is useless for 4 chunk simulation distance. It only need instant despawn and spawn range from the player.

migrated

Why mark something that is working as Intended, this is something that is an issue and seems like there is now more problems instead of fixing the issues they rather just push it to the side, spawning and despawning is a huge put of the game, I’m only going off what I have seen by silentwisperers video of it, but it definitely isn’t working as intended, anyways I think the new despawning and spawning should be push into another update and get a fully working system then releasing a buggy system of it and keeps breaking, 

migrated

If this "Works As Intended" then perhaps we could revisit the intentions. Many people would be voting up this bug if it were still possible.

GoldenHelmet

Keep in mind the Works As Intended resolution addresses the primary subject of this ticket, that the instant despawn at sim4 was reduced to r44. It does not address every possible unforeseen ramification of that change. MCPE-79359 focuses on one consequence that seems to call for further tweaking, which is beyond the scope of the original intention behind r44. You may wish to follow up with that ticket if you have information to add, and vote there to show your interest.

GoldenHelmet

(Unassigned)

347130

Confirmed

Multiple

despawning

1.16.0.61 Beta

Retrieved