aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0868-fixed-entity-vehicle-collision-event-not-called.patch
diff options
context:
space:
mode:
authorbooky10 <[email protected]>2023-11-04 20:20:01 +0100
committerGitHub <[email protected]>2023-11-04 20:20:01 +0100
commitf78d7ce8ffb7e4b6fd5ee256f5e3678ea04fd807 (patch)
tree8e7abee5129e15a919630824c4f194a2811f7242 /patches/server/0868-fixed-entity-vehicle-collision-event-not-called.patch
parent44057da46727138e19d951b56e98ad8c25c1f869 (diff)
downloadPaper-f78d7ce8ffb7e4b6fd5ee256f5e3678ea04fd807.tar.gz
Paper-f78d7ce8ffb7e4b6fd5ee256f5e3678ea04fd807.zip
Remove "fix-curing-zombie-villager-discount" exploit option (#9895)
Diffstat (limited to 'patches/server/0868-fixed-entity-vehicle-collision-event-not-called.patch')
-rw-r--r--patches/server/0868-fixed-entity-vehicle-collision-event-not-called.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/server/0868-fixed-entity-vehicle-collision-event-not-called.patch b/patches/server/0868-fixed-entity-vehicle-collision-event-not-called.patch
new file mode 100644
index 0000000000..ebd0cc3b2c
--- /dev/null
+++ b/patches/server/0868-fixed-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] 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 350d931f99bea1291f890d87fca6ae644c1a9fe9..44a6118d3bd67a95180f750c17967561946e2e87 100644
+--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
++++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+@@ -149,7 +149,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