From bbe32f42f0873573c5b4a533a51b489527d891f4 Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Sat, 23 Nov 2024 23:13:10 +0100 Subject: [PATCH] Call ProjectileHitEvent for entity hits (#11652) A simple bugfix replacing a new vanilla call to Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call the event. --- ...l-ProjectileHitEvent-for-entity-hits.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/server/Call-ProjectileHitEvent-for-entity-hits.patch diff --git a/patches/server/Call-ProjectileHitEvent-for-entity-hits.patch b/patches/server/Call-ProjectileHitEvent-for-entity-hits.patch new file mode 100644 index 0000000000..1bd67b5251 --- /dev/null +++ b/patches/server/Call-ProjectileHitEvent-for-entity-hits.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Bjarne Koll +Date: Sat, 23 Nov 2024 22:48:26 +0100 +Subject: [PATCH] Call ProjectileHitEvent for entity hits + +A simple bugfix replacing a new vanilla call to +Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call +the event. + +diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +@@ -0,0 +0,0 @@ public abstract class AbstractArrow extends Projectile { + continue; + } + +- ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity); ++ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // Paper - also call projectile hit event + + this.hasImpulse = true; + if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {