mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
SPIGOT-3882: Extra call site for VehicleEntityCollisionEvent
This commit is contained in:
parent
1daee53916
commit
68b4fb6427
@ -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 @@
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user