-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
liteloaderutil.py
103 lines (93 loc) · 3.44 KB
/
liteloaderutil.py
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
from metautil import *
'''
"repo":{
"stream":"RELEASE",
"type":"m2",
"url":"http:\/\/dl.liteloader.com\/repo\/",
"classifier":""
},
'''
class LiteloaderRepo(JsonObject):
stream = StringProperty(required=True)
type = StringProperty(required=True)
url = StringProperty(required=True)
classifier = StringProperty(required=True)
'''
"53639d52340479ccf206a04f5e16606f":{
"tweakClass":"com.mumfrey.liteloader.launch.LiteLoaderTweaker",
"libraries":[
{
"name":"net.minecraft:launchwrapper:1.5"
},
{
"name":"net.sf.jopt-simple:jopt-simple:4.5"
},
{
"name":"org.ow2.asm:asm-all:4.1"
}
],
"stream":"RELEASE",
"file":"liteloader-1.5.2_01.jar",
"version":"1.5.2_01",
"md5":"53639d52340479ccf206a04f5e16606f",
"timestamp":"1367366420"
},
'''
class LiteloaderArtefact(JsonObject):
tweakClass = StringProperty(required=True)
libraries = ListProperty(MultiMCLibrary, required=True)
stream = StringProperty(required=True)
file = StringProperty(required=True)
version = StringProperty(required=True)
build = StringProperty(default=None, exclude_if_none=True)
md5 = StringProperty(required=True)
timestamp = StringProperty(required=True)
srcJar = StringProperty(default=None, exclude_if_none=True)
mcpJar = StringProperty(default=None, exclude_if_none=True)
class LiteloaderDev(JsonObject):
fgVersion = StringProperty(default=None ,exclude_if_none=True)
mappings = StringProperty(required=None, exclude_if_none=True)
mcp = StringProperty(default=None, exclude_if_none=True)
class LiteloaderArtefacts(JsonObject):
liteloader = DictProperty(LiteloaderArtefact, name="com.mumfrey:liteloader", required=True)
class LiteloaderSnapshot(LiteloaderArtefact):
lastSuccessfulBuild = IntegerProperty()
class LiteloaderSnapshots(JsonObject):
libraries = ListProperty(MultiMCLibrary, required=True)
liteloader = DictProperty(LiteloaderSnapshot, name="com.mumfrey:liteloader", required=True)
'''
"1.10.2":{
"dev": { ... },
"repo":{ ... },
"artefacts":{
"com.mumfrey:liteloader":{ },
...
},
"snapshots":{
...
}
'''
class LiteloaderEntry(JsonObject):
dev = ObjectProperty(LiteloaderDev, default=None, exclude_if_none=True)
repo = ObjectProperty(LiteloaderRepo, required=True)
artefacts = ObjectProperty(LiteloaderArtefacts, default=None, exclude_if_none=True)
snapshots = ObjectProperty(LiteloaderSnapshots, default=None, exclude_if_none=True)
'''
"meta":{
"description":"LiteLoader is a lightweight mod bootstrap designed to provide basic loader functionality for mods which don't need to modify game mechanics.",
"authors":"Mumfrey",
"url":"http:\/\/dl.liteloader.com",
"updated":"2017-02-22T11:34:07+00:00",
"updatedTime":1487763247
},
'''
class LiteloaderMeta(JsonObject):
description = StringProperty(required=True)
authors = StringProperty(required=True)
url = StringProperty(required=True)
updated = ISOTimestampProperty(required=True)
updatedTime = IntegerProperty(required=True)
# The raw Forge version index
class LiteloaderIndex(JsonObject):
meta = ObjectProperty(LiteloaderMeta, required=True)
versions = DictProperty(LiteloaderEntry)