summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-04-02 12:55:28 +1000
committermd_5 <git@md-5.net>2018-04-02 12:55:28 +1000
commit68b4fb64275baa884858f0483681e6470d4afa6c (patch)
tree9753cf05eefcc32b91ff171a153a2f303b1e6fbb /nms-patches
parent1daee53916b517727c17fb5cfe06cc3e662b9375 (diff)
downloadcraftbukkit-68b4fb64275baa884858f0483681e6470d4afa6c.tar
craftbukkit-68b4fb64275baa884858f0483681e6470d4afa6c.tar.gz
craftbukkit-68b4fb64275baa884858f0483681e6470d4afa6c.tar.lz
craftbukkit-68b4fb64275baa884858f0483681e6470d4afa6c.tar.xz
craftbukkit-68b4fb64275baa884858f0483681e6470d4afa6c.zip
SPIGOT-3882: Extra call site for VehicleEntityCollisionEvent
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityMinecartAbstract.patch17
1 files changed, 16 insertions, 1 deletions
diff --git a/nms-patches/EntityMinecartAbstract.patch b/nms-patches/EntityMinecartAbstract.patch
index cff91691..7e9aac01 100644
--- a/nms-patches/EntityMinecartAbstract.patch
+++ b/nms-patches/EntityMinecartAbstract.patch
@@ -206,7 +206,22 @@
this.motX *= 0.996999979019165D;
this.motY *= 0.0D;
this.motZ *= 0.996999979019165D;
-@@ -780,4 +873,26 @@
+@@ -618,6 +711,14 @@
+ if (!this.world.isClientSide) {
+ if (!entity.noclip && !this.noclip) {
+ if (!this.w(entity)) {
++ // CraftBukkit start
++ VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity());
++ this.world.getServer().getPluginManager().callEvent(collisionEvent);
++
++ if (collisionEvent.isCancelled()) {
++ return;
++ }
++ // CraftBukkit end
+ double d0 = entity.locX - this.locX;
+ double d1 = entity.locZ - this.locZ;
+ double d2 = d0 * d0 + d1 * d1;
+@@ -780,4 +881,26 @@
}
}