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.
Confirmed for 18w30b