double a = robot.worldObj.rand.nextFloat() * 2.0 * Math.PI;
x = (int) (Math.cos(a) * r + Math.floor(robot.posX));
z = (int) (Math.sin(a) * r + Math.floor(robot.posZ));
} else {
BlockIndex b = zone.getRandomBlockIndex(robot.worldObj.rand);
x = b.x;
z = b.z;
}
for (int y = robot.worldObj.getHeight(); y >= 0; --y) {
if (filter.matches(robot.worldObj, x, y, z)) {
blockFound = new BlockIndex(x, y, z);
terminate();
return;
} else if (!robot.worldObj.isAirBlock(x, y, z)) {
return;
}