Don't bother checking if their sound type is a death or hurt or w/e
This commit is contained in:
parent
c2a26dacc2
commit
53b7e29171
@ -79,8 +79,7 @@ public class PacketListenerSounds extends PacketAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((!(entity instanceof LivingEntity)) || ((LivingEntity) entity).getHealth() > 0) {
|
if ((!(entity instanceof LivingEntity)) || ((LivingEntity) entity).getHealth() > 0) {
|
||||||
boolean hasInvun = ReflectionManager.hasInvul(entity);
|
soundType = soundGroup.getType(soundEffectObj);
|
||||||
soundType = soundGroup.getType(soundEffectObj, !hasInvun);
|
|
||||||
} else {
|
} else {
|
||||||
soundType = SoundType.DEATH;
|
soundType = SoundType.DEATH;
|
||||||
}
|
}
|
||||||
|
@ -121,18 +121,12 @@ public class SoundGroup {
|
|||||||
/**
|
/**
|
||||||
* Used to check if this sound name is owned by this disguise sound.
|
* Used to check if this sound name is owned by this disguise sound.
|
||||||
*/
|
*/
|
||||||
public SoundType getType(Object sound, boolean ignoreDamage) {
|
public SoundType getType(Object sound) {
|
||||||
if (sound == null) {
|
if (sound == null) {
|
||||||
return SoundType.CANCEL;
|
return SoundType.CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
SoundType soundType = getSound(sound);
|
return getSound(sound);
|
||||||
|
|
||||||
if (soundType == SoundType.DEATH || (ignoreDamage && soundType == SoundType.HURT)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return soundType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isCancelSound(String sound) {
|
public boolean isCancelSound(String sound) {
|
||||||
|
Loading…
Reference in New Issue
Block a user