mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-10-31 20:09:18 +00:00
Accidentally removed a cancel, don't bother sending our sound packets if we're not modifying the sound groups
This commit is contained in:
parent
e7b370733f
commit
bc9ebac4d5
|
@ -217,21 +217,21 @@ public class PacketListenerSounds extends PacketAdapter {
|
|||
}
|
||||
}
|
||||
|
||||
SoundGroup disSound = SoundGroup.getGroup(entity.getType().name());
|
||||
SoundGroup entitySoundGroup = SoundGroup.getGroup(entity.getType().name());
|
||||
|
||||
if (disSound == null) {
|
||||
if (entitySoundGroup == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Object sound = disSound.getSound(soundType);
|
||||
Object sound = entitySoundGroup.getSound(soundType);
|
||||
|
||||
if (sound == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
disSound = SoundGroup.getGroup(disguise);
|
||||
SoundGroup disSound = SoundGroup.getGroup(disguise);
|
||||
|
||||
if (disSound == null) {
|
||||
if (disSound == null || disSound == entitySoundGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -262,6 +262,7 @@ public class PacketListenerSounds extends PacketAdapter {
|
|||
|
||||
mods.write(6, pitch);
|
||||
|
||||
event.setCancelled(true);
|
||||
try {
|
||||
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
||||
} catch (InvocationTargetException e) {
|
||||
|
|
Loading…
Reference in a new issue