diff --git a/Spigot-Server-Patches/Add-hit-entity-to-ProjectileHitEvent.patch b/Spigot-Server-Patches/Add-hit-entity-to-ProjectileHitEvent.patch index 2c0e3584c..b2cfdba2e 100644 --- a/Spigot-Server-Patches/Add-hit-entity-to-ProjectileHitEvent.patch +++ b/Spigot-Server-Patches/Add-hit-entity-to-ProjectileHitEvent.patch @@ -35,14 +35,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { - // Paper end - - if (movingobjectposition != null) { -- org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event -+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Include entity in movingobjectposition - vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z); } + if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) { +- org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // Craftbukkit - Call event ++ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event + if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) { + this.hooked = movingobjectposition.entity; + this.s(); diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java @@ -61,9 +61,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -0,0 +0,0 @@ public class CraftEventFactory { + child.world.getServer().getPluginManager().callEvent(event); return event; } - ++ + // Paper start + public static ProjectileHitEvent callProjectileHitEvent(Entity entity, Entity hitEntity) { + ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), (hitEntity == null ? null : hitEntity.getBukkitEntity())); @@ -72,8 +73,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return event; + } + // Paper end -+ - public static ExpBottleEvent callExpBottleEvent(Entity entity, int exp) { - ThrownExpBottle bottle = (ThrownExpBottle) entity.getBukkitEntity(); - ExpBottleEvent event = new ExpBottleEvent(bottle, exp); + } -- \ No newline at end of file diff --git a/Spigot-Server-Patches/Move-ProjectileHitEvent-call-to-proper-place.patch b/Spigot-Server-Patches/Move-ProjectileHitEvent-call-to-proper-place.patch deleted file mode 100644 index 618014920..000000000 --- a/Spigot-Server-Patches/Move-ProjectileHitEvent-call-to-proper-place.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaBlend -Date: Mon, 21 Nov 2016 22:21:53 -0800 -Subject: [PATCH] Move ProjectileHitEvent call to proper place - - -diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/EntityFishingHook.java -+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java -@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { - // Paper end - - if (movingobjectposition != null) { -- org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Include entity in movingobjectposition -+ //org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Wrong location, moved down to proper location - vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z); - } - -@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity { - - if (movingobjectposition != null && movingobjectposition.type != MovingObjectPosition.EnumMovingObjectType.MISS) { - if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.ENTITY) { -+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition.entity); // Craftbukkit - Call event // Paper - Include entity in movingobjectposition - this.hooked = movingobjectposition.entity; - this.s(); - } else { --- \ No newline at end of file diff --git a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch index d6866ed29..3b6f24f6f 100644 --- a/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/Vanished-players-don-t-have-rights.patch @@ -41,8 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end + 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); + } diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java diff --git a/work/Bukkit b/work/Bukkit index d986a3f77..beb397972 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit d986a3f774df1628dcfbd25730dfdbfe4471a447 +Subproject commit beb39797294b37e7d444d1ad62404f7a43552a2b diff --git a/work/CraftBukkit b/work/CraftBukkit index b5b0a97d4..78c761434 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit b5b0a97d44df120d69b6102b7b1f702c8b917cd3 +Subproject commit 78c7614349845f26cdb39514b7015e1c220dab37 diff --git a/work/Spigot b/work/Spigot index 0f17cfb6c..31fef093d 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 0f17cfb6c463710def7e7ea8b9b93d91df09231c +Subproject commit 31fef093d5fe506081252010e3952d7b6b3a5476