mojira.dev
MC-227250

Husks and zombies continue converting after their conversion processes start while the liquid causing the conversions is removed

The Bug:

Husks and zombies continue converting after their conversion processes start while the liquid causing the conversions is removed.

This report originally concerned how mobs would continue converting after the conversion process starts and the block causing the conversion is removed, however, in 1.19.3 Release Candidate 1, skeletons converting into strays through freezing was fixed, but the problem still remains for husks converting into zombies, and zombies converting into drowned through drowning.

Steps to Reproduce:

  1. Build the setup as shown in the provided attachment.

[media]
  1. Obtain an empty bucket and summon a zombie within the water.

  2. Wait until the zombie begins shaking (starts its conversion process) and remove the water within the setup using the bucket.

  3. Watch closely as the zombie continues to shake.

  4. Take note as to whether or not husks and zombies continue converting after their conversion processes start while the liquid causing the conversions is removed.

Observed Behavior:

Husks and zombies continue their conversion processes despite no longer being inside water.

Expected Behavior:

Husks and zombies would cancel their conversion processes if they're no longer inside water.

Attachments

Comments 18

Can confirm in 1.17.

Can confirm in 1.17.1.

Hi, so I've done some further investigating regarding this issue and have found that this not only affects the process of skeletons converting into strays. This same concept can also be seen when husks convert into zombies and when zombies convert into drowned.

I can confirm this behavior in 1.18 Release Candidate 3.

Here's a code analysis of this issue. All of the following is based on a decompiled version of Minecraft 1.17.1 using MCP-Reborn. Please note that I'm quite tentative about this analysis, although I'm persuaded to believe that this is likely a cause of the problem. 🙂

Code Analysis:

net.minecraft.world.entity.monster.Skeleton.java

public class Skeleton extends AbstractSkeleton {
   ...
   public void tick() {
      if (!this.level.isClientSide && this.isAlive() && !this.isNoAi()) {
         if (this.isFreezeConverting()) {
            --this.conversionTime;
            if (this.conversionTime < 0) {
               this.doFreezeConversion();
            }
         } else if (this.isInPowderSnow) {
            ++this.inPowderSnowTime;
            if (this.inPowderSnowTime >= 140) {
               this.startFreezeConversion(300);
            }
         } else {
            this.inPowderSnowTime = -1;
         }
      }

      super.tick();
   }
   ...

If we look at the above class, we can see that if a skeleton has been inside powder snow for 140 ticks (7 seconds), the this.startFreezeConversion(300) method is called. This will basically make the skeleton convert into a stray after 300 ticks (15 seconds) have passed. The cause of this bug is that once this method has been called, checks are no longer carried out to make sure that the skeleton is still standing inside of powder snow. In other words, once a skeleton starts shaking (begins its freeze conversion process), there's nothing you can do from this point forward to prevent it from converting into a stray.

This exact same concept can also be seen with the process of husks converting into zombies (through drowning), and zombies converting into drowned (through drowning).

8 more comments

For zombies and husks this is intended. As mojang said, if their head is submerged in water for 30 seconds it starts the conversion process. As soon as this process starts, it cannot be stopped.

@unknown Can you please provide a source for that statement?

I am pretty sure Jennifer's statement is wrong given everything in this thread and the fact that slicedlime suggested it was not actually fixed in his rc1 changes video.

@unknown slicedlime's videos aren't a source to say whether something is intended or not. When drowneds were added/announced it has clearly been stated that the conversion of drowneds cannot be stopped anymore after 30 seconds. Changing this would break a lot of farms that rely on zombiey turning into drowneds outside of water.

Their stance changed, seeing the fix attempt made. And while his videos aren't official, the fix attempt was listed on minecraft.net, and it was resolved as it by a mojangster here.
That source is no longer the stance Mojang has.

Aiden Shea Sinlao

(Unassigned)

Confirmed

Gameplay

Normal

Mob behaviour

drowned, husk, zombie

1.17 Pre-release 4, 1.17, 1.17.1, 1.18 Pre-release 5, 1.18 Release Candidate 3, ..., 1.19.3 Pre-release 2, 1.19.3 Release Candidate 1, 1.20.1, 23w33a, 1.20.4

1.19.3 Release Candidate 1

Retrieved