mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-3258: VehicleBlockCollisionEvent only fires in certain directions
By: md_5 <git@md-5.net>
This commit is contained in:
parent
a0b8ce2dc9
commit
31553d7ef7
1 changed files with 4 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue