3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00

SPIGOT-3258: VehicleBlockCollisionEvent only fires in certain directions

Dieser Commit ist enthalten in:
md_5 2017-05-21 10:24:47 +10:00
Ursprung cda27c992d
Commit 24147056e0

Datei anzeigen

@ -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);
+ } + }
+ +