minecraft-datapack-language 15.1.85__py3-none-any.whl → 15.1.86__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- minecraft_datapack_language/_version.py +2 -2
- minecraft_datapack_language/cli_build.py +7 -25
- {minecraft_datapack_language-15.1.85.dist-info → minecraft_datapack_language-15.1.86.dist-info}/METADATA +1 -1
- {minecraft_datapack_language-15.1.85.dist-info → minecraft_datapack_language-15.1.86.dist-info}/RECORD +8 -8
- {minecraft_datapack_language-15.1.85.dist-info → minecraft_datapack_language-15.1.86.dist-info}/WHEEL +0 -0
- {minecraft_datapack_language-15.1.85.dist-info → minecraft_datapack_language-15.1.86.dist-info}/entry_points.txt +0 -0
- {minecraft_datapack_language-15.1.85.dist-info → minecraft_datapack_language-15.1.86.dist-info}/licenses/LICENSE +0 -0
- {minecraft_datapack_language-15.1.85.dist-info → minecraft_datapack_language-15.1.86.dist-info}/top_level.txt +0 -0
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
28
28
|
commit_id: COMMIT_ID
|
29
29
|
__commit_id__: COMMIT_ID
|
30
30
|
|
31
|
-
__version__ = version = '15.1.
|
32
|
-
__version_tuple__ = version_tuple = (15, 1,
|
31
|
+
__version__ = version = '15.1.86'
|
32
|
+
__version_tuple__ = version_tuple = (15, 1, 86)
|
33
33
|
|
34
34
|
__commit_id__ = commit_id = None
|
@@ -616,22 +616,19 @@ def _process_while_loop_recursion(while_statement, namespace: str, function_name
|
|
616
616
|
condition = while_statement['condition']
|
617
617
|
body = while_statement['body']
|
618
618
|
|
619
|
-
|
620
|
-
|
621
|
-
# Generate unique function names
|
619
|
+
# Generate unique function names - they should be the same according to the test
|
622
620
|
loop_func_name = f"test_{function_name}_while_{statement_index}"
|
623
|
-
loop_body_func_name = f"test_{function_name}_while_{statement_index}"
|
624
|
-
|
625
|
-
print(f"DEBUG: Generated function names: loop_func_name={loop_func_name}, loop_body_func_name={loop_body_func_name}")
|
626
621
|
|
627
622
|
# Process loop body
|
628
623
|
body_commands = []
|
629
624
|
for i, stmt in enumerate(body):
|
630
|
-
body_commands.extend(_process_statement(stmt, namespace,
|
625
|
+
body_commands.extend(_process_statement(stmt, namespace, loop_func_name, i, is_tag_function, selector, variable_scopes, build_context))
|
631
626
|
|
632
|
-
|
627
|
+
# Add the recursive call to the loop body
|
628
|
+
minecraft_condition = _convert_condition_to_minecraft_syntax(condition, selector)
|
629
|
+
body_commands.append(f"execute if {minecraft_condition} run function {namespace}:{loop_func_name}")
|
633
630
|
|
634
|
-
# Write loop
|
631
|
+
# Write the single loop function
|
635
632
|
if body_commands:
|
636
633
|
# Use the output directory from build context
|
637
634
|
if hasattr(build_context, 'output_dir'):
|
@@ -639,24 +636,9 @@ def _process_while_loop_recursion(while_statement, namespace: str, function_name
|
|
639
636
|
else:
|
640
637
|
func_dir = Path(f"data/{namespace}/function")
|
641
638
|
ensure_dir(str(func_dir))
|
642
|
-
|
643
|
-
with open(func_dir / f"{loop_body_func_name}.mcfunction", 'w', encoding='utf-8') as f:
|
639
|
+
with open(func_dir / f"{loop_func_name}.mcfunction", 'w', encoding='utf-8') as f:
|
644
640
|
f.write('\n'.join(body_commands))
|
645
641
|
|
646
|
-
# Create the main loop function
|
647
|
-
minecraft_condition = _convert_condition_to_minecraft_syntax(condition, selector)
|
648
|
-
loop_commands = [
|
649
|
-
f"execute if {minecraft_condition} run function {namespace}:{loop_body_func_name}",
|
650
|
-
f"execute if {minecraft_condition} run function {namespace}:{loop_func_name}"
|
651
|
-
]
|
652
|
-
|
653
|
-
print(f"DEBUG: Generated loop_commands: {loop_commands}")
|
654
|
-
|
655
|
-
# Write loop function
|
656
|
-
print(f"DEBUG: Writing loop function to: {func_dir / f'{loop_func_name}.mcfunction'}")
|
657
|
-
with open(func_dir / f"{loop_func_name}.mcfunction", 'w', encoding='utf-8') as f:
|
658
|
-
f.write('\n'.join(loop_commands))
|
659
|
-
|
660
642
|
# Return the command to start the loop with conditional execution
|
661
643
|
return [f"execute if {minecraft_condition} run function {namespace}:{loop_func_name}"]
|
662
644
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: minecraft-datapack-language
|
3
|
-
Version: 15.1.
|
3
|
+
Version: 15.1.86
|
4
4
|
Summary: Compile JavaScript-style MDL language or Python API into a Minecraft datapack (1.21+ ready). Features variables, control flow, error handling, and VS Code extension.
|
5
5
|
Project-URL: Homepage, https://www.mcmdl.com
|
6
6
|
Project-URL: Documentation, https://www.mcmdl.com/docs
|
@@ -1,8 +1,8 @@
|
|
1
1
|
minecraft_datapack_language/__init__.py,sha256=i-qCchbe5b2Fshgc6yCU9mddOLs2UBt9SAcLqfUIrT0,606
|
2
|
-
minecraft_datapack_language/_version.py,sha256=
|
2
|
+
minecraft_datapack_language/_version.py,sha256=iSDEVwerNur_PoEmAYQuE4FYFDr6iM69MFiUBSdp8o0,708
|
3
3
|
minecraft_datapack_language/ast_nodes.py,sha256=pgjI2Nlap3ixFPgWqGSkqncG9zB91h5BKgRjtcJqMew,2118
|
4
4
|
minecraft_datapack_language/cli.py,sha256=p5A_tEEXugN2NhQFbbgfwi4FxbWYD91RWeKR_A3Vuec,6263
|
5
|
-
minecraft_datapack_language/cli_build.py,sha256=
|
5
|
+
minecraft_datapack_language/cli_build.py,sha256=UqctZgVI2jwQPpvdkp3pvLFLxiUP-vtla_TcTjJphMA,41922
|
6
6
|
minecraft_datapack_language/cli_check.py,sha256=bPq9gHsxQ1CIiftkrAtRCifWkVAyjp5c8Oay2NNQ1qs,6277
|
7
7
|
minecraft_datapack_language/cli_help.py,sha256=jUTHUQBONAZKVTdQK9tNPXq4c_6xpsafNOvHDjkEldg,12243
|
8
8
|
minecraft_datapack_language/cli_new.py,sha256=uaKH0VBC43XBt_Hztc35-BfC9bYlsDdLbAfe_42rrtI,8235
|
@@ -16,9 +16,9 @@ minecraft_datapack_language/mdl_linter.py,sha256=z85xoAglENurCh30bR7kEHZ_JeMxcYa
|
|
16
16
|
minecraft_datapack_language/mdl_parser_js.py,sha256=4VMWx6O7A10afTzjGnnwL_Sh52osIO84ObqHp8KoDZw,38677
|
17
17
|
minecraft_datapack_language/pack.py,sha256=nYiXQ3jgJlDfc4m-65f7C2LFhDRioaUU_XVy6Na4SJI,34625
|
18
18
|
minecraft_datapack_language/utils.py,sha256=Aq0HAGlXqj9BUTEjaEilpvzEW0EtZYYMMwOqG9db6dE,684
|
19
|
-
minecraft_datapack_language-15.1.
|
20
|
-
minecraft_datapack_language-15.1.
|
21
|
-
minecraft_datapack_language-15.1.
|
22
|
-
minecraft_datapack_language-15.1.
|
23
|
-
minecraft_datapack_language-15.1.
|
24
|
-
minecraft_datapack_language-15.1.
|
19
|
+
minecraft_datapack_language-15.1.86.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
20
|
+
minecraft_datapack_language-15.1.86.dist-info/METADATA,sha256=T6p4AhAXCYTKbXj0rQ4iIMhONWekJhX0K4ZPEQIfdVQ,35230
|
21
|
+
minecraft_datapack_language-15.1.86.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
22
|
+
minecraft_datapack_language-15.1.86.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
|
23
|
+
minecraft_datapack_language-15.1.86.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
|
24
|
+
minecraft_datapack_language-15.1.86.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|