Potentially fix #521

This commit is contained in:
libraryaddict 2020-11-03 19:00:35 +13:00
parent 9489d794d4
commit e81b42b0ff

View File

@ -76,6 +76,10 @@ public class PacketListenerViewSelfDisguise extends PacketAdapter {
for (PacketContainer newPacket : transformed.getPackets()) {
if (newPacket.getType() != Server.PLAYER_INFO && newPacket.getType() != Server.ENTITY_DESTROY &&
newPacket.getIntegers().read(0) == observer.getEntityId()) {
if (newPacket == packet) {
newPacket = newPacket.shallowClone();
}
newPacket.getIntegers().write(0, DisguiseAPI.getSelfDisguiseId());
}