mojira.dev
MC-193659

Parrots don't imitate piglin brutes

Parrots are supposed to imitate piglin brutes, because they are hostile mobs. However, after testing, the parrots never made any piglin brute sounds.

What I expected to happen was...:
The parrots made high pitched piglin brute snorting, with the "Parrot snorts mightily" subtitle.

What actually happened was...:
The parrots did not imitate the piglin brute like they do to other hostile mobs.

Steps to Reproduce:
1. Have a piglin brute and some parrots
2. ❌  No parrots made any piglin brute sounds.

Code analysis

Code analysis by @unknown can be found in this comment

Linked issues

Attachments

Comments 6

/playsound works, and it seems like there is a sound "minecraft:entity.parrot.imitate.piglin_brute" but with so many parrots and a piglin brute, the parrots still do not actually imitate them.

 

Edit: For clarification, the sound for parrots imitating piglin brutes do exist, but after lots of experimentation, I am positive the parrots haven't actually made those piglin brute sounds, despite the piglin brute being adjacent to them.

I added two new screenshots.

In the next screenshot, there are parrots, piglin brutes, and ravagers (with NoAI:1b so they don't escape the pens). The parrots imitated the ravager, but not the piglin brute.

 

After that, there are parrots and a piglin brute, but the parrots did not make any piglin brute imitation sounds.

Code analysis

The sound event is specified and registered, with a proper sound associated with it:

// In net.minecraft.sound.SoundEvents
public static final SoundEvent ENTITY_PARROT_IMITATE_PIGLIN = register("entity.parrot.imitate.piglin");
public static final SoundEvent ENTITY_PARROT_IMITATE_PIGLIN_BRUTE = register("entity.parrot.imitate.piglin_brute");

However, unlike piglins, which can be imitated by parrots, piglin brutes are not added to the map of entity types to imitation sounds for parrots:

// In net.minecraft.entity.passive.ParrotEntity
MOB_SOUNDS = Util.make(Maps.newHashMap(), imitations -> {
	imitations.put(EntityType.PIGLIN, SoundEvents.ENTITY_PARROT_IMITATE_PIGLIN);
	// No piglin brute here :(
});

Because of this, the entity.parrot.imitate.piglin_brute sound event will never play.

Fixed in 20w28a.

Edit: See new screenshot.

Marked as fixed as requested by the reporter.

BlockOfNetherite

(Unassigned)

Unconfirmed

mob, sound

20w27a

20w28a

Retrieved