Fixed inaccuracy with LocalPlayer.getBlockIn() and LocalPlayer.getBlockOn().

This commit is contained in:
sk89q
2011-01-08 10:52:48 -08:00
parent e8d6c0acfe
commit 2f71a32f64
2 changed files with 20 additions and 2 deletions

View File

@@ -93,6 +93,21 @@ public class WorldVector extends Vector {
return world;
}
/**
* Get a block point from a point.
*
* @param x
* @param y
* @param z
* @return point
*/
public static WorldVector toBlockPoint(LocalWorld world, double x, double y,
double z) {
return new WorldVector(world, (int)Math.floor(x),
(int)Math.floor(y),
(int)Math.floor(z));
}
/**
* Gets a BlockVector version.
*