File tree Expand file tree Collapse file tree
src/main/java/org/mcphackers/mcp/tools/versions/json Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,28 +37,30 @@ public Asset assetFrom(JSONObject obj) {
3737 {
3838 hash = obj .getString ("hash" );
3939 size = obj .getLong ("size" );
40+ url = obj .optString ("url" , null );
4041 // reconstruct = obj.optBoolean("reconstruct");
41- compressedHash = obj .optString ("compressedHash" , null );
42- compressedSize = obj .optLong ("compressedSize" );
42+ // compressedHash = obj.optString("compressedHash", null);
43+ // compressedSize = obj.optLong("compressedSize");
4344 }
4445 };
4546 }
4647
4748 public static class Asset implements IDownload {
4849 public String hash ;
50+ public String url ;
4951 public long size ;
5052 // public boolean reconstruct;
51- public String compressedHash ;
52- public long compressedSize ;
53+ // public String compressedHash;
54+ // public long compressedSize;
5355
5456 @ Override
5557 public String downloadURL () {
56- return "https://resources.download.minecraft.net/" + downloadPath ();
58+ return url != null ? url : "https://resources.download.minecraft.net/" + downloadPath ();
5759 }
5860
5961 @ Override
6062 public long downloadSize () {
61- return compressedSize ;
63+ return size ;
6264 }
6365
6466 @ Override
You can’t perform that action at this time.
0 commit comments