public boolean descendLevel() {
final WorldVector pos = getBlockIn();
final int x = pos.getBlockX();
int y = Math.max(0, pos.getBlockY() - 1);
final int z = pos.getBlockZ();
final World world = pos.getWorld();
byte free = 0;
while (y >= 1) {
if (BlockType.canPassThrough(world.getBlock(new Vector(x, y, z)))) {
++free;
} else {
free = 0;
}
if (free == 2) {
// So we've found a spot, but we have to drop the player
// lightly and also check to see if there's something to
// stand upon
while (y >= 0) {
final Vector platform = new Vector(x, y, z);
final BaseBlock block = world.getBlock(platform);
final int type = block.getId();
// Don't want to end up in lava
if (type != BlockID.AIR && type != BlockID.LAVA && type != BlockID.STATIONARY_LAVA) {
// Found a block!