The Bug:
Sculk sensors are not activated upon pandas sneezing.
Steps to Reproduce:
Summon multiple baby pandas that are likely to sneeze by using the command provided below multiple times.
/summon minecraft:panda ~ ~ ~ {HiddenGene:"weak",MainGene:"weak",Age:-25000,attributes:[{id:"minecraft:movement_speed",base:0.0d}]}Place down a sculk sensor nearby and wait for one of the pandas to sneeze.
Take note as to whether or not sculk sensors are activated upon pandas sneezing.
Observed Behavior:
Sculk sensors aren't activated.
Expected Behavior:
Sculk sensors would be activated.
Code Analysis:
Code analysis by @unknown can be found below.
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
net.minecraft.world.entity.animal.Panda.java
public class Panda extends Animal {
...
private void afterSneeze() {
Vec3 vec3 = this.getDeltaMovement();
this.level.addParticle(ParticleTypes.SNEEZE, this.getX() - (double)(this.getBbWidth() + 1.0F) * 0.5D * (double)Mth.sin(this.yBodyRot * ((float)Math.PI / 180F)), this.getEyeY() - (double)0.1F, this.getZ() + (double)(this.getBbWidth() + 1.0F) * 0.5D * (double)Mth.cos(this.yBodyRot * ((float)Math.PI / 180F)), vec3.x, 0.0D, vec3.z);
this.playSound(SoundEvents.PANDA_SNEEZE, 1.0F, 1.0F);
...If we look at the above class, we can see that pandas sneezing simply isn't registered as a game event as the gameEvent() method is never called, thus not detecting this action as a vibration.
Potential Fix:
Simply calling the gameEvent() method where appropriate within this piece of code should resolve this problem. I feel as if a new game event tag would be expected to be used here as none of the currently existing ones seem to fit this action accordingly.