-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Mathias Boulay <[email protected]> Co-Authored-By: Maksim Belov <[email protected]>
- Loading branch information
1 parent
8f42cbc
commit 507b8ee
Showing
15 changed files
with
215 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1728465869857 | ||
1730335323711 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package pojlib.install; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import org.xml.sax.Attributes; | ||
import org.xml.sax.SAXException; | ||
import org.xml.sax.helpers.DefaultHandler; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import pojlib.APIHandler; | ||
import pojlib.util.Constants; | ||
|
||
public class ForgeMeta extends DefaultHandler { | ||
private static final APIHandler handler = new APIHandler(Constants.FORGE_META_URL); | ||
|
||
|
||
public static class ForgeVersion { | ||
@SerializedName("version") | ||
public String version; | ||
} | ||
|
||
public static ForgeVersion[] getVersions() { | ||
return handler.get("forge-versions.json", ForgeMeta.ForgeVersion[].class); | ||
} | ||
|
||
public static ForgeMeta.ForgeVersion getLatestVersion() { | ||
ForgeMeta.ForgeVersion[] versions = getVersions(); | ||
if (versions != null) return versions[0]; | ||
return null; | ||
} | ||
|
||
public static VersionInfo getVersionInfo(QuiltMeta.QuiltVersion quiltVersion, String minecraftVersion) { | ||
return handler.get(String.format("versions/loader/%s/%s/profile/json", minecraftVersion, quiltVersion.version), VersionInfo.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package pojlib.util; | ||
|
||
import java.io.File; | ||
|
||
public interface ForgeDownloadListener { | ||
void onDownloadFinished(File downloadedFile); | ||
void onDataNotAvailable(); | ||
void onDownloadError(Exception e); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.