mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 11:38:29 +01:00
Fixed VehicleBlockCollisionEvent returning the wrong block. Fixes BUKKIT-396
This commit is contained in:
parent
497a0e247b
commit
0a52fd372a
@ -563,7 +563,7 @@ public abstract class Entity {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if ((this.positionChanged) && (this.getBukkitEntity() instanceof Vehicle)) {
|
if ((this.positionChanged) && (this.getBukkitEntity() instanceof Vehicle)) {
|
||||||
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
Vehicle vehicle = (Vehicle) this.getBukkitEntity();
|
||||||
org.bukkit.block.Block block = this.world.getWorld().getBlockAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY - 0.20000000298023224D - (double) this.height), MathHelper.floor(this.locZ));
|
org.bukkit.block.Block block = this.world.getWorld().getBlockAt(MathHelper.floor(this.locX), MathHelper.floor(this.locY - (double) this.height), MathHelper.floor(this.locZ));
|
||||||
|
|
||||||
if (d5 > d0) {
|
if (d5 > d0) {
|
||||||
block = block.getRelative(BlockFace.SOUTH);
|
block = block.getRelative(BlockFace.SOUTH);
|
||||||
|
Loading…
Reference in New Issue
Block a user