Don't bother deep cloning a sound packet
This commit is contained in:
parent
743918aa2d
commit
90f23f92d3
@ -48,7 +48,7 @@ public class PacketListenerSounds extends PacketAdapter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
event.setPacket(event.getPacket().deepClone());
|
event.setPacket(event.getPacket().shallowClone());
|
||||||
|
|
||||||
if (event.getPacketType() == Server.ENTITY_STATUS) {
|
if (event.getPacketType() == Server.ENTITY_STATUS) {
|
||||||
handleEntityStatus(event);
|
handleEntityStatus(event);
|
||||||
@ -261,7 +261,6 @@ public class PacketListenerSounds extends PacketAdapter {
|
|||||||
|
|
||||||
mods.write(6, pitch);
|
mods.write(6, pitch);
|
||||||
|
|
||||||
event.setCancelled(true);
|
|
||||||
try {
|
try {
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user