Do not send break animation to himself

This commit is contained in:
Sotr
2019-03-24 05:08:58 +08:00
parent 71b180df27
commit 0c7b8a1008

View File

@@ -72,7 +72,7 @@ public class WorldManager implements IWorldAccess {
Iterator<? extends EntityHuman> iterator = list.iterator();
while (iterator.hasNext()) {
EntityHuman human = iterator.next();
if (!(human instanceof EntityPlayer)) continue;
if (!(human instanceof EntityPlayer) || human == entity) continue;
EntityPlayer entityplayer = (EntityPlayer) human;
// Paper end
@@ -88,7 +88,7 @@ public class WorldManager implements IWorldAccess {
// CraftBukkit end
if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
//entityplayer.playerConnection.sendPacket(new PacketPlayOutBlockBreakAnimation(i, blockposition, j));
entityplayer.playerConnection.sendPacket(new PacketPlayOutBlockBreakAnimation(i, blockposition, j));
}
}
}