mojira.dev
MC-214147

Skeletons wearing leather armor still convert to strays in powder snow

I wouldn't expect this to happen, especially because leather armor prevents freezing which should prevent skeletons being converted.

The changelog states: "Skeletons now convert to strays when frozen", and as they are not frozen because of the leather armor, they should not convert into strays

To reproduce:
1. Run

/summon skeleton ~ ~ ~ {ArmorItems:[{},{},{Count:1,id:leather_chestplate},{}]}

2. Observe results

Code analysis

Code analysis by @unknown can be found in this comment.

Attachments

Comments 17

Okay what. I would have never ever come up with the idea of checking that xD good job

Can confirm in 21w06a.

Can confirm in 21w07a.

Can confirm in 21w11a. Video attached.

Can confirm in 21w13a.

7 more comments

Can confirm in 1.18.2 and 22w11a.

Code analysis (using Mojang mappings, 22w11a): there are no checks carried to see if the skeleton is wearing a piece of leather armor in order to start the conversion process, as can be seen in Skeleton#tick():

if (!this.level.isClientSide && this.isAlive() && !this.isNoAi()) {
            if (this.isFreezeConverting()) {
                ...
            } else if (this.isInPowderSnow) {
                ++this.inPowderSnowTime;
                if (this.inPowderSnowTime >= 140) {
                    this.startFreezeConversion(300);
                }
            } 
            ...
        }

Changing this line:

if (this.inPowderSnowTime >= 140)

to this:

if (this.inPowderSnowTime >= 140 && this.canFreeze())

should fix the issue.

Can confirm in 1.19.

Can confirm in 1.19.2.

The priority assigned by Mojang says otherwise.

Chandler

(Unassigned)

Confirmed

Gameplay

Normal

Mob behaviour

21w05b, 21w06a, 21w07a, 21w11a, 21w13a, ..., 23w14a, 1.20.1, 1.20.4, 1.20.5, 24w34a

Retrieved