diff options
author | md_5 <git@md-5.net> | 2016-11-23 22:50:37 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-23 22:50:37 +1100 |
commit | a0d5a841daee1c7983981d87a676d3491df0bfd7 (patch) | |
tree | 7a557b2e7688dcef17b158115ec1b9bfe34a95bd | |
parent | 83fd16e453f855580402194c75cd5c7a6b78827e (diff) | |
download | craftbukkit-a0d5a841daee1c7983981d87a676d3491df0bfd7.tar craftbukkit-a0d5a841daee1c7983981d87a676d3491df0bfd7.tar.gz craftbukkit-a0d5a841daee1c7983981d87a676d3491df0bfd7.tar.lz craftbukkit-a0d5a841daee1c7983981d87a676d3491df0bfd7.tar.xz craftbukkit-a0d5a841daee1c7983981d87a676d3491df0bfd7.zip |
SPIGOT-2836: ProjectileHitEvent not always firing for FishHook
-rw-r--r-- | nms-patches/EntityFishingHook.patch | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nms-patches/EntityFishingHook.patch b/nms-patches/EntityFishingHook.patch index a00557b3..8aea9439 100644 --- a/nms-patches/EntityFishingHook.patch +++ b/nms-patches/EntityFishingHook.patch @@ -12,14 +12,14 @@ public class EntityFishingHook extends Entity { -@@ -220,6 +225,7 @@ - vec3d = new Vec3D(this.locX, this.locY, this.locZ); - vec3d1 = new Vec3D(this.locX + this.motX, this.locY + this.motY, this.locZ + this.motZ); - if (movingobjectposition != null) { -+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event - vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z); +@@ -251,6 +256,7 @@ } + if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event + if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) { + this.hooked = movingobjectposition.entity; + this.s(); @@ -283,6 +289,10 @@ if (this.g <= 0) { this.h = 0; |