minecraft-datapack-language 16.0.18__tar.gz → 16.0.20__tar.gz

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.
Files changed (397) hide show
  1. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/PKG-INFO +1 -1
  2. minecraft_datapack_language-16.0.20/docs/_data/version.yml +3 -0
  3. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/examples.md +101 -0
  4. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/language-reference.md +32 -1
  5. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/_version.py +3 -3
  6. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/cli.py +2 -35
  7. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/mdl_compiler.py +142 -11
  8. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/mdl_parser.py +2 -2
  9. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language.egg-info/PKG-INFO +1 -1
  10. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language.egg-info/SOURCES.txt +1 -0
  11. minecraft_datapack_language-16.0.20/tests/test_arithmetic_codegen.py +80 -0
  12. minecraft_datapack_language-16.0.18/docs/_data/version.yml +0 -3
  13. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.cursor/rules/aispec.mdc +0 -0
  14. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.github/actions/mdl-compile/action.yml +0 -0
  15. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.github/workflows/ci.yml +0 -0
  16. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.github/workflows/docs.yml +0 -0
  17. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.github/workflows/pypi.yml +0 -0
  18. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.github/workflows/release.yml +0 -0
  19. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.github/workflows/update-website-version.yml +0 -0
  20. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.gitignore +0 -0
  21. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/minecraft/tags/function/load.json +0 -0
  22. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/load.mcfunction +0 -0
  23. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/load1.mcfunction +0 -0
  24. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/main.mcfunction +0 -0
  25. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/main__else_1.mcfunction +0 -0
  26. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/main__if_1.mcfunction +0 -0
  27. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/testfunc.mcfunction +0 -0
  28. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/data/test1/function/testfunc__while_1.mcfunction +0 -0
  29. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1/pack.mcmeta +0 -0
  30. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/minecraft/tags/function/load.json +0 -0
  31. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/load.mcfunction +0 -0
  32. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/load1.mcfunction +0 -0
  33. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/main.mcfunction +0 -0
  34. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/main__else_1.mcfunction +0 -0
  35. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/main__if_1.mcfunction +0 -0
  36. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/testfunc.mcfunction +0 -0
  37. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/data/test1/function/testfunc__while_1.mcfunction +0 -0
  38. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.mdl-out-test1-confirm/pack.mcmeta +0 -0
  39. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.tmp_compile_bwe.py +0 -0
  40. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.tmp_compile_bwe2.py +0 -0
  41. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.tmp_compile_bwe3.py +0 -0
  42. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/.tmp_verify_loops.py +0 -0
  43. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/LICENSE +0 -0
  44. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/Makefile +0 -0
  45. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/README.md +0 -0
  46. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/advancements/diamond_sword.json +0 -0
  47. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/advancements/first_spell.json +0 -0
  48. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/advancements/other_advancement.json +0 -0
  49. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/advancements/test_advancement.json +0 -0
  50. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/comprehensive_error_test.mdl +0 -0
  51. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/complex_scopes/function/main_else_8.mcfunction +0 -0
  52. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/complex_scopes/function/main_if_8.mcfunction +0 -0
  53. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_basic_if_if_2.mcfunction +0 -0
  54. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_basic_if_if_3.mcfunction +0 -0
  55. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_basic_if_if_4.mcfunction +0 -0
  56. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_complex_if_if_2.mcfunction +0 -0
  57. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_complex_if_if_3.mcfunction +0 -0
  58. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_complex_if_if_4.mcfunction +0 -0
  59. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_complex_if_if_5.mcfunction +0 -0
  60. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_complex_expressions_if_2.mcfunction +0 -0
  61. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_complex_expressions_if_4.mcfunction +0 -0
  62. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_variable_substitution_if_2.mcfunction +0 -0
  63. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_with_raw_if_2.mcfunction +0 -0
  64. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_with_scopes_if_5.mcfunction +0 -0
  65. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_with_tellraw_else_2.mcfunction +0 -0
  66. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_with_tellraw_if_2.mcfunction +0 -0
  67. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_control_with_tellraw_if_4.mcfunction +0 -0
  68. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_if_else_else_2.mcfunction +0 -0
  69. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_if_else_else_3.mcfunction +0 -0
  70. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_if_else_else_4.mcfunction +0 -0
  71. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_if_else_if_2.mcfunction +0 -0
  72. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_if_else_if_3.mcfunction +0 -0
  73. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_if_else_if_4.mcfunction +0 -0
  74. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_else_2.mcfunction +0 -0
  75. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_else_3.mcfunction +0 -0
  76. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_else_3_else_0.mcfunction +0 -0
  77. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_else_3_if_0.mcfunction +0 -0
  78. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_2.mcfunction +0 -0
  79. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_2_else_0.mcfunction +0 -0
  80. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_2_if_0.mcfunction +0 -0
  81. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_2_if_0_else_0.mcfunction +0 -0
  82. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_2_if_0_if_0.mcfunction +0 -0
  83. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_3.mcfunction +0 -0
  84. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_3_else_0.mcfunction +0 -0
  85. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/comprehensive_control_test/function/test_nested_if_if_3_if_0.mcfunction +0 -0
  86. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/control_test/function/main_if_0.mcfunction +0 -0
  87. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/control_test/function/main_while_1.mcfunction +0 -0
  88. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/control_test/function/main_while_body_1.mcfunction +0 -0
  89. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/if_test/function/main_else_1.mcfunction +0 -0
  90. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/if_test/function/main_if_1.mcfunction +0 -0
  91. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/conditional_demo_else_3.mcfunction +0 -0
  92. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/conditional_demo_if_3.mcfunction +0 -0
  93. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/conditional_demo_if_3_else_0.mcfunction +0 -0
  94. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/conditional_demo_if_3_if_0.mcfunction +0 -0
  95. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/conditional_demo_if_3_if_0_else_0.mcfunction +0 -0
  96. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/conditional_demo_if_3_if_0_if_0.mcfunction +0 -0
  97. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/countdown_while_1.mcfunction +0 -0
  98. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/countdown_while_body_1.mcfunction +0 -0
  99. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/increase_tick_per_player_if_1.mcfunction +0 -0
  100. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/increase_tick_per_player_if_1_if_0.mcfunction +0 -0
  101. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/loop_demo_while_2.mcfunction +0 -0
  102. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/loop_demo_while_body_2.mcfunction +0 -0
  103. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/loop_demo_while_body_2_else_0.mcfunction +0 -0
  104. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/loop_demo_while_body_2_if_0.mcfunction +0 -0
  105. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/loop_demo_while_body_2_if_2.mcfunction +0 -0
  106. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_else_0.mcfunction +0 -0
  107. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_else_1.mcfunction +0 -0
  108. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_else_5.mcfunction +0 -0
  109. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_if_0.mcfunction +0 -0
  110. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_if_1.mcfunction +0 -0
  111. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_if_5.mcfunction +0 -0
  112. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_0.mcfunction +0 -0
  113. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_1.mcfunction +0 -0
  114. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_2.mcfunction +0 -0
  115. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_6.mcfunction +0 -0
  116. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_7.mcfunction +0 -0
  117. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_body_0.mcfunction +0 -0
  118. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_body_1.mcfunction +0 -0
  119. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_body_2.mcfunction +0 -0
  120. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_body_6.mcfunction +0 -0
  121. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/main_while_body_7.mcfunction +0 -0
  122. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/scoreboard_demo_while_3.mcfunction +0 -0
  123. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/scoreboard_demo_while_body_3.mcfunction +0 -0
  124. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/scoreboard_demo_while_body_3_if_1.mcfunction +0 -0
  125. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/start_game_if_1.mcfunction +0 -0
  126. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/start_game_if_5.mcfunction +0 -0
  127. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/start_game_while_4.mcfunction +0 -0
  128. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/start_game_while_body_4.mcfunction +0 -0
  129. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_if_if_1.mcfunction +0 -0
  130. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_if_if_2.mcfunction +0 -0
  131. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_if_if_3.mcfunction +0 -0
  132. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_while_while_2.mcfunction +0 -0
  133. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_while_while_4.mcfunction +0 -0
  134. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_while_while_body_2.mcfunction +0 -0
  135. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_basic_while_while_body_4.mcfunction +0 -0
  136. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_if_if_1.mcfunction +0 -0
  137. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_if_if_2.mcfunction +0 -0
  138. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_if_if_3.mcfunction +0 -0
  139. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_if_if_4.mcfunction +0 -0
  140. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_2.mcfunction +0 -0
  141. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_body_2.mcfunction +0 -0
  142. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_body_2_else_1.mcfunction +0 -0
  143. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_body_2_else_1_if_1.mcfunction +0 -0
  144. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_body_2_if_1.mcfunction +0 -0
  145. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_body_2_if_1_if_1.mcfunction +0 -0
  146. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_nested_control_while_body_2_if_2.mcfunction +0 -0
  147. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_scope_scenarios_if_1.mcfunction +0 -0
  148. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_scope_scenarios_if_2.mcfunction +0 -0
  149. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_scope_scenarios_if_3.mcfunction +0 -0
  150. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_scope_scenarios_if_4.mcfunction +0 -0
  151. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_while_while_3.mcfunction +0 -0
  152. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_while_while_6.mcfunction +0 -0
  153. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_while_while_body_3.mcfunction +0 -0
  154. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_complex_while_while_body_6.mcfunction +0 -0
  155. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_complex_expressions_if_1.mcfunction +0 -0
  156. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_complex_expressions_if_3.mcfunction +0 -0
  157. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_complex_expressions_while_2.mcfunction +0 -0
  158. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_complex_expressions_while_body_2.mcfunction +0 -0
  159. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_error_handling_if_1.mcfunction +0 -0
  160. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_error_handling_if_2.mcfunction +0 -0
  161. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_error_handling_while_3.mcfunction +0 -0
  162. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_error_handling_while_body_3.mcfunction +0 -0
  163. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_2.mcfunction +0 -0
  164. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_4.mcfunction +0 -0
  165. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_body_2.mcfunction +0 -0
  166. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_body_2_if_1.mcfunction +0 -0
  167. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_body_4.mcfunction +0 -0
  168. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_body_4_while_2.mcfunction +0 -0
  169. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_performance_while_body_4_while_body_2.mcfunction +0 -0
  170. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_scoped_functions_if_1.mcfunction +0 -0
  171. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_scoped_functions_if_3.mcfunction +0 -0
  172. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_scoped_functions_while_2.mcfunction +0 -0
  173. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_scoped_functions_while_body_2.mcfunction +0 -0
  174. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_variable_substitution_if_1.mcfunction +0 -0
  175. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_variable_substitution_if_3.mcfunction +0 -0
  176. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_variable_substitution_while_2.mcfunction +0 -0
  177. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_variable_substitution_while_body_2.mcfunction +0 -0
  178. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_assignments_if_1.mcfunction +0 -0
  179. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_assignments_if_3.mcfunction +0 -0
  180. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_assignments_while_2.mcfunction +0 -0
  181. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_assignments_while_body_2.mcfunction +0 -0
  182. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_functions_if_1.mcfunction +0 -0
  183. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_functions_if_3.mcfunction +0 -0
  184. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_functions_while_2.mcfunction +0 -0
  185. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_functions_while_body_2.mcfunction +0 -0
  186. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_raw_if_1.mcfunction +0 -0
  187. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_raw_while_2.mcfunction +0 -0
  188. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_raw_while_body_2.mcfunction +0 -0
  189. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_scopes_if_1.mcfunction +0 -0
  190. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_scopes_if_2.mcfunction +0 -0
  191. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_scopes_if_3.mcfunction +0 -0
  192. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_scopes_if_4.mcfunction +0 -0
  193. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_tellraw_else_1.mcfunction +0 -0
  194. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_tellraw_if_1.mcfunction +0 -0
  195. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_tellraw_if_3.mcfunction +0 -0
  196. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_tellraw_while_2.mcfunction +0 -0
  197. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_control_with_tellraw_while_body_2.mcfunction +0 -0
  198. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_if_else_else_1.mcfunction +0 -0
  199. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_if_else_else_2.mcfunction +0 -0
  200. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_if_else_else_3.mcfunction +0 -0
  201. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_if_else_if_1.mcfunction +0 -0
  202. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_if_else_if_2.mcfunction +0 -0
  203. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_if_else_if_3.mcfunction +0 -0
  204. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_main_while_0.mcfunction +0 -0
  205. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_main_while_body_0.mcfunction +0 -0
  206. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_else_1.mcfunction +0 -0
  207. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_else_2.mcfunction +0 -0
  208. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_else_2_else_0.mcfunction +0 -0
  209. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_else_2_if_0.mcfunction +0 -0
  210. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_1.mcfunction +0 -0
  211. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_1_else_0.mcfunction +0 -0
  212. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_1_if_0.mcfunction +0 -0
  213. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_1_if_0_else_0.mcfunction +0 -0
  214. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_1_if_0_if_0.mcfunction +0 -0
  215. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_2.mcfunction +0 -0
  216. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_2_else_0.mcfunction +0 -0
  217. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_nested_if_if_2_if_0.mcfunction +0 -0
  218. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_if_1.mcfunction +0 -0
  219. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_if_2.mcfunction +0 -0
  220. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_if_3.mcfunction +0 -0
  221. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_while_4.mcfunction +0 -0
  222. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_while_5.mcfunction +0 -0
  223. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_while_body_4.mcfunction +0 -0
  224. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_conditionals_while_body_5.mcfunction +0 -0
  225. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_interactions_if_1.mcfunction +0 -0
  226. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_interactions_if_2.mcfunction +0 -0
  227. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_scope_interactions_if_3.mcfunction +0 -0
  228. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_while_break_while_2.mcfunction +0 -0
  229. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_while_break_while_body_2.mcfunction +0 -0
  230. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_while_break_while_body_2_if_1.mcfunction +0 -0
  231. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/test_while_break_while_body_2_if_2.mcfunction +0 -0
  232. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/tick_if_1.mcfunction +0 -0
  233. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/tick_if_2.mcfunction +0 -0
  234. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/tick_if_2_while_1.mcfunction +0 -0
  235. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/tick_if_2_while_body_1.mcfunction +0 -0
  236. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/weapon_effects_else_1.mcfunction +0 -0
  237. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test/function/weapon_effects_if_1.mcfunction +0 -0
  238. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test_final_template_fixed/function/main_else_8.mcfunction +0 -0
  239. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/test_final_template_fixed/function/main_if_8.mcfunction +0 -0
  240. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/while_test/function/main_while_0.mcfunction +0 -0
  241. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/data/while_test/function/main_while_body_0.mcfunction +0 -0
  242. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/dist.zip +0 -0
  243. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/.env +0 -0
  244. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/404.html +0 -0
  245. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/Gemfile +0 -0
  246. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/README.md +0 -0
  247. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_config.yml +0 -0
  248. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/cli-reference.md +0 -0
  249. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/contributing.md +0 -0
  250. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/docs-hub.md +0 -0
  251. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/documentation.md +0 -0
  252. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/getting-started.md +0 -0
  253. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/multi-file-projects.md +0 -0
  254. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/python-bindings.md +0 -0
  255. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_docs/vscode-extension.md +0 -0
  256. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_includes/head-custom.html +0 -0
  257. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_includes/navigation.html +0 -0
  258. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_layouts/default.html +0 -0
  259. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_layouts/page.html +0 -0
  260. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_plugins/test_version.rb +0 -0
  261. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/_plugins/version_reader.rb +0 -0
  262. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/assets/css/style.css +0 -0
  263. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/docs.md +0 -0
  264. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/downloads.md +0 -0
  265. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/favicon-16.png +0 -0
  266. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/favicon-32.png +0 -0
  267. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/favicon-48.png +0 -0
  268. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/favicon-64.png +0 -0
  269. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/icon-1024.png +0 -0
  270. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/icon-128.png +0 -0
  271. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/icon-256.png +0 -0
  272. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/icon-512.png +0 -0
  273. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/icons/icon-64.png +0 -0
  274. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/docs/index.md +0 -0
  275. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/examples/hello_world.mdl +0 -0
  276. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/examples/macros_example.mdl +0 -0
  277. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/examples/scope_examples.mdl +0 -0
  278. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/examples/simple_counter.mdl +0 -0
  279. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/favicon-16.png +0 -0
  280. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/favicon-32.png +0 -0
  281. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/favicon-48.png +0 -0
  282. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/favicon-64.png +0 -0
  283. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/icon-1024.png +0 -0
  284. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/icon-128.png +0 -0
  285. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/icon-256.png +0 -0
  286. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/icon-512.png +0 -0
  287. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/icons/icon-64.png +0 -0
  288. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/item_modifiers/diamond_sword.json +0 -0
  289. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/item_modifiers/enchant_tool.json +0 -0
  290. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/item_modifiers/test_item_modifier.json +0 -0
  291. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/loot_tables/diamond_sword.json +0 -0
  292. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/loot_tables/epic_loot.json +0 -0
  293. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/loot_tables/main_loot.json +0 -0
  294. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/loot_tables/test_loot.json +0 -0
  295. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/mdllocal.sh +0 -0
  296. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/__init__.py +0 -0
  297. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/ast_nodes.py +0 -0
  298. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/dir_map.py +0 -0
  299. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/mdl_errors.py +0 -0
  300. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/mdl_lexer.py +0 -0
  301. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/mdl_linter.py +0 -0
  302. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/python_api.py +0 -0
  303. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language/utils.py +0 -0
  304. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language.egg-info/dependency_links.txt +0 -0
  305. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language.egg-info/entry_points.txt +0 -0
  306. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language.egg-info/requires.txt +0 -0
  307. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/minecraft_datapack_language.egg-info/top_level.txt +0 -0
  308. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/multi_scope_example.mdl +0 -0
  309. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/my_awesome_pack/README.md +0 -0
  310. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/my_awesome_pack/minecraft_datapack_language.mdl +0 -0
  311. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/predicates/diamond_sword.json +0 -0
  312. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/predicates/has_mana.json +0 -0
  313. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/predicates/other_predicate.json +0 -0
  314. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/predicates/test_predicate.json +0 -0
  315. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/pyproject.toml +0 -0
  316. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/pytest.ini +0 -0
  317. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/custom_pickaxe.json +0 -0
  318. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/diamond_sword.json +0 -0
  319. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/first.json +0 -0
  320. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/inlet.json +0 -0
  321. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/main_recipe.json +0 -0
  322. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/outlet.json +0 -0
  323. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/pipe.json +0 -0
  324. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/second.json +0 -0
  325. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/test_recipe.json +0 -0
  326. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/recipes/wrench.json +0 -0
  327. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scope_demo.mdl +0 -0
  328. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scoreboard_test.mdl +0 -0
  329. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/UpdateMDL.sh +0 -0
  330. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/bootstrap.ps1 +0 -0
  331. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/bootstrap.sh +0 -0
  332. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/build_pkg.ps1 +0 -0
  333. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/build_pkg.sh +0 -0
  334. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/dev_build.ps1 +0 -0
  335. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/dev_build.sh +0 -0
  336. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/dev_setup.ps1 +0 -0
  337. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/dev_setup.sh +0 -0
  338. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/git-bash/bootstrap-gitbash.sh +0 -0
  339. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/git-bash/build_pkg-gitbash.sh +0 -0
  340. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/git-bash/test_cli-gitbash.sh +0 -0
  341. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/release.sh +0 -0
  342. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/test_cli.ps1 +0 -0
  343. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/test_cli.sh +0 -0
  344. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/test_dev.ps1 +0 -0
  345. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/test_dev.sh +0 -0
  346. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/update_docs.sh +0 -0
  347. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/scripts/update_version_info.sh +0 -0
  348. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/setup.cfg +0 -0
  349. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/structures/diamond_sword.json +0 -0
  350. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/structures/test_structure.json +0 -0
  351. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/structures/workshop.json +0 -0
  352. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tellraw_variables_test.mdl +0 -0
  353. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/temp_output/data/minecraft/tags/function/load.json +0 -0
  354. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/temp_output/data/test/function/helper.mcfunction +0 -0
  355. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/temp_output/data/test/function/load.mcfunction +0 -0
  356. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/temp_output/data/test/function/main.mcfunction +0 -0
  357. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/temp_output/pack.mcmeta +0 -0
  358. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/test_all_registry.mdl +0 -0
  359. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/test_complex_scenarios.mdl +0 -0
  360. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/test_comprehensive_fixes.mdl +0 -0
  361. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/test_if_else_while.mdl +0 -0
  362. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/test_project/complex_test.mdl +0 -0
  363. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/test_simple.mdl +0 -0
  364. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/__init__.py +0 -0
  365. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/run_all_tests.py +0 -0
  366. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_cli.py +0 -0
  367. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_codegen_naming_and_logic.py +0 -0
  368. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_compiler_fixes.py +0 -0
  369. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_complex_scenarios.py +0 -0
  370. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_comprehensive_end_to_end.py +0 -0
  371. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_examples.py +0 -0
  372. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_macros.py +0 -0
  373. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_python_api.py +0 -0
  374. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_python_bindings.py +0 -0
  375. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_scheduledwhile.py +0 -0
  376. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tests/test_user_regression_test1.py +0 -0
  377. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tmp_local_cli_out.zip +0 -0
  378. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tmp_test1.mdl +0 -0
  379. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tmp_test1.mdl~ +0 -0
  380. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/tmp_test1_confirm.mdl +0 -0
  381. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/README.md +0 -0
  382. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/favicon-16.png +0 -0
  383. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/favicon-32.png +0 -0
  384. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/favicon-48.png +0 -0
  385. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/favicon-64.png +0 -0
  386. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/icon-1024.png +0 -0
  387. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/icon-128.png +0 -0
  388. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/icon-256.png +0 -0
  389. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/icons/icon-512.png +0 -0
  390. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/language-configuration.json +0 -0
  391. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/package-lock.json +0 -0
  392. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/package.json +0 -0
  393. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/snippets/mdl.json +0 -0
  394. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/src/extension.ts +0 -0
  395. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/syntaxes/mdl.tmLanguage.json +0 -0
  396. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/themes/mdl-color-theme.json +0 -0
  397. {minecraft_datapack_language-16.0.18 → minecraft_datapack_language-16.0.20}/vscode-extension/tsconfig.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: minecraft-datapack-language
3
- Version: 16.0.18
3
+ Version: 16.0.20
4
4
  Summary: Compile MDL language with explicit scoping 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
@@ -0,0 +1,3 @@
1
+ current: "16.0.19"
2
+ tag: "v16.0.19"
3
+ updated_at: "2025-09-10T05:46:41Z"
@@ -22,6 +22,107 @@ function hello:main {
22
22
  on_load hello:main;
23
23
  ```
24
24
 
25
+ ## Logical Operators and Precedence
26
+
27
+ ```mdl
28
+ pack "logicalops" "Generated by MDL CLI" 82;
29
+ namespace "logicalops";
30
+
31
+ // Variables
32
+ var num a<@s> = 0;
33
+ var num b<@s> = 0;
34
+
35
+ // Main function
36
+ function logicalops:main {
37
+ say "Hello from logicalops!";
38
+ exec logicalops:add<@a>;
39
+ }
40
+
41
+ function logicalops:init {
42
+ a<@s> = 1;
43
+ b<@s> = 2;
44
+ }
45
+
46
+ function logicalops:add {
47
+ var result<@s> = $a<@s>$ + $b<@s>$;
48
+ say "Result: $result$";
49
+ }
50
+
51
+ function logicalops:subtract {
52
+ var result<@s> = $a<@s>$ - $b<@s>$;
53
+ say "Result: $result$";
54
+ }
55
+
56
+ function logicalops:multiply {
57
+ var result<@s> = $a<@s>$ * $b<@s>$;
58
+ say "Result: $result$";
59
+ }
60
+
61
+ function logicalops:divide {
62
+ var result<@s> = $a<@s>$ / $b<@s>$;
63
+ say "Result: $result$";
64
+ }
65
+
66
+ function logicalops:andop {
67
+ if $a<@s>$ > 0 && $b<@s>$ > 0 {
68
+ say "Both are greater than 0";
69
+ } else {
70
+ say "At least one is not greater than 0";
71
+ }
72
+ }
73
+
74
+ function logicalops:orop {
75
+ if $a<@s>$ > 0 || $b<@s>$ > 0 {
76
+ say "At least one is greater than 0";
77
+ } else {
78
+ say "Both are not greater than 0";
79
+ }
80
+ }
81
+
82
+ function logicalops:notop {
83
+ if !$a<@s>$ > 0 {
84
+ say "a is not greater than 0";
85
+ } else {
86
+ say "a is greater than 0";
87
+ }
88
+ }
89
+
90
+ function logicalops:whileloop {
91
+ a<@s> = 0;
92
+ while $a<@s>$ < 10 {
93
+ say "a is less than 10";
94
+ a<@s> = $a<@s>$ + 1;
95
+ }
96
+ }
97
+
98
+ function logicalops:scheduledwhileloop {
99
+ // the scheduledwhile is just like the while loop, but it is scheduled to run every tick. This is useful for large calculations that would exceed the command recursion limit.
100
+ a<@s> = 0;
101
+ scheduledwhile $a<@s>$ < 10 {
102
+ say "a is less than 10";
103
+ a<@s> = $a<@s>$ + 1;
104
+ }
105
+ }
106
+
107
+ function logicalops:complexops {
108
+ var c<@s> = 5;
109
+ var d<@s> = 10;
110
+ var e<@s> = 15;
111
+ var f<@s> = 20;
112
+ var g<@s> = 2;
113
+ var h<@s> = 0;
114
+ h<@s> = $h<@s>$ - 1;
115
+
116
+ var result<@s> = ($c<@s>$ + $d<@s>$ - $e<@s>$ * $f<@s>$ / $g<@s>$) * $h<@s>$;
117
+
118
+ if !$result<@s>$ == 135 {
119
+ say "Result is not 135, there is an issue!";
120
+ } else {
121
+ say "Result is -135, everything is good!";
122
+ }
123
+ }
124
+ ```
125
+
25
126
  ## Counter with Scoped Variables
26
127
 
27
128
  Demonstrates variables with different scopes:
@@ -314,6 +314,11 @@ exec utils:helper; // Execute from different namesp
314
314
  < (less than)
315
315
  >= (greater than or equal)
316
316
  <= (less than or equal)
317
+
318
+ // Logical
319
+ && (logical AND)
320
+ || (logical OR)
321
+ ! (logical NOT)
317
322
  ```
318
323
 
319
324
  ### Expression Examples
@@ -324,10 +329,29 @@ player_score<@s> = $x<@a>$ + $y<@p>$ * $z<@r>$;
324
329
  // Parentheses for precedence
325
330
  player_score<@s> = ($x<@s>$ + $y<@s>$) * 2;
326
331
 
327
- // Simple comparisons (no logical operators)
332
+ // Comparisons
328
333
  if $score<@s>$ > 10 {
329
334
  exec game:reward;
330
335
  }
336
+
337
+ // Logical operators
338
+ if $a<@s>$ > 0 && $b<@s>$ > 0 {
339
+ say "Both are greater than 0";
340
+ }
341
+
342
+ if $a<@s>$ > 0 || $b<@s>$ > 0 {
343
+ say "At least one is greater than 0";
344
+ }
345
+
346
+ // NOT negates the entire comparison when used like: !$a<@s>$ > 0
347
+ if !$a<@s>$ > 0 {
348
+ say "a is not greater than 0";
349
+ }
350
+
351
+ // Complex logical expression with parentheses
352
+ if ($a<@s>$ > 0 && $b<@s>$ > 0) || $c<@s>$ > 0 {
353
+ say "Condition satisfied";
354
+ }
331
355
  ```
332
356
 
333
357
  ## Reserved Names
@@ -1224,6 +1248,13 @@ def _parse_comparison(self) -> Any:
1224
1248
  3. **Terms**: Addition, subtraction
1225
1249
  4. **Comparisons**: Greater, less, equal, not equal
1226
1250
 
1251
+ ### Logical Operators - Compilation Notes
1252
+
1253
+ - Logical expressions compile into temporary boolean scoreboard values (1 true, 0 false) checked via `execute if/unless`.
1254
+ - `&&` is compiled as a chain of `execute if` conditions; `||` sets the result true if either operand is true.
1255
+ - `!` negates the entire operand. For comparisons like `!$a<@s>$ > 0`, the comparison is evaluated first, then negated.
1256
+ - `!=` is compiled using equality with inversion (`unless score ... = ...`) because Minecraft lacks a direct not-equal comparator.
1257
+
1227
1258
  ### AST Traversal and Code Generation
1228
1259
 
1229
1260
  The AST is designed to support efficient code generation:
@@ -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 = '16.0.18'
32
- __version_tuple__ = version_tuple = (16, 0, 18)
31
+ __version__ = version = '16.0.20'
32
+ __version_tuple__ = version_tuple = (16, 0, 20)
33
33
 
34
- __commit_id__ = commit_id = 'gaeacc3d7b'
34
+ __commit_id__ = commit_id = 'g16beed4e1'
@@ -235,32 +235,14 @@ def new_command(args):
235
235
  template_content = f'''pack "{pack_name}" "Generated by MDL CLI" {pack_format};
236
236
  namespace "{project_name}";
237
237
 
238
- // Variables
239
- var num counter<@s> = 0;
240
- var num global_timer<@a> = 0;
241
-
242
- // Main function
243
238
  function {project_name}:main {{
244
239
  say "Hello from {project_name}!";
245
-
246
- // Variable example
247
- counter<@s> = 10;
248
- say "Counter: $counter<@s>$";
249
-
250
- // Conditional example
251
- if $counter<@s>$ > 5 {{
252
- say "High counter!";
253
- }} else {{
254
- say "Try again!";
255
- }}
256
240
  }}
257
241
 
258
- // Init function (avoid reserved names like 'load' or 'tick')
259
242
  function {project_name}:init {{
260
- say "Datapack initialized successfully!";
243
+ say "Datapack initialized!";
261
244
  }}
262
245
 
263
- // Hook to run on load
264
246
  on_load {project_name}:init;
265
247
  '''
266
248
 
@@ -285,24 +267,9 @@ A Minecraft datapack created with MDL (Minecraft Datapack Language).
285
267
  - Run `/reload` in-game
286
268
 
287
269
  3. **Run the main function:**
288
- ```bash
270
+ ```
289
271
  /function {project_name}:main
290
272
  ```
291
-
292
- ## Features
293
-
294
- - **Variables**: Player-scoped counter and global timer
295
- - **Control Flow**: If/else statements
296
- - **Functions**: Main function and load hook
297
- - **Automatic Execution**: Runs on datapack load
298
-
299
- ## Development
300
-
301
- - Edit `{project_name}.mdl` to modify the datapack
302
- - Use `mdl check {project_name}.mdl` to validate syntax
303
- - Use `mdl build --mdl {project_name}.mdl -o dist` to rebuild
304
-
305
- For more information, visit: https://www.mcmdl.com
306
273
  '''
307
274
 
308
275
  with open(readme_file, 'w', encoding='utf-8') as f:
@@ -12,7 +12,7 @@ from .ast_nodes import (
12
12
  Program, PackDeclaration, NamespaceDeclaration, TagDeclaration,
13
13
  VariableDeclaration, VariableAssignment, VariableSubstitution, FunctionDeclaration,
14
14
  FunctionCall, IfStatement, WhileLoop, ScheduledWhileLoop, HookDeclaration, RawBlock, MacroLine,
15
- SayCommand, BinaryExpression, LiteralExpression, ParenthesizedExpression
15
+ SayCommand, BinaryExpression, UnaryExpression, LiteralExpression, ParenthesizedExpression
16
16
  )
17
17
  from .dir_map import get_dir_map, DirMap
18
18
  from .mdl_errors import MDLCompilerError
@@ -809,6 +809,42 @@ class MDLCompiler:
809
809
  objective = self.variables.get(expression.name, expression.name)
810
810
  scope = expression.scope.strip("<>")
811
811
  return f"score {scope} {objective}"
812
+ elif isinstance(expression, UnaryExpression):
813
+ # Handle logical NOT elsewhere; here support unary minus for arithmetic
814
+ op = self._normalize_operator(expression.operator)
815
+ if op == '!':
816
+ # For values, ! is not meaningful; fallback to boolean temp
817
+ bool_var = self._compile_boolean_expression(expression)
818
+ return f"score @s {bool_var}"
819
+ if op == '-':
820
+ # If operand is a literal, constant-fold
821
+ if isinstance(expression.operand, LiteralExpression) and isinstance(expression.operand.value, (int, float)):
822
+ try:
823
+ v = float(expression.operand.value)
824
+ v = -v
825
+ if v.is_integer():
826
+ return str(int(v))
827
+ return str(v)
828
+ except Exception:
829
+ pass
830
+ # Otherwise, compute 0 - <operand>
831
+ rhs = self._expression_to_value(expression.operand)
832
+ temp_var = self._generate_temp_variable_name()
833
+ self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
834
+ if isinstance(expression.operand, VariableSubstitution) or (isinstance(rhs, str) and rhs.startswith("score ")):
835
+ parts = str(rhs).split()
836
+ if len(parts) >= 3:
837
+ scope = parts[1]
838
+ obj = parts[2]
839
+ self._store_temp_command(f"scoreboard players operation @s {temp_var} -= {scope} {obj}")
840
+ else:
841
+ self._store_temp_command(f"scoreboard players operation @s {temp_var} -= {rhs}")
842
+ else:
843
+ # rhs is a literal number string
844
+ self._store_temp_command(f"scoreboard players remove @s {temp_var} {rhs}")
845
+ return f"score @s {temp_var}"
846
+ # Fallback
847
+ return self._expression_to_value(expression.operand)
812
848
  elif isinstance(expression, BinaryExpression):
813
849
  # For complex expressions, we need to use temporary variables
814
850
  temp_var = self._generate_temp_variable_name()
@@ -898,6 +934,18 @@ class MDLCompiler:
898
934
  def unwrap(e: Any) -> Any:
899
935
  while isinstance(e, ParenthesizedExpression):
900
936
  e = e.expression
937
+ # Collapse unary minus literal for better comparisons
938
+ try:
939
+ from .ast_nodes import UnaryExpression as _UExpr, LiteralExpression as _LExpr
940
+ if isinstance(e, _UExpr) and self._normalize_operator(getattr(e, 'operator', None)) == '-' and isinstance(e.operand, _LExpr) and isinstance(e.operand.value, (int, float)):
941
+ try:
942
+ v = float(e.operand.value)
943
+ v = -v
944
+ return LiteralExpression(value=v, type="number")
945
+ except Exception:
946
+ return e
947
+ except Exception:
948
+ pass
901
949
  return e
902
950
 
903
951
  # Handle logical operators by compiling to a boolean temp scoreboard var
@@ -1089,7 +1137,8 @@ class MDLCompiler:
1089
1137
  obj = parts[2]
1090
1138
  self._store_temp_command(f"scoreboard players operation @s {temp_var} = {scope} {obj}")
1091
1139
  else:
1092
- self._store_temp_command(f"scoreboard players set @s {temp_var} {left_value}")
1140
+ lit = self._normalize_integer_literal_string(str(left_value), ctx="addition left operand")
1141
+ self._store_temp_command(f"scoreboard players set @s {temp_var} {lit}")
1093
1142
  # Add right value
1094
1143
  if isinstance(expression.right, VariableSubstitution) or (isinstance(right_value, str) and right_value.startswith("score ")):
1095
1144
  parts = str(right_value).split()
@@ -1097,7 +1146,13 @@ class MDLCompiler:
1097
1146
  obj = parts[2]
1098
1147
  self._store_temp_command(f"scoreboard players operation @s {temp_var} += {scope} {obj}")
1099
1148
  else:
1100
- self._store_temp_command(f"scoreboard players add @s {temp_var} {right_value}")
1149
+ lit = self._normalize_integer_literal_string(str(right_value), ctx="addition right operand")
1150
+ if lit == "0":
1151
+ pass
1152
+ elif lit.startswith("-"):
1153
+ self._store_temp_command(f"scoreboard players remove @s {temp_var} {lit[1:]}")
1154
+ else:
1155
+ self._store_temp_command(f"scoreboard players add @s {temp_var} {lit}")
1101
1156
 
1102
1157
  elif expression.operator == "MINUS":
1103
1158
  if isinstance(expression.left, BinaryExpression):
@@ -1109,7 +1164,8 @@ class MDLCompiler:
1109
1164
  obj = parts[2]
1110
1165
  self._store_temp_command(f"scoreboard players operation @s {temp_var} = {scope} {obj}")
1111
1166
  else:
1112
- self._store_temp_command(f"scoreboard players set @s {temp_var} {left_value}")
1167
+ lit = self._normalize_integer_literal_string(str(left_value), ctx="subtraction left operand")
1168
+ self._store_temp_command(f"scoreboard players set @s {temp_var} {lit}")
1113
1169
  # Subtract right value
1114
1170
  if isinstance(expression.right, VariableSubstitution) or (isinstance(right_value, str) and right_value.startswith("score ")):
1115
1171
  parts = str(right_value).split()
@@ -1117,7 +1173,14 @@ class MDLCompiler:
1117
1173
  obj = parts[2]
1118
1174
  self._store_temp_command(f"scoreboard players operation @s {temp_var} -= {scope} {obj}")
1119
1175
  else:
1120
- self._store_temp_command(f"scoreboard players remove @s {temp_var} {right_value}")
1176
+ lit = self._normalize_integer_literal_string(str(right_value), ctx="subtraction right operand")
1177
+ if lit == "0":
1178
+ pass
1179
+ elif lit.startswith("-"):
1180
+ # x - (-k) == x + k
1181
+ self._store_temp_command(f"scoreboard players add @s {temp_var} {lit[1:]}")
1182
+ else:
1183
+ self._store_temp_command(f"scoreboard players remove @s {temp_var} {lit}")
1121
1184
 
1122
1185
  elif expression.operator == "MULTIPLY":
1123
1186
  if isinstance(expression.left, BinaryExpression):
@@ -1137,8 +1200,13 @@ class MDLCompiler:
1137
1200
  # For literal values, keep explicit multiply command for compatibility
1138
1201
  if isinstance(expression.right, LiteralExpression):
1139
1202
  # Normalize number formatting (e.g., 2.0 -> 2)
1140
- literal_str = self._expression_to_value(expression.right)
1141
- self._store_temp_command(f"scoreboard players multiply @s {temp_var} {literal_str}")
1203
+ literal_str = self._normalize_integer_literal_string(self._expression_to_value(expression.right), ctx="multiply literal")
1204
+ if literal_str == "0":
1205
+ self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
1206
+ elif literal_str == "1":
1207
+ pass
1208
+ else:
1209
+ self._store_temp_command(f"scoreboard players multiply @s {temp_var} {literal_str}")
1142
1210
  else:
1143
1211
  # If right_value is a score reference string, strip the leading 'score '
1144
1212
  if isinstance(right_value, str) and right_value.startswith("score "):
@@ -1150,7 +1218,17 @@ class MDLCompiler:
1150
1218
  else:
1151
1219
  self._store_temp_command(f"scoreboard players operation @s {temp_var} *= {right_value}")
1152
1220
  else:
1153
- self._store_temp_command(f"scoreboard players operation @s {temp_var} *= {right_value}")
1221
+ # If RHS is a numeric literal string (incl. negatives), use multiply
1222
+ if self._is_numeric_literal_string(right_value):
1223
+ lit = self._normalize_integer_literal_string(str(right_value), ctx="multiply literal string")
1224
+ if lit == "0":
1225
+ self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
1226
+ elif lit == "1":
1227
+ pass
1228
+ else:
1229
+ self._store_temp_command(f"scoreboard players multiply @s {temp_var} {lit}")
1230
+ else:
1231
+ self._store_temp_command(f"scoreboard players operation @s {temp_var} *= {right_value}")
1154
1232
 
1155
1233
  elif expression.operator == "DIVIDE":
1156
1234
  if isinstance(expression.left, BinaryExpression):
@@ -1170,8 +1248,17 @@ class MDLCompiler:
1170
1248
  # For literal values, keep explicit divide command for compatibility
1171
1249
  if isinstance(expression.right, LiteralExpression):
1172
1250
  # Normalize number formatting (e.g., 2.0 -> 2)
1173
- literal_str = self._expression_to_value(expression.right)
1174
- self._store_temp_command(f"scoreboard players divide @s {temp_var} {literal_str}")
1251
+ lit = self._normalize_integer_literal_string(self._expression_to_value(expression.right), ctx="divide literal")
1252
+ if lit == "0":
1253
+ raise MDLCompilerError("Division by zero literal is not allowed", "Use a non-zero integer literal")
1254
+ if lit == "1":
1255
+ pass
1256
+ elif lit.startswith("-"):
1257
+ abs_lit = lit[1:]
1258
+ self._store_temp_command(f"scoreboard players divide @s {temp_var} {abs_lit}")
1259
+ self._store_temp_command(f"scoreboard players multiply @s {temp_var} -1")
1260
+ else:
1261
+ self._store_temp_command(f"scoreboard players divide @s {temp_var} {lit}")
1175
1262
  else:
1176
1263
  # If right_value is a score reference string, strip the leading 'score '
1177
1264
  if isinstance(right_value, str) and right_value.startswith("score "):
@@ -1183,7 +1270,21 @@ class MDLCompiler:
1183
1270
  else:
1184
1271
  self._store_temp_command(f"scoreboard players operation @s {temp_var} /= {right_value}")
1185
1272
  else:
1186
- self._store_temp_command(f"scoreboard players operation @s {temp_var} /= {right_value}")
1273
+ # If RHS is a numeric literal string (incl. negatives), use divide
1274
+ if self._is_numeric_literal_string(right_value):
1275
+ lit = self._normalize_integer_literal_string(str(right_value), ctx="divide literal string")
1276
+ if lit == "0":
1277
+ raise MDLCompilerError("Division by zero literal is not allowed", "Use a non-zero integer literal")
1278
+ if lit == "1":
1279
+ pass
1280
+ elif lit.startswith("-"):
1281
+ abs_lit = lit[1:]
1282
+ self._store_temp_command(f"scoreboard players divide @s {temp_var} {abs_lit}")
1283
+ self._store_temp_command(f"scoreboard players multiply @s {temp_var} -1")
1284
+ else:
1285
+ self._store_temp_command(f"scoreboard players divide @s {temp_var} {lit}")
1286
+ else:
1287
+ self._store_temp_command(f"scoreboard players operation @s {temp_var} /= {right_value}")
1187
1288
  else:
1188
1289
  # For other operators, just set the value
1189
1290
  self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
@@ -1195,6 +1296,36 @@ class MDLCompiler:
1195
1296
  else:
1196
1297
  # Fallback: do nothing, but keep behavior predictable
1197
1298
  pass
1299
+
1300
+ def _is_numeric_literal_string(self, s: Any) -> bool:
1301
+ """Return True if s is a string representing an integer literal (incl. negatives)."""
1302
+ if not isinstance(s, str):
1303
+ return False
1304
+ try:
1305
+ # Allow floats that are integer-valued like "2.0" by casting then checking is_integer
1306
+ if "." in s:
1307
+ f = float(s)
1308
+ return f.is_integer()
1309
+ int(s)
1310
+ return True
1311
+ except Exception:
1312
+ return False
1313
+
1314
+ def _normalize_integer_literal_string(self, s: str, ctx: str = "") -> str:
1315
+ """Normalize a numeric literal string to an integer string, or raise MDLCompilerError.
1316
+ Accepts negatives and floats that are mathematically integers (e.g., "2.0").
1317
+ """
1318
+ try:
1319
+ f = float(s)
1320
+ except Exception:
1321
+ raise MDLCompilerError(f"Expected integer literal, got '{s}'", f"Invalid numeric literal in {ctx}")
1322
+ if not float(f).is_integer():
1323
+ raise MDLCompilerError(f"Scoreboards are integer-only; got non-integer '{s}'", f"Use integers in {ctx}")
1324
+ n = int(f)
1325
+ # Normalize -0 to 0
1326
+ if n == 0:
1327
+ return "0"
1328
+ return str(n)
1198
1329
 
1199
1330
  def _generate_temp_variable_name(self) -> str:
1200
1331
  """Generate a unique temporary variable name."""
@@ -527,8 +527,8 @@ class MDLParser:
527
527
  return expr
528
528
 
529
529
  def _parse_unary(self) -> Any:
530
- """Parse unary expressions (logical NOT)."""
531
- if not self._is_at_end() and self._peek().type in [TokenType.NOT]:
530
+ """Parse unary expressions (logical NOT, unary minus)."""
531
+ if not self._is_at_end() and self._peek().type in [TokenType.NOT, TokenType.MINUS]:
532
532
  operator = self._peek().type
533
533
  self._advance()
534
534
  operand = self._parse_unary()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: minecraft-datapack-language
3
- Version: 16.0.18
3
+ Version: 16.0.20
4
4
  Summary: Compile MDL language with explicit scoping 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
@@ -374,6 +374,7 @@ temp_output/data/test/function/main.mcfunction
374
374
  test_project/complex_test.mdl
375
375
  tests/__init__.py
376
376
  tests/run_all_tests.py
377
+ tests/test_arithmetic_codegen.py
377
378
  tests/test_cli.py
378
379
  tests/test_codegen_naming_and_logic.py
379
380
  tests/test_compiler_fixes.py
@@ -0,0 +1,80 @@
1
+ import os
2
+ import re
3
+ import pytest
4
+ from minecraft_datapack_language.mdl_parser import MDLParser
5
+ from minecraft_datapack_language.mdl_compiler import MDLCompiler
6
+ from minecraft_datapack_language.mdl_errors import MDLCompilerError
7
+
8
+ def compile_snippet(src: str, outdir: str):
9
+ parser = MDLParser("test.mdl")
10
+ program = parser.parse(src)
11
+ compiler = MDLCompiler(output_dir=outdir)
12
+ return compiler.compile(program, source_dir=outdir)
13
+
14
+ def test_add_remove_literal(tmp_path):
15
+ src = '''
16
+ pack "p" "d" 82;
17
+ namespace "p";
18
+ function p:f {
19
+ var x<@s> = 1;
20
+ x<@s> = $x<@s>$ + 5;
21
+ x<@s> = $x<@s>$ + -3;
22
+ }
23
+ '''
24
+ out = compile_snippet(src, str(tmp_path))
25
+ # find function file under either 'functions' or 'function'
26
+ candidates = [
27
+ os.path.join(out, "data", "p", "functions", "f.mcfunction"),
28
+ os.path.join(out, "data", "p", "function", "f.mcfunction"),
29
+ ]
30
+ for fn in candidates:
31
+ if os.path.exists(fn):
32
+ break
33
+ else:
34
+ raise FileNotFoundError("f.mcfunction not found in expected directories")
35
+ text = open(fn, "r", encoding="utf-8").read()
36
+ # We compile via temps: expect add/remove on a temp variable, not directly on x
37
+ assert re.search(r"players add @s (temp_\\d+|x) 5", text) is not None
38
+ assert re.search(r"players (remove|add) @s (temp_\\d+|x) 3", text) is not None
39
+
40
+ def test_multiply_divide_literal(tmp_path):
41
+ src = '''
42
+ pack "p" "d" 82;
43
+ namespace "p";
44
+ function p:f {
45
+ var x<@s> = 2;
46
+ x<@s> = $x<@s>$ * 3;
47
+ x<@s> = $x<@s>$ * -1;
48
+ x<@s> = $x<@s>$ / 2;
49
+ }
50
+ '''
51
+ out = compile_snippet(src, str(tmp_path))
52
+ candidates = [
53
+ os.path.join(out, "data", "p", "functions", "f.mcfunction"),
54
+ os.path.join(out, "data", "p", "function", "f.mcfunction"),
55
+ ]
56
+ for fn in candidates:
57
+ if os.path.exists(fn):
58
+ break
59
+ else:
60
+ raise FileNotFoundError("f.mcfunction not found in expected directories")
61
+ text = open(fn, "r", encoding="utf-8").read()
62
+ assert re.search(r"players multiply @s (temp_\\d+|x) 3", text) is not None
63
+ assert re.search(r"players multiply @s (temp_\\d+|x) -1", text) is not None
64
+ assert re.search(r"players divide @s (temp_\\d+|x) 2", text) is not None
65
+
66
+ def test_divide_by_zero_error(tmp_path):
67
+ src = '''
68
+ pack "p" "d" 82;
69
+ namespace "p";
70
+ function p:f {
71
+ var x<@s> = 2;
72
+ x<@s> = $x<@s>$ / 0;
73
+ }
74
+ '''
75
+ with pytest.raises(MDLCompilerError) as ei:
76
+ compile_snippet(src, str(tmp_path))
77
+ msg = str(ei.value).lower()
78
+ assert ("divide" in msg) or ("division" in msg) or ("integer" in msg)
79
+
80
+
@@ -1,3 +0,0 @@
1
- current: "16.0.17"
2
- tag: "v16.0.17"
3
- updated_at: "2025-09-10T05:04:21Z"