Skip to content

Commit 97ce7a1

Browse files
authored
Merge pull request #2 from Slackow/dev
PackScript 0.1.3
2 parents a25c168 + 3771a19 commit 97ce7a1

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

packscript.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@
66
import shutil
77
import sys
88

9-
__version__ = '0.1.2'
10-
latest_mc_version = '1.20.5'
9+
__version__ = '0.1.3'
10+
latest_mc_version = '1.20.6'
1111

1212
# # # # # # # # # # # # # # # # # # # # # #
1313
# Please set this to your username if you are modifying this script
1414
modified_by = ''
1515
# # # # # # # # # # # # # # # # # # # # # #
1616

1717

18-
def ver(base_version, /, start, end, *, pf):
18+
def ver(base_version, start, end, *, pf):
1919
return {f'{base_version}.{x}': pf for x in range(start, end + 1)}
2020

2121

2222
pack_formats = {
23-
'1.20.5': 41, '1.20.4': 26, '1.20.3': 26, '1.20.2': 18,
23+
'1.20.6': 41, '1.20.5': 41,
24+
'1.20.4': 26, '1.20.3': 26, '1.20.2': 18,
2425
'1.20.1': 15, '1.20': 15, '1.19.4': 12,
2526
** ver('1.19', 1, 3, pf=10),
2627
'1.19': 10,
@@ -299,6 +300,8 @@ def zipdir(data_path, ziph):
299300
globals = build_globals(func_stack, [], func_files, {})
300301

301302
comp_file(input, f, globals, verbose=verbose)
303+
if func_files:
304+
os.makedirs(output)
302305
for f, content in func_files.items():
303306
f = f[f.find(':') + 1:].replace('/', '_').removesuffix(f'.{FUNC_EXT}')
304307
mcfunction_path = os.path.join(output, f'{f}.mcfunction')

0 commit comments

Comments
 (0)