Fixes more sound bugs
This commit is contained in:
parent
19b61395ee
commit
f1b76f622b
@ -96,9 +96,8 @@ public class DisguiseAPI {
|
||||
if (loc.equals(soundLoc)) {
|
||||
DisguiseSound disSound = DisguiseSound.getType(entity.getType().name());
|
||||
if (disSound != null) {
|
||||
if (((CraftEntity) entity).getHandle().dead) {
|
||||
if (entity instanceof LivingEntity && ((LivingEntity) entity).getHealth() == 0) {
|
||||
soundType = SoundType.DEATH;
|
||||
System.out.print(soundType);
|
||||
} else {
|
||||
boolean hasInvun = false;
|
||||
if (entity instanceof LivingEntity) {
|
||||
@ -110,7 +109,6 @@ public class DisguiseAPI {
|
||||
hasInvun = e.isInvulnerable();
|
||||
}
|
||||
soundType = disSound.getType(soundName, !hasInvun);
|
||||
System.out.print(soundType + " " + hasInvun);
|
||||
}
|
||||
if (soundType != null) {
|
||||
disguisedEntity = entity;
|
||||
|
@ -133,10 +133,14 @@ public enum DisguiseSound {
|
||||
if (!disguiseSounds.containsKey(type) || type == SoundType.DEATH || (ignoreDamage && type == SoundType.HURT))
|
||||
continue;
|
||||
Sound s = disguiseSounds.get(type);
|
||||
if (s != null)
|
||||
if (CraftSound.getSound(s).equals(name))
|
||||
if (s != null) {
|
||||
String soundName = CraftSound.getSound(s);
|
||||
if (s == Sound.BLAZE_BREATH)
|
||||
soundName = "mob.blaze.breathe";
|
||||
if (soundName.equals(name))
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user