From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: lukas81298 Date: Tue, 12 Jan 2021 14:41:38 +0100 Subject: [PATCH] fixed 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 33dd6f9b3fde5bd19cfc6386dd9454df4a887489..ee4f924afe15c9a4d96af7a55b357076c7b28501 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java @@ -143,7 +143,15 @@ public abstract class AbstractMinecart extends Entity { @Override public boolean canCollideWith(Entity other) { - return Boat.canVehicleCollide(this, other); + // Paper start - fixed 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 } @Override