mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 04:55:47 +01: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();
|
+ 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));
|
+ 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);
|
+ bl = bl.getRelative(BlockFace.EAST);
|
||||||
+ } else if (d6 < d0) {
|
+ } else if (d7 < d0) {
|
||||||
+ bl = bl.getRelative(BlockFace.WEST);
|
+ bl = bl.getRelative(BlockFace.WEST);
|
||||||
+ } else if (d8 > d2) {
|
+ } else if (d9 > d2) {
|
||||||
+ bl = bl.getRelative(BlockFace.SOUTH);
|
+ bl = bl.getRelative(BlockFace.SOUTH);
|
||||||
+ } else if (d8 < d2) {
|
+ } else if (d9 < d2) {
|
||||||
+ bl = bl.getRelative(BlockFace.NORTH);
|
+ bl = bl.getRelative(BlockFace.NORTH);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
Loading…
Reference in New Issue
Block a user