forked from RavinMaddHatter/Structura
-
Notifications
You must be signed in to change notification settings - Fork 0
/
speed_test.py
30 lines (22 loc) · 858 Bytes
/
speed_test.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
import structura_core
import os
structura_core.debug=True
files_to_conver={
"":{"file":"test_structures/BigHatter/1.mcstructure",
"offset":[-32,0,-32]}}
if os.path.exists("tmp/speed.mcpack"):
os.remove("tmp/speed.mcpack")
if os.path.exists("tmp/speed Nametags.txt"):
os.remove("tmp/speed Nametags.txt")
structura_base=structura_core.structura("tmp/speed")
structura_base.set_opacity(20)
for name_tag, info in files_to_conver.items():
print(f'{name_tag}, {info}')
structura_base.add_model(name_tag,info["file"])
structura_base.set_model_offset(name_tag,info["offset"])
structura_base.generate_nametag_file()
structura_base.generate_with_nametags()
structura_base.compile_pack()
print(structura_base.timers["total"])
for key, value in structura_base.timers.items():
print(f"{key}-{value}")