Package org.spoutcraft.launcher.rest

Examples of org.spoutcraft.launcher.rest.Minecraft


    if (Launcher.getGameUpdater().getUpdateDir().exists()) {
      FileUtils.deleteDirectory(Launcher.getGameUpdater().getUpdateDir());
    }
    Launcher.getGameUpdater().getUpdateDir().mkdir();

    final Minecraft minecraft = build.getMinecraft();
    final String minecraftMD5 = minecraft.getMd5();
    final String jinputMD5 = findMd5("jinput", null, minecraft.getLibraries());
    final String lwjgl_utilMD5 = findMd5("lwjgl_util", null, minecraft.getLibraries());
    final String lwjglMD5 = findMd5("lwjgl", null, minecraft.getLibraries());

    // Process minecraft.jar
    logger.info("Minecraft Version: " + build.getMinecraft());
    File mcCache = new File(Launcher.getGameUpdater().getBinCacheDir(), "minecraft_" + minecraft.getVersion() + ".jar");
    if (!mcCache.exists() || (minecraftMD5 == null || !minecraftMD5.equals(MD5Utils.getMD5(mcCache)))) {
      if (Arrays.asList(OLD_ASSETS).contains(minecraft.getVersion())) {
        DownloadUtils.downloadFile("http://assets.minecraft.net/" + minecraft.getVersion().replaceAll("\\.", "_") + "/minecraft.jar", mcCache.getPath(), null, minecraftMD5, listener);
      } else {
        DownloadUtils.downloadFile("http://s3.amazonaws.com/Minecraft.Download/versions/" + minecraft.getVersion() + "/" + minecraft.getVersion() + ".jar", mcCache.getPath(), null, minecraftMD5, listener);
      }
    }
    Utils.copy(mcCache, new File(Launcher.getGameUpdater().getBinDir(), "minecraft.jar"));

    File nativesDir = new File(Launcher.getGameUpdater().getBinDir(), "natives");
View Full Code Here

TOP

Related Classes of org.spoutcraft.launcher.rest.Minecraft

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.