mojira.dev
MC-277853

Witches and illagers despawn faster than other monsters

Mobs are supposed to despawn in minimum 600 ticks in pitch black rooms. 
If the room is lit, then they should despawn 3 times faster, so in 200 ticks.

The issue I have here, is I have a Witch Hut farm, that is completely pitch black (lights levels of 0 everywhere) and witches are despawning after 200 GT.

[media]

(carpet mod /lifetime tracker, just for illustration purposes. You can see the Randomly Despawns of witches is between 202 and 226 GT, which is ~10s, and not the expected 30s)

I believe the issue is caused by  Raider#updateNoActionTime which always add +2 to the `noActionTime` variable, regardless of if the mob is in a raid or not. I believe it is missing a `if this.getCurrentRaid() != null` before incrementing the noActionTime and should default to `super` (which should hopefully delegate to Monster#updateNoActionTime, restoring the light level dependent behavior).

 

This also means that other Illagers not spawned as part of a raid (but still inherit the Raider trait) will despawn faster than normal, so Pillager Tower Pillagers also despawn faster than they should.

 

Steps to Reproduce :

  • make a pitch black room (lights level of 0). Use tinted glass so you can see through.

  • Disable natural mob spawning so natural spawns don't interfere with the experiment. /gamerule doMobSpawning false

  • Place the player at least 32 blocks from the dark room, but less than 128 blocks.

  • Spawn a Zombie inside the room and wait for it to despawn. The zombie will despawn after 30s mininmum. (/summon zombie ~ ~ ~32)

  • Try the same experiment but with a Witch. Or a Pillager. They can despawn after 10s only.

Expected Behavior :

All naturally spawned mobs have the same despawn timer.

Actual Behavior :

Mobs inheriting the `Raider` class are always despawning after 10s, regardless of if they are part of a raid or not, which seems to be unintended behavior.

 

This affects Witch farms that where buffed in 1.21 as a response to patching Raid farms, but currently witches can despawn more easily that they should.

Attachments

Comments 5

We do not have enough information to reproduce this issue.

Please include the following information to help us understand your problem:

Steps to Reproduce:
1. (Explain what needs to be done for the issue to happen)
2.
3.

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.

Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

To reproduce the issue, make a pitch black room (lights level of 0). Use tinted glass so you can see through.

Disable natural mob spawning so natural spawns don't interfere with the experiment. /gamerule doMobSpawning false

Place the player at least 32 blocks from the dark room, but less than 128 blocks.

Spawn a Zombie inside the room and wait for it to despawn. The zombie will despawn after 30s mininmum. (/summon zombie ~ ~ ~32)

Try the same experiment but with a Witch. Or a Pillager. They will despawn after 10s.

Can confirm in 1.21.4.

Was doing the tinted glass dark box test, while standing 35 blocks away from said box, spawned a new witch and started a stopwatch on my phone at the same time. After 10 failed attempts (due to the randomness of the despawn mecanic), I got a Witch to despawn at 14s, which is less than the 30s expected for all hostile mobs in light level of 0.

Can confirm for 1.21.5-rc1

Can confirm in 1.21.8 :

[media]

Attached testing world : just stand on pressure plate to reset scoreboards and let it run for a while to see the fastest each mob can despawn. You will see that witches can despawn in as little as 200 ticks, while zombies cannot despawn in less than 600 ticks.

[media]

Expected despawn timer for naturally spawned Witches would be the same as any other naturally spawned mob.

Azyrod_

(Unassigned)

Confirmed

(Unassigned)

1.21.3, 1.21.8

Retrieved