#776: Add ability to cancel ProjectileHitEvent

By: Martoph <sager1018@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2021-05-09 16:51:44 +10:00
parent 9d5bc88891
commit 3df6aee27f
9 changed files with 101 additions and 9 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/entity/projectile/EntityLlamaSpit.java
+++ b/net/minecraft/world/entity/projectile/EntityLlamaSpit.java
@@ -34,7 +34,7 @@
MovingObjectPosition movingobjectposition = ProjectileHelper.a((Entity) this, this::a);
if (movingobjectposition != null) {
- this.a(movingobjectposition);
+ this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
}
double d0 = this.locX() + vec3d.x;