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
|
2024-01-23 12:06:27 +01:00
|
|
|
index 085471073643d851e3b08e2282ab37a64ebd732d..9c998f4a9c73a807930e5b106d2ff6cc2d6afe77 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
|
2024-01-23 12:06:27 +01:00
|
|
|
@@ -1092,7 +1092,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
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);
|
|
|
|
}
|
|
|
|
}
|