diff options
Diffstat (limited to 'nms-patches/WorldManager.patch')
-rw-r--r-- | nms-patches/WorldManager.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nms-patches/WorldManager.patch b/nms-patches/WorldManager.patch index cbf37c13..4a9fa5b4 100644 --- a/nms-patches/WorldManager.patch +++ b/nms-patches/WorldManager.patch @@ -26,3 +26,29 @@ } public void a(int i, BlockPosition blockposition, int j) { +@@ -52,6 +55,12 @@ + public void b(int i, BlockPosition blockposition, int j) { + Iterator iterator = this.a.getPlayerList().v().iterator(); + ++ // CraftBukkit start ++ EntityHuman entityhuman = null; ++ Entity entity = world.a(i); // PAIL Rename getEntity ++ if (entity instanceof EntityHuman) entityhuman = (EntityHuman) entity; ++ // CraftBukkit end ++ + while (iterator.hasNext()) { + EntityPlayer entityplayer = (EntityPlayer) iterator.next(); + +@@ -60,6 +69,12 @@ + double d1 = (double) blockposition.getY() - entityplayer.locY; + double d2 = (double) blockposition.getZ() - entityplayer.locZ; + ++ // CraftBukkit start ++ if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) { ++ continue; ++ } ++ // CraftBukkit end ++ + if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) { + entityplayer.playerConnection.sendPacket(new PacketPlayOutBlockBreakAnimation(i, blockposition, j)); + } |