Fix an error with sound group null, modified sound groups?

This commit is contained in:
libraryaddict 2022-02-27 01:26:01 +13:00
parent 6f97aa219d
commit 1c05d3d2cd
1 changed files with 1 additions and 7 deletions

View File

@ -74,7 +74,7 @@ public class PacketListenerSounds extends PacketAdapter {
disguisedEntity = entity;
soundGroup = SoundGroup.getGroup(entity.getType().name());
if (soundGroup.getSound(soundEffectObj) == null) {
if (soundGroup == null || soundGroup.getSound(soundEffectObj) == null) {
return;
}
@ -95,12 +95,6 @@ public class PacketListenerSounds extends PacketAdapter {
return;
}
// Blocks null and CANCEL, HURT and DEATH are 100% handled by entity status!
if (soundType != SoundType.STEP && soundType != SoundType.IDLE) {
//event.setCancelled(true);
// return;
}
if (disguisedEntity == observer && !disguise.isSelfDisguiseSoundsReplaced()) {
return;
}