Fixed HMPlayer.getSolidBlockTrace() and HMPlayer.getBlockTrace() returning null for the world. Changed LocalPlayer.findFreePosition() to take a WorldVector instead.

This commit is contained in:
sk89q
2011-01-09 09:25:24 -08:00
parent 03cf12fcfd
commit d997dbac2b
4 changed files with 8 additions and 7 deletions

View File

@@ -74,7 +74,8 @@ public abstract class LocalPlayer {
*
* @param searchPos search position
*/
public void findFreePosition(LocalWorld world, Vector searchPos) {
public void findFreePosition(WorldVector searchPos) {
LocalWorld world = searchPos.getWorld();
int x = searchPos.getBlockX();
int y = Math.max(0, searchPos.getBlockY());
int origY = y;
@@ -108,7 +109,7 @@ public abstract class LocalPlayer {
* that free position.
*/
public void findFreePosition() {
findFreePosition(getPosition().getWorld(), getBlockIn());
findFreePosition(getBlockIn());
}
/**