From 622add8458dd64352005fdf067bbef18e0bd0f99 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 22 Dec 2016 15:29:23 -0600
Subject: [PATCH] MC-88491: Fix projectile colliding with shooter

In some situations, a projectile made collide with the entity that shot
it. This occurs because the game sets the ignored entity incorrectly.
Our fix is to ensure that the shooter is the only entity that gets
ignored by the projectile.
---
 nms-patches/EntityProjectile.patch | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/nms-patches/EntityProjectile.patch b/nms-patches/EntityProjectile.patch
index 17b70ac121..f2c9c7f370 100644
--- a/nms-patches/EntityProjectile.patch
+++ b/nms-patches/EntityProjectile.patch
@@ -8,6 +8,15 @@
      }
  
      protected void i() {}
+@@ -127,7 +128,7 @@
+             if (entity1.isInteractable()) {
+                 if (entity1 == this.c) {
+                     flag = true;
+-                } else if (this.shooter != null && this.ticksLived < 2 && this.c == null) {
++                } else if (this.shooter != null && this.ticksLived < 2 && this.c == null && this.shooter == entity1) { // CraftBukkit - MC-88491
+                     this.c = entity1;
+                     flag = true;
+                 } else {
 @@ -164,6 +165,11 @@
                  this.e(movingobjectposition.a());
              } else {