Round up Y position when standing on half blocks. This should address some safelogin bugs.

This commit is contained in:
KHobbits 2013-10-20 02:25:11 +01:00
parent 049577c97e
commit b1d422ba8f

View file

@ -325,7 +325,7 @@ public class LocationUtil
{ {
final World world = loc.getWorld(); final World world = loc.getWorld();
final int x = loc.getBlockX(); final int x = loc.getBlockX();
int y = loc.getBlockY(); int y = (int)Math.round(loc.getY());
final int z = loc.getBlockZ(); final int z = loc.getBlockZ();
while (LocationUtil.isBlockUnsafe(world, x, y, z) && y > -1) while (LocationUtil.isBlockUnsafe(world, x, y, z) && y > -1)
{ {