Stray adult cats meow as if they are tamed.
To reproduce:
Spawn a cat
It makes tamed cat sounds without being tamed
Expected result: cats should meow anxiously when being stray.
Actual result: cats meow confidently when stray.
Code Analysis
I did some debugging in a mod development environment and found that there is a mistake in the Codec of CatSoundVariant.CatSoundSet:
private static Codec<CatSoundSet> CODEC =
RecordCodecBuilder.create(
i -> i.group(
SoundEvent.CODEC
.fieldOf("ambient_sound")
.forGetter(CatSoundSet::ambientSound),
// Here it goes wrong
// It should use CatSoundSet::strayAmbientSound here
SoundEvent.CODEC
.fieldOf("stray_ambient_sound")
.forGetter(CatSoundSet::ambientSound), // <--- HERE
// other fields ...
).apply(i, CatSoundSet::new)
);Common mistake I have often made in modding and sometimes pretty hard to trace.
Linked issues
Attachments
Comments 4
The second bullet point is already handled in MC-305579.
Here is a video of the bug