From 75a56831344270f805dc9e429db8d8cee151756f Mon Sep 17 00:00:00 2001 From: Tamion <70228790+notTamion@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:33:58 +0200 Subject: [PATCH] clean up --- ...Event-not-called-for-multiple-HitRe.patch} | 152 +++++++----------- 1 file changed, 59 insertions(+), 93 deletions(-) rename patches/server/{1066-Fix-ProjectileHitEvent-not-calling-for-multiple-HitR.patch => 1066-Fix-ProjectileHitEvent-not-called-for-multiple-HitRe.patch} (64%) diff --git a/patches/server/1066-Fix-ProjectileHitEvent-not-calling-for-multiple-HitR.patch b/patches/server/1066-Fix-ProjectileHitEvent-not-called-for-multiple-HitRe.patch similarity index 64% rename from patches/server/1066-Fix-ProjectileHitEvent-not-calling-for-multiple-HitR.patch rename to patches/server/1066-Fix-ProjectileHitEvent-not-called-for-multiple-HitRe.patch index a30a21d171fd..e03e48784875 100644 --- a/patches/server/1066-Fix-ProjectileHitEvent-not-calling-for-multiple-HitR.patch +++ b/patches/server/1066-Fix-ProjectileHitEvent-not-called-for-multiple-HitRe.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Tamion <70228790+notTamion@users.noreply.github.com> Date: Tue, 28 May 2024 11:15:19 +0200 -Subject: [PATCH] Fix ProjectileHitEvent not calling for multiple HitResults +Subject: [PATCH] Fix ProjectileHitEvent not called for multiple HitResults Projectiles only try to hit the closest entity in their hitbox, if multiple entities are inside of it and the ProjectileHitEvent is @@ -14,7 +14,7 @@ cancelled. protected net.minecraft.world.entity.projectile.Projectile hitCancelled 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 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b21954f886fb2 100644 +index 2ee88a693193277e34702b0123955cfdee27a588..5b4209c8fccb5fca7e2851534ac60f64c6798e49 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -73,8 +73,7 @@ public abstract class AbstractArrow extends Projectile { @@ -27,7 +27,7 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 @Nullable private List piercedAndKilledEntities; public ItemStack pickupItemStack; -@@ -242,44 +241,26 @@ public abstract class AbstractArrow extends Projectile { +@@ -242,44 +241,25 @@ public abstract class AbstractArrow extends Projectile { this.inGroundTime = 0; Vec3 vec3d2 = this.position(); @@ -52,9 +52,8 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 - if (entity instanceof Player && entity1 instanceof Player && !((Player) entity1).canHarmPlayer((Player) entity)) { - object = null; - movingobjectpositionentity = null; -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities -+ List hitResults = ProjectileUtil.getHitResults(vec3d2, this, this::canHitEntity, this.getDeltaMovement(), this.level(), 0.3f, ClipContext.Block.COLLIDER); -+ for (HitResult hitResult : hitResults) { ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults ++ for (HitResult hitResult : ProjectileUtil.getHitResults(vec3d2, this, this::canHitEntity, this.getDeltaMovement(), this.level(), 0.3f, ClipContext.Block.COLLIDER)) { + if (hitResult.getType() == HitResult.Type.ENTITY) { + Entity entity = ((EntityHitResult) hitResult).getEntity(); + Entity entity1 = this.getOwner(); @@ -71,11 +70,11 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 - if (projectiledeflection != ProjectileDeflection.NONE) { - break; + if (!flag) { -+ com.mojang.datafixers.util.Pair projectiledeflection = this.preHitTargetOrDeflectSelf(hitResult); // CraftBukkit - projectile hit event -+ if ((projectiledeflection.getSecond() == null || !projectiledeflection.getSecond().isCancelled()) && this.getPierceLevel() <= 0) -+ break; ++ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(hitResult); // CraftBukkit - projectile hit event + this.hasImpulse = true; -+ if (projectiledeflection.getFirst() != ProjectileDeflection.NONE) { ++ if (!this.hitCancelled && this.getPierceLevel() <= 0) ++ break; ++ if (projectiledeflection != ProjectileDeflection.NONE) { + break; + } } @@ -86,26 +85,26 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 - } - - object = null; -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } vec3d = this.getDeltaMovement(); -@@ -329,6 +310,14 @@ public abstract class AbstractArrow extends Projectile { +@@ -329,6 +309,14 @@ public abstract class AbstractArrow extends Projectile { } } -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + @Override -+ public com.mojang.datafixers.util.Pair preHitTargetOrDeflectSelf(HitResult hitResult) { -+ if (hitResult instanceof EntityHitResult entityHitResult && this.hitCancelled && this.getPierceLevel() > 0) this.piercedEntityAmount += 1; ++ public ProjectileDeflection preHitTargetOrDeflectSelf(HitResult hitResult) { ++ if (hitResult instanceof EntityHitResult && this.hitCancelled && this.getPierceLevel() > 0) this.piercedEntityAmount += 1; + return super.preHitTargetOrDeflectSelf(hitResult); + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults + @Override protected double getDefaultGravity() { return 0.05D; -@@ -368,9 +357,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -368,9 +356,7 @@ public abstract class AbstractArrow extends Projectile { this.piercedAndKilledEntities.clear(); } @@ -116,7 +115,7 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 } -@@ -396,20 +383,16 @@ public abstract class AbstractArrow extends Projectile { +@@ -396,20 +382,16 @@ public abstract class AbstractArrow extends Projectile { int i = Mth.ceil(Mth.clamp((double) f * d0, 0.0D, 2.147483647E9D)); if (this.getPierceLevel() > 0) { @@ -139,7 +138,7 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 } if (this.isCritArrow()) { -@@ -591,11 +574,6 @@ public abstract class AbstractArrow extends Projectile { +@@ -591,11 +573,6 @@ public abstract class AbstractArrow extends Projectile { return ProjectileUtil.getEntityHitResult(this.level(), this, currentPosition, nextPosition, this.getBoundingBox().expandTowards(this.getDeltaMovement()).inflate(1.0D), this::canHitEntity); } @@ -152,10 +151,10 @@ index 2ee88a693193277e34702b0123955cfdee27a588..efec64f01916e5c9bcb54a70909b2195 public void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java -index f79fc0ed58af2cf55e8642b6d7fc9e4f57d0ba20..69ba6a7a42cf69559a190a8db9e9319c566861ff 100644 +index f79fc0ed58af2cf55e8642b6d7fc9e4f57d0ba20..639cda5e4d342ade8b439915f679d3f3a3dc3fec 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java -@@ -83,10 +83,20 @@ public abstract class AbstractHurtingProjectile extends Projectile { +@@ -83,10 +83,14 @@ public abstract class AbstractHurtingProjectile extends Projectile { this.igniteForSeconds(1.0F); } @@ -163,25 +162,19 @@ index f79fc0ed58af2cf55e8642b6d7fc9e4f57d0ba20..69ba6a7a42cf69559a190a8db9e9319c - - if (movingobjectposition.getType() != HitResult.Type.MISS) { - this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + for (HitResult movingobjectposition : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity, this.getClipType())) { + if (movingobjectposition.getType() != HitResult.Type.MISS) { -+ org.bukkit.event.entity.ProjectileHitEvent event = this.preHitTargetOrDeflectSelf(movingobjectposition).getSecond(); // CraftBukkit - projectile hit event -+ if (event == null || !event.isCancelled()) ++ this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event ++ if (!this.hitCancelled) + break; -+ -+ // CraftBukkit start - Fire ProjectileHitEvent -+ if (this.isRemoved()) { -+ // CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Paper - this is an undesired duplicate event -+ } -+ // CraftBukkit end -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities + } ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } this.checkInsideBlocks(); diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java -index 09d465947a5720e05c350d455c86002682104079..fc958dd371bde89036e952faa1fe05272f50ffe6 100644 +index 09d465947a5720e05c350d455c86002682104079..e5ffe6246d932780863477b3d99794a9009802f5 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java @@ -165,11 +165,15 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { @@ -190,23 +183,22 @@ index 09d465947a5720e05c350d455c86002682104079..fc958dd371bde89036e952faa1fe0527 - HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity); - -- if (!this.noPhysics) { + if (!this.noPhysics) { - this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event - this.hasImpulse = true; -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities -+ for (HitResult movingobjectposition : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity)) { -+ if (!this.noPhysics) { -+ org.bukkit.event.entity.ProjectileHitEvent event = this.preHitTargetOrDeflectSelf(movingobjectposition).getSecond(); // CraftBukkit - projectile hit event ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults ++ for (HitResult movingobjectposition : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity)) { ++ this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event + this.hasImpulse = true; -+ if (event == null || !event.isCancelled()) ++ if (!hitCancelled) + break; + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } this.updateRotation(); diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index 1223c5d23d0ea6aed068bdf0f5725e2ad49fc82c..87a9f9e526183a18645a489a9109f812d33f761b 100644 +index 1223c5d23d0ea6aed068bdf0f5725e2ad49fc82c..cced1b525f3a41f0b53580837e7df8db27253c2d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -282,9 +282,13 @@ public class FishingHook extends Projectile { @@ -216,18 +208,18 @@ index 1223c5d23d0ea6aed068bdf0f5725e2ad49fc82c..87a9f9e526183a18645a489a9109f812 - HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity); - - this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + for (HitResult movingobjectposition : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity)) { -+ org.bukkit.event.entity.ProjectileHitEvent event = this.preHitTargetOrDeflectSelf(movingobjectposition).getSecond(); // CraftBukkit - projectile hit event -+ if (event == null || !event.isCancelled()) ++ this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event ++ if (!hitCancelled) + break; + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } @Override diff --git a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java -index 8575941fd238750c5d56843989a48bcbde2d8a88..3dae4271d14cd5cabf7d3d352faf9ab5bdac7056 100644 +index 8575941fd238750c5d56843989a48bcbde2d8a88..498b7d41e054903d3bfab66f86a9da7cc8a04a30 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java +++ b/src/main/java/net/minecraft/world/entity/projectile/LlamaSpit.java @@ -42,9 +42,14 @@ public class LlamaSpit extends Projectile { @@ -235,57 +227,33 @@ index 8575941fd238750c5d56843989a48bcbde2d8a88..3dae4271d14cd5cabf7d3d352faf9ab5 super.tick(); Vec3 vec3d = this.getDeltaMovement(); - HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity); -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + for (HitResult movingobjectposition : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity)) { -+ org.bukkit.event.entity.ProjectileHitEvent event = this.preHitTargetOrDeflectSelf(movingobjectposition).getSecond(); // CraftBukkit - projectile hit event -+ if (event == null || !event.isCancelled()) ++ this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event ++ if (!hitCancelled) + break; + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults - this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event double d0 = this.getX() + vec3d.x; double d1 = this.getY() + vec3d.y; double d2 = this.getZ() + vec3d.z; -diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 10ade433c083851d9ea4797c6ec618db122229f9..fe37ce0b82ce2b9039ad94b978622db5a397803d 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -208,15 +208,14 @@ public abstract class Projectile extends Entity implements TraceableEntity { - } - - // CraftBukkit start - call projectile hit event -- public ProjectileDeflection preHitTargetOrDeflectSelf(HitResult movingobjectposition) { // Paper - protected -> public -+ public com.mojang.datafixers.util.Pair preHitTargetOrDeflectSelf(HitResult movingobjectposition) { // Paper - protected -> public // Paper - Fix ProjectileHitEvent not calling for multiple entities - org.bukkit.event.entity.ProjectileHitEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); - this.hitCancelled = event != null && event.isCancelled(); - if (movingobjectposition.getType() == HitResult.Type.BLOCK || !this.hitCancelled) { -- return this.hitTargetOrDeflectSelf(movingobjectposition); -+ return new com.mojang.datafixers.util.Pair<>(this.hitTargetOrDeflectSelf(movingobjectposition), event); // Paper - Fix ProjectileHitEvent not calling for multiple entities - } -- return ProjectileDeflection.NONE; -- } -- // CraftBukkit end -+ return new com.mojang.datafixers.util.Pair<>(ProjectileDeflection.NONE, event); // Paper - Fix ProjectileHitEvent not calling for multiple entities -+ } // CraftBukkit end - - protected ProjectileDeflection hitTargetOrDeflectSelf(HitResult hitResult) { - if (hitResult.getType() == HitResult.Type.ENTITY) { diff --git a/src/main/java/net/minecraft/world/entity/projectile/ProjectileUtil.java b/src/main/java/net/minecraft/world/entity/projectile/ProjectileUtil.java -index e43b3b37a3afc903f057d49d34339f8022274d3e..c30a42e48f5d3b9bba9be8e14807fde9076bc520 100644 +index e43b3b37a3afc903f057d49d34339f8022274d3e..dcbb54b19a88db7c4eca761ccba7d6e9b333fd11 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ProjectileUtil.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ProjectileUtil.java -@@ -159,4 +159,53 @@ public final class ProjectileUtil { +@@ -159,4 +159,51 @@ public final class ProjectileUtil { abstractArrow.setBaseDamageFromMob(damageModifier); return abstractArrow; } + -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + public static java.util.List getEntityHitResults(Level world, Entity entity, Vec3 min, Vec3 max, AABB box, Predicate predicate, float margin) { + java.util.TreeMap entities = new java.util.TreeMap<>(); + + for (Entity entity3 : world.getEntities(entity, box, predicate)) { -+ AABB aABB = entity3.getBoundingBox().inflate((double)margin); ++ AABB aABB = entity3.getBoundingBox().inflate(margin); + Optional optional = aABB.clip(min, max); + if (optional.isPresent()) { + double e = min.distanceToSqr(optional.get()); @@ -320,17 +288,15 @@ index e43b3b37a3afc903f057d49d34339f8022274d3e..c30a42e48f5d3b9bba9be8e14807fde9 + } + + java.util.List hitResults = (java.util.List)(java.util.List) getEntityHitResults(world, entity, pos, vec3, entity.getBoundingBox().expandTowards(velocity).inflate(1.0), predicate, margin); -+ if (!hitResults.isEmpty()) { -+ if (blockHitResult.getType() != HitResult.Type.MISS) hitResults.add(blockHitResult); -+ return hitResults; -+ } ++ if (blockHitResult.getType() != HitResult.Type.MISS || hitResults.isEmpty()) ++ hitResults.add(blockHitResult); + -+ return java.util.List.of(blockHitResult); ++ return hitResults; + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } diff --git a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java -index 7fde1807640d0b02d417f48f1f6758f8ae32e04b..e0a7b3ea08fb134f07722b526bbabfdd3cf7f7e8 100644 +index 7fde1807640d0b02d417f48f1f6758f8ae32e04b..2dbfc8c89b4b95982fdd39b1bfaaa423161dd162 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ShulkerBullet.java @@ -243,10 +243,14 @@ public class ShulkerBullet extends Projectile { @@ -341,19 +307,19 @@ index 7fde1807640d0b02d417f48f1f6758f8ae32e04b..e0a7b3ea08fb134f07722b526bbabfdd - - if (movingobjectposition.getType() != HitResult.Type.MISS) { - this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + for (HitResult movingobjectposition : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity)) { + if (movingobjectposition.getType() != HitResult.Type.MISS) { -+ org.bukkit.event.entity.ProjectileHitEvent event = this.preHitTargetOrDeflectSelf(movingobjectposition).getSecond(); // CraftBukkit - projectile hit event -+ if (event == null || !event.isCancelled()) ++ this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event ++ if (!hitCancelled) + break; + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } } diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java -index bf4c1883a1257af89428d6580a177f3af3759ee7..3463dd675200036c4779e1f63fa796503c5c28b3 100644 +index bf4c1883a1257af89428d6580a177f3af3759ee7..0cad25bdc0efa8641e6a699d72608511e79a7786 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java @@ -43,10 +43,15 @@ public abstract class ThrowableProjectile extends Projectile { @@ -364,14 +330,14 @@ index bf4c1883a1257af89428d6580a177f3af3759ee7..3463dd675200036c4779e1f63fa79650 - if (movingobjectposition.getType() != HitResult.Type.MISS) { - this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event -+ // Paper start - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper start - Fix ProjectileHitEvent not called for multiple HitResults + for (HitResult hitResult : ProjectileUtil.getHitResultsOnMoveVector(this, this::canHitEntity)) { + if (hitResult.getType() != HitResult.Type.MISS) { -+ org.bukkit.event.entity.ProjectileHitEvent event = this.preHitTargetOrDeflectSelf(hitResult).getSecond(); // CraftBukkit - projectile hit event -+ if (event == null || !event.isCancelled()) ++ this.preHitTargetOrDeflectSelf(hitResult); // CraftBukkit - projectile hit event ++ if (!this.hitCancelled) + break; + } -+ // Paper end - Fix ProjectileHitEvent not calling for multiple entities ++ // Paper end - Fix ProjectileHitEvent not called for multiple HitResults } this.checkInsideBlocks();