-
Bug
-
Resolution: Unresolved
-
None
-
20w51a, 21w03a, 21w05a, 21w05b, 21w06a, 21w07a, 21w14a, 21w19a, 21w20a, 1.17 Release Candidate 1, 1.17, 1.17.1 Pre-release 1, 1.17.1 Release Candidate 1, 1.17.1, 21w38a, 21w42a, 1.18, 1.18.1, 1.18.2, 22w14a, 22w18a, 22w19a, 1.19 Pre-release 1, 1.19, 1.19.1, 1.19.2, 1.19.3, 23w06a, 1.19.4, 1.20.1, 1.21
-
Confirmed
-
Game Events
-
Low
-
Gameplay
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:[{Base:0.0d,Name:"minecraft:generic.movement_speed"}]}
- 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 Avoma 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.