If a guardian doesn't land centered on a solid block, it won't make a flopping noise. This most often happens when an elder guardian flops on a hill, or when guardians flop on top of stacked carpets.
Linked issues
Attachments
Comments 15
Here's a code analysis of this issue. The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
Code Analysis:
net.minecraft.world.entity.monster.Guardian.java
public class Guardian extends Monster {
...
public void aiStep() {
if (this.isAlive()) {
if (this.level.isClientSide) {
this.clientSideTailAnimationO = this.clientSideTailAnimation;
if (!this.isInWater()) {
this.clientSideTailAnimationSpeed = 2.0F;
Vec3 vec3 = this.getDeltaMovement();
if (vec3.y > 0.0D && this.clientSideTouchedGround && !this.isSilent()) {
this.level.playLocalSound(this.getX(), this.getY(), this.getZ(), this.getFlopSound(), this.getSoundSource(), 1.0F, 1.0F, false);
}
this.clientSideTouchedGround = vec3.y < 0.0D && this.level.loadedAndEntityCanStandOn(this.blockPosition().below(), this);
} ...
This issue stems from the above class. I'm not exactly sure what's causing it but I'm confident in saying that the problem exists within this particular piece of code.
Hi there!
I can confirm for 1.16.2pr3.