2022-12-27 23:56:19 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: SoSeDiK <mrsosedik@gmail.com>
|
|
|
|
Date: Tue, 11 Oct 2022 23:30:32 +0300
|
|
|
|
Subject: [PATCH] Expose pre-collision moving velocity to
|
|
|
|
VehicleBlockCollisionEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
2023-07-04 10:22:56 +02:00
|
|
|
index 11b413e85ad23fa555392c0dcb639e7b90ae6526..e70e6f82321ac0c6c8ac1f7d9144e1e9495bf5ae 100644
|
2022-12-27 23:56:19 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
2023-06-09 01:21:20 +02:00
|
|
|
@@ -1156,7 +1156,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
2022-12-27 23:56:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!bl.getType().isAir()) {
|
|
|
|
- VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
|
|
|
|
+ VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl, org.bukkit.craftbukkit.util.CraftVector.toBukkit(moveVector)); // Paper - Expose pre-collision velocity
|
|
|
|
this.level.getCraftServer().getPluginManager().callEvent(event);
|
|
|
|
}
|
|
|
|
}
|