mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
SPIGOT-5510: VehicleBlockCollisionEvent returns the wrong block
This commit is contained in:
parent
ec4b2b5ef1
commit
752cf95e37
1 changed files with 4 additions and 4 deletions
|
@ -214,13 +214,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 (vec3d1.x > vec3d.x) {
|
||||
+ if (vec3d.x > vec3d1.x) {
|
||||
+ bl = bl.getRelative(BlockFace.EAST);
|
||||
+ } else if (vec3d.x < vec3d.x) {
|
||||
+ } else if (vec3d.x < vec3d1.x) {
|
||||
+ bl = bl.getRelative(BlockFace.WEST);
|
||||
+ } else if (vec3d1.z > vec3d.z) {
|
||||
+ } else if (vec3d.z > vec3d1.z) {
|
||||
+ bl = bl.getRelative(BlockFace.SOUTH);
|
||||
+ } else if (vec3d1.z < vec3d.z) {
|
||||
+ } else if (vec3d.z < vec3d1.z) {
|
||||
+ bl = bl.getRelative(BlockFace.NORTH);
|
||||
+ }
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue