-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMinecraftVersionModels.cs
More file actions
111 lines (86 loc) · 2.52 KB
/
MinecraftVersionModels.cs
File metadata and controls
111 lines (86 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace BMPLauncher.Core
{
// Классы для скачивания версий Minecraft
public class MinecraftVersionManifest
{
[JsonProperty("latest")]
public LatestVersions Latest { get; set; }
[JsonProperty("versions")]
public List<MCVersion> Versions { get; set; }
}
public class VersionInfo
{
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("downloads")]
public VersionDownloads Downloads { get; set; }
[JsonProperty("libraries")]
public List<Library> Libraries { get; set; }
[JsonProperty("assetIndex")]
public AssetIndex AssetIndex { get; set; }
}
public class VersionDownloads
{
[JsonProperty("client")]
public DownloadItem Client { get; set; }
[JsonProperty("server")]
public DownloadItem Server { get; set; }
}
public class Library
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("downloads")]
public LibraryDownloads Downloads { get; set; }
}
public class LibraryDownloads
{
[JsonProperty("artifact")]
public LibraryArtifact Artifact { get; set; }
}
public class LibraryArtifact
{
[JsonProperty("path")]
public string Path { get; set; }
[JsonProperty("sha1")]
public string Sha1 { get; set; }
[JsonProperty("size")]
public long Size { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class AssetIndex
{
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("sha1")]
public string Sha1 { get; set; }
[JsonProperty("size")]
public long Size { get; set; }
[JsonProperty("url")]
public string Url { get; set; }
}
public class AssetsIndex
{
[JsonProperty("objects")]
public Dictionary<string, AssetObject> Objects { get; set; }
}
public class AssetObject
{
[JsonProperty("hash")]
public string Hash { get; set; }
[JsonProperty("size")]
public long Size { get; set; }
}
public class VersionDownloadItem
{
public string Url { get; set; }
public string Path { get; set; }
public long Size { get; set; }
public string Type { get; set; }
public string Hash { get; set; }
}
}