boolean validTreeLocation() {
      int[] var1 = new int[]{this.basePos[0], this.basePos[1], this.basePos[2]};
      int[] var2 = new int[]{this.basePos[0], this.basePos[1] + this.heightLimit - 1, this.basePos[2]};
      int var3 = this.worldObj.getBlockId(this.basePos[0], this.basePos[1] - 1, this.basePos[2]);
      if(var3 != 2 && var3 != 3) {
         return false;
      } else {
         int var4 = this.checkBlockLine(var1, var2);
         if(var4 == -1) {
            return true;
         } else if(var4 < 6) {
            return false;
         } else {
            this.heightLimit = var4;
            return true;
         }
      }
   }