mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 15:08:27 +02:00
SPIGOT-3258: VehicleBlockCollisionEvent only fires in certain directions
This commit is contained in:
parent
cda27c992d
commit
24147056e0
@ -240,13 +240,13 @@
|
||||
+ Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||
+ org.bukkit.block.Block bl = this.world.getWorld().getBlockAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ));
|
||||
+
|
||||
+ if (d6 > d0) {
|
||||
+ if (d7 > d0) {
|
||||
+ bl = bl.getRelative(BlockFace.EAST);
|
||||
+ } else if (d6 < d0) {
|
||||
+ } else if (d7 < d0) {
|
||||
+ bl = bl.getRelative(BlockFace.WEST);
|
||||
+ } else if (d8 > d2) {
|
||||
+ } else if (d9 > d2) {
|
||||
+ bl = bl.getRelative(BlockFace.SOUTH);
|
||||
+ } else if (d8 < d2) {
|
||||
+ } else if (d9 < d2) {
|
||||
+ bl = bl.getRelative(BlockFace.NORTH);
|
||||
+ }
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user