22 lines
866 B
Python
22 lines
866 B
Python
import zipfile
|
|
|
|
base = r'e:\MCStudioDownload\work\3027246179@qq.com\Cpp\AddOn\309c2d420bc84ee986db9cdd070ff02a\_sa_hanhua_out'
|
|
jars = {
|
|
'essentials': base + r'\sa_essentials-forge-1.20.1-1.0.0.jar',
|
|
'lib': base + r'\sa_lib-forge-1.20.1-1.0.1.jar',
|
|
'decor': base + r'\sa_decor-forge-1.20.1-1.0.3.jar',
|
|
}
|
|
|
|
import json
|
|
for name, jar in jars.items():
|
|
print('='*30, name, '='*30)
|
|
with zipfile.ZipFile(jar) as z:
|
|
for n in z.namelist():
|
|
if n.startswith('assets/') and n.endswith('/lang/zh_cn.json'):
|
|
data = json.loads(z.read(n).decode('utf-8'))
|
|
print('---', n, '---')
|
|
for k, v in data.items():
|
|
if 'mod' in k or 'arsenal' in k.lower() or 'survivor' in k.lower() or 'creative' in k or 'tab' in k:
|
|
print(f' {k} = {v}')
|
|
print()
|