mojira.dev
MC-115567

Enderman stare sound doesn't play if enderman was spawned less than 20 seconds ago

The bug

If you spawn an enderman using spawn eggs or /summon and provoke it in survival mode before 20 seconds have passed, it won't make the staring aggravation sound.

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The reason for this is very likely that the method net.minecraft.entity.monster.EntityEnderman.playEndermanSound() only plays the scream sound every 400 ticks for an enderman:

public void playEndermanSound()
{
    if (this.ticksExisted >= this.lastCreepySound + 400)
    {
        this.lastCreepySound = this.ticksExisted;

        if (!this.isSilent())
        {
            this.world.playSound(this.posX, this.posY + (double)this.getEyeHeight(), this.posZ, SoundEvents.ENTITY_ENDERMEN_STARE, this.getSoundCategory(), 2.5F, 1.0F, false);
        }
    }
}

This cooldown can be quite irritating and additionally it affects the first 400 ticks of the lifetime of an enderman as well, which might not be the expected behavior.

Linked issues

Comments 4

Confirmed for 18w30b

Confirmed for 1.13.1.

Confirmed for 1.13.2-pre2.

Confirmed for 19w39a and 1.14.4

Sonicwave

slicedlime

Confirmed

(Unassigned)

enderman, sound

Minecraft 1.11.2, Minecraft 17w14a, Minecraft 17w16a, Minecraft 17w17a, Minecraft 1.12 Pre-Release 2, ..., Minecraft 18w50a, Minecraft 1.14 Pre-Release 5, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, 1.14.4

19w35a

Retrieved