Package net.feed_the_beast.launcher.json.versions

Examples of net.feed_the_beast.launcher.json.versions.Library


    public static Library loadLibrary (String libJsonObject) throws JsonSyntaxException, JsonIOException {
        return GSON.fromJson(libJsonObject, Library.class);
    }

    public static Update getUpdate (String name, String url) throws IOException {
        Library l = new Library();
        l.name = name;
        return GSON.fromJson(IOUtils.toString(new URL(url + l.getPath())), Update.class);
    }
View Full Code Here


        String fgVsn = forgeArtifact.getVersion();
        int vsn_ = Integer.parseInt(fgVsn.substring(StringUtils.lastIndexOf(fgVsn, ".") + 1));
        if (vsn_ >= Settings.getSettings().getMinJava8HackVsn() && vsn_ <= Settings.getSettings().getMaxJava8HackVsn()) {
            Logger.logDebug("adding legacyjavafixer to modpack as it is needed for this forge version to make java 8 function correctly");
            String json = "{\"url\":\"http://ftb.cursecdn.com/FTB2/maven/\",\"name\":\"net.minecraftforge.lex:legacyjavafixer:1.0\",\"checksums\":[\"a11b502bef19f49bfc199722b94da5f3d7b470a8\"]}";
            Library l = JsonFactory.loadLibrary(json);//TODO this should be pulled from the same json file
            try {//TODO we should have a method to grab a single library file to a location
                DownloadUtils.downloadToFile(installBase + "/minecraft/mods/legacyjavafixer-1.0.jar", l.getUrl() + l.getPath());
            } catch (Exception e) {
                Logger.logError("Error grabbing legacy java wrapper library", e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.feed_the_beast.launcher.json.versions.Library

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.