minecraft-datapack-language 15.1.85__py3-none-any.whl → 15.1.87__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.
@@ -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.85'
32
- __version_tuple__ = version_tuple = (15, 1, 85)
31
+ __version__ = version = '15.1.87'
32
+ __version_tuple__ = version_tuple = (15, 1, 87)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -618,20 +618,25 @@ def _process_while_loop_recursion(while_statement, namespace: str, function_name
618
618
 
619
619
  print(f"DEBUG: _process_while_loop_recursion called with namespace={namespace}, function_name={function_name}, statement_index={statement_index}")
620
620
 
621
- # Generate unique function names
621
+ # Generate unique function names - they should be the same according to the test
622
622
  loop_func_name = f"test_{function_name}_while_{statement_index}"
623
- loop_body_func_name = f"test_{function_name}_while_{statement_index}"
624
623
 
625
- print(f"DEBUG: Generated function names: loop_func_name={loop_func_name}, loop_body_func_name={loop_body_func_name}")
624
+ print(f"DEBUG: Generated function name: loop_func_name={loop_func_name}")
626
625
 
627
626
  # Process loop body
628
627
  body_commands = []
629
628
  for i, stmt in enumerate(body):
630
- body_commands.extend(_process_statement(stmt, namespace, loop_body_func_name, i, is_tag_function, selector, variable_scopes, build_context))
629
+ body_commands.extend(_process_statement(stmt, namespace, loop_func_name, i, is_tag_function, selector, variable_scopes, build_context))
631
630
 
632
631
  print(f"DEBUG: Generated body_commands: {body_commands}")
633
632
 
634
- # Write loop body function
633
+ # Add the recursive call to the loop body
634
+ minecraft_condition = _convert_condition_to_minecraft_syntax(condition, selector)
635
+ body_commands.append(f"execute if {minecraft_condition} run function {namespace}:{loop_func_name}")
636
+
637
+ print(f"DEBUG: Final body_commands with recursive call: {body_commands}")
638
+
639
+ # Write the single loop function
635
640
  if body_commands:
636
641
  # Use the output directory from build context
637
642
  if hasattr(build_context, 'output_dir'):
@@ -639,23 +644,10 @@ def _process_while_loop_recursion(while_statement, namespace: str, function_name
639
644
  else:
640
645
  func_dir = Path(f"data/{namespace}/function")
641
646
  ensure_dir(str(func_dir))
642
- print(f"DEBUG: Writing loop body function to: {func_dir / f'{loop_body_func_name}.mcfunction'}")
643
- with open(func_dir / f"{loop_body_func_name}.mcfunction", 'w', encoding='utf-8') as f:
647
+ print(f"DEBUG: Writing loop function to: {func_dir / f'{loop_func_name}.mcfunction'}")
648
+ with open(func_dir / f"{loop_func_name}.mcfunction", 'w', encoding='utf-8') as f:
644
649
  f.write('\n'.join(body_commands))
645
-
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))
650
+ print(f"DEBUG: Successfully wrote loop function file")
659
651
 
660
652
  # Return the command to start the loop with conditional execution
661
653
  return [f"execute if {minecraft_condition} run function {namespace}:{loop_func_name}"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: minecraft-datapack-language
3
- Version: 15.1.85
3
+ Version: 15.1.87
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=PqHkFAxhyrNO5Mwk8loTEBrVpQMrg61uHpyY73GGUjw,708
2
+ minecraft_datapack_language/_version.py,sha256=nC7MWWtPzEfk0A1esvu5_LzNw4_8oKQTKDDhif5tHic,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=EyY1Zeb4X-XRAR64L-S3t8nSPqrl30WbUi1scnvWXc0,42816
5
+ minecraft_datapack_language/cli_build.py,sha256=OZ_EN_OcbCzwiyreL9dicoh10IyT1Y2vV8u84sAWgps,42469
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.85.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
20
- minecraft_datapack_language-15.1.85.dist-info/METADATA,sha256=maZmQHh1y31o_gqsWH1hxnNlkR-bA72bP34B8RnPswg,35230
21
- minecraft_datapack_language-15.1.85.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
- minecraft_datapack_language-15.1.85.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
23
- minecraft_datapack_language-15.1.85.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
24
- minecraft_datapack_language-15.1.85.dist-info/RECORD,,
19
+ minecraft_datapack_language-15.1.87.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
20
+ minecraft_datapack_language-15.1.87.dist-info/METADATA,sha256=3oZb-xMSm-qR-F1GS9cqantDvqUatKWGMnl-WlNjGYk,35230
21
+ minecraft_datapack_language-15.1.87.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
22
+ minecraft_datapack_language-15.1.87.dist-info/entry_points.txt,sha256=c6vjBeCiyQflvPHBRyBk2nJCSfYt3Oc7Sc9V87ySi_U,108
23
+ minecraft_datapack_language-15.1.87.dist-info/top_level.txt,sha256=ADtFI476tbKLLxEAA-aJQAfg53MA3k_DOb0KTFiggfw,28
24
+ minecraft_datapack_language-15.1.87.dist-info/RECORD,,