public boolean continueExecuting()
{
if(destination == null && this.bottomOfTree == null) { // suitable destination not yet established
Point candidate = new Point();
int blockID = 0;
for(int i = 0; i < 100; ++i) {
//choose a spot 5-10m away from citizen in a random direction
// candidate.polarTranslation(Utility.rng.nextRadian(), Math.PI/2, 5 + Utility.rng.nextInt(5));
// candidate.plus(citizen.posX, citizen.posY, citizen.posZ);
Vec3 tempVec = this.lookForWorkLocation();
if ( tempVec != null ) {
candidate.x = tempVec.xCoord;
candidate.y = tempVec.yCoord;
candidate.z = tempVec.zCoord;
}
// move destination away from logging camp if necessary
if(candidate.getDistance(citizen.homeTown.xCoord, citizen.homeTown.yCoord, citizen.homeTown.zCoord) < 10){
double theta = Math.atan2(candidate.y - citizen.homeTown.yCoord, candidate.x - citizen.homeTown.xCoord);
candidate.polarTranslation(theta, Math.PI/2, 10);
}
//Utility.terrainAdjustment(citizen.worldObj, candidate);
blockID = citizen.worldObj.getBlockId((int)candidate.x, (int)candidate.y, (int)candidate.z);
if( blockID == Block.wood.blockID ) //TODO: look for a tree here with leaves.