diff options
author | Fabrizio La Rosa <[email protected]> | 2024-09-08 22:12:36 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-08 22:12:36 +0200 |
commit | 971a7a5511b3c656b96a9be66ec9848915eb6d3d (patch) | |
tree | 14db760bce66a267a4e0bdbb7da01a675c2bf750 /patches/server/0757-fix-entity-vehicle-collision-event-not-called.patch | |
parent | b09eaf2e8d15fea856005f6727638b753850c8d1 (diff) | |
download | Paper-971a7a5511b3c656b96a9be66ec9848915eb6d3d.tar.gz Paper-971a7a5511b3c656b96a9be66ec9848915eb6d3d.zip |
Add Decorated Pot Cracked API (#11365)
Diffstat (limited to 'patches/server/0757-fix-entity-vehicle-collision-event-not-called.patch')
-rw-r--r-- | patches/server/0757-fix-entity-vehicle-collision-event-not-called.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0757-fix-entity-vehicle-collision-event-not-called.patch b/patches/server/0757-fix-entity-vehicle-collision-event-not-called.patch new file mode 100644 index 0000000000..e39b0eaf22 --- /dev/null +++ b/patches/server/0757-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 2bd3ba073843b1680eeb81f7dede5973bb4f446d..f403fc311a974558233028663dbe14c27b27d3f9 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +@@ -165,7 +165,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 |