diff options
Diffstat (limited to 'patches/server/0799-fix-entity-vehicle-collision-event-not-called.patch')
-rw-r--r-- | patches/server/0799-fix-entity-vehicle-collision-event-not-called.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0799-fix-entity-vehicle-collision-event-not-called.patch b/patches/server/0799-fix-entity-vehicle-collision-event-not-called.patch new file mode 100644 index 0000000000..9fe5a7cf02 --- /dev/null +++ b/patches/server/0799-fix-entity-vehicle-collision-event-not-called.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: lukas81298 <[email protected]> +Date: Tue, 12 Jan 2021 14:41:38 +0100 +Subject: [PATCH] fix entity vehicle collision event not called + + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +index 9a6b6120c248a57d9dc86ca215146f6de980bd0d..d514ec1e4cbdc579c3a61533998437903afdc8b6 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +@@ -168,7 +168,15 @@ public abstract class AbstractMinecart extends VehicleEntity { + + @Override + public boolean canCollideWith(Entity other) { +- return Boat.canVehicleCollide(this, other); ++ // Paper start - fix VehicleEntityCollisionEvent not called when colliding with player ++ boolean collides = Boat.canVehicleCollide(this, other); ++ if (!collides) { ++ return false; ++ } ++ org.bukkit.event.vehicle.VehicleEntityCollisionEvent collisionEvent = new org.bukkit.event.vehicle.VehicleEntityCollisionEvent((org.bukkit.entity.Vehicle) getBukkitEntity(), other.getBukkitEntity()); ++ ++ return collisionEvent.callEvent(); ++ // Paper end - fix VehicleEntityCollisionEvent not called when colliding with player + } + + @Override |