aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0204-Add-entity-knockback-events.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0204-Add-entity-knockback-events.patch')
-rw-r--r--patches/server/0204-Add-entity-knockback-events.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0204-Add-entity-knockback-events.patch b/patches/server/0204-Add-entity-knockback-events.patch
index eb87d39471..7733d53d02 100644
--- a/patches/server/0204-Add-entity-knockback-events.patch
+++ b/patches/server/0204-Add-entity-knockback-events.patch
@@ -252,7 +252,7 @@ index 9f9b7373c9a714597858ddcd8932e31b902cf5a1..f7f26d595072372004143c4e26506ed5
public abstract void explode();
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index da9a9b235d1c8bcab3762134d69dcb112470e55d..b1e4aa81c81357e0a5b0c9759c67960a7b937892 100644
+index da9a9b235d1c8bcab3762134d69dcb112470e55d..d15f216193613504c456d63a1c358973afad3ed1 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -296,13 +296,10 @@ public class Explosion {
@@ -268,7 +268,7 @@ index da9a9b235d1c8bcab3762134d69dcb112470e55d..b1e4aa81c81357e0a5b0c9759c67960a
- vec3d1 = (event.isCancelled()) ? Vec3.ZERO : new Vec3(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ()).subtract(entity.getDeltaMovement());
+ // Paper start - knockback events
+ io.papermc.paper.event.entity.EntityKnockbackEvent event = CraftEventFactory.callEntityKnockbackEvent((org.bukkit.craftbukkit.entity.CraftLivingEntity) entity.getBukkitEntity(), this.damageSource.getEntity() != null ? this.damageSource.getEntity() : this.source, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause.EXPLOSION, d13, vec3d1);
-+ vec3d1 = org.bukkit.craftbukkit.util.CraftVector.toNMS(event.getKnockback());
++ vec3d1 = event.isCancelled() ? Vec3.ZERO : org.bukkit.craftbukkit.util.CraftVector.toNMS(event.getKnockback());
+ // Paper end - knockback events
}
// CraftBukkit end