protected boolean downloadModPack(String modPackName, String dir) {
      boolean debugVerbose = Settings.getSettings().getDebugLauncher();
      String debugTag = "debug: downloadModPack: ";

      Logger.logInfo("Downloading Mod Pack");
      TrackerUtils.sendPageView(
          "net/ftb/tools/ModManager.java",
          "Downloaded: " + modPackName + " v." + curVersion.replace('_', '.'));
      String dynamicLoc = OSUtils.getDynamicStorageLocation();
      String installPath = Settings.getSettings().getInstallPath();
      ModPack pack = ModPack.getSelectedPack();
      String baseLink =
          (pack.isPrivatePack()
              ? "privatepacks/" + dir + "/" + curVersion + "/"
              : "modpacks/" + dir + "/" + curVersion + "/");
      File baseDynamic = new File(dynamicLoc, "ModPacks" + sep + dir + sep);
      if (debugVerbose) {
        Logger.logInfo(debugTag + "pack dir: " + dir);
        Logger.logInfo(debugTag + "dynamicLoc: " + dynamicLoc);
        Logger.logInfo(debugTag + "installPath: " + installPath);
        Logger.logInfo(debugTag + "baseLink: " + baseLink);
      }
      baseDynamic.mkdirs();
      String md5 = "";
      try {
        new File(baseDynamic, modPackName).createNewFile();
        md5 =
            downloadUrl(
                baseDynamic.getPath() + sep + modPackName,
                DownloadUtils.getCreeperhostLink(baseLink + modPackName));
      } catch (NoSuchAlgorithmException e) {
        e.printStackTrace();
      } catch (IOException e) {
        e.printStackTrace();
      }
      String animation = pack.getAnimation();
      if (!animation.equalsIgnoreCase("empty")) {
        try {
          downloadUrl(
              baseDynamic.getPath() + sep + animation,
              DownloadUtils.getCreeperhostLink(baseLink + animation));
        } catch (NoSuchAlgorithmException e) {
          e.printStackTrace();
        }
      }
      try {
        if ((md5 == null || md5.isEmpty())
            ? DownloadUtils.backupIsValid(
                new File(baseDynamic, modPackName), baseLink + modPackName)
            : DownloadUtils.isValid(new File(baseDynamic, modPackName), md5)) {
          if (debugVerbose) {
            Logger.logInfo(debugTag + "Extracting pack.");
          }
          FileUtils.extractZipTo(baseDynamic.getPath() + sep + modPackName, baseDynamic.getPath());
          if (debugVerbose) {
            Logger.logInfo(debugTag + "Purging mods, coremods, instMods");
          }
          clearModsFolder(pack);
          FileUtils.delete(new File(installPath, dir + "/minecraft/coremods"));
          FileUtils.delete(new File(installPath, dir + "/instMods/"));
          File version = new File(installPath, dir + sep + "version");
          BufferedWriter out = new BufferedWriter(new FileWriter(version));
          out.write(curVersion.replace("_", "."));
          out.flush();
          out.close();
          if (debugVerbose) {
            Logger.logInfo(debugTag + "Pack extracted, version tagged.");
          }
          return true;
        } else {
          ErrorUtils.tossError("Error downloading modpack!!!");
          return false;
        }
      } catch (IOException e) {
        e.printStackTrace();
      }
      return false;
    }