-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTools.py
53 lines (46 loc) · 1.15 KB
/
Tools.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
import sys
from tools import addItme, addBlock, outJson, mathParticles, pack
tip = '''1.新增物品
2.新增方块
3.生成粒子特效
4.生成MCMOD可导入的JSON
5.导出数据包
0.退出\n'''
argv = sys.argv
def dowhile():
while True:
choose = input(tip)
if choose == '0':
exit()
elif choose == '1':
addItme.addItem()
elif choose == '2':
addBlock.addblock()
elif choose == '3':
mathParticles.mathParticles()
elif choose == '4':
outJson.outJson()
elif choose == '5':
pack.pack()
else:
pass
if __name__ == '__main__':
try:
get = argv[1]
if get == 'pack':
if len(argv) == 3:
pack.pack(argv[2])
else:
pack.pack()
elif get == 'additem':
addItme.addItem()
elif get == 'addblock':
addBlock.addblock()
elif get == 'outjson':
outJson.outJson()
elif get == 'mathparticles':
mathParticles.mathParticles()
else:
dowhile()
except:
dowhile()