minecraft-datapack-language 16.0.19__tar.gz → 16.0.21__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.
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/PKG-INFO +1 -1
- minecraft_datapack_language-16.0.21/docs/_data/version.yml +3 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/language-reference.md +9 -1
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/_version.py +3 -3
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/mdl_compiler.py +145 -15
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language.egg-info/PKG-INFO +1 -1
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language.egg-info/SOURCES.txt +2 -0
- minecraft_datapack_language-16.0.21/tests/test_arithmetic_codegen.py +82 -0
- minecraft_datapack_language-16.0.21/tests/test_global_scope.py +66 -0
- minecraft_datapack_language-16.0.19/docs/_data/version.yml +0 -3
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.cursor/rules/aispec.mdc +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/actions/mdl-compile/action.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/workflows/ci.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/workflows/docs.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/workflows/pypi.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/workflows/release.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/workflows/update-website-version.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.gitignore +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/minecraft/tags/function/load.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/load.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/load1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/main.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/main__else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/main__if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/testfunc.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/data/test1/function/testfunc__while_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1/pack.mcmeta +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/minecraft/tags/function/load.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/load.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/load1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/main.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/main__else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/main__if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/testfunc.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/data/test1/function/testfunc__while_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.mdl-out-test1-confirm/pack.mcmeta +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_compile_bwe.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_compile_bwe2.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_compile_bwe3.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_verify_loops.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/LICENSE +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/Makefile +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/README.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/advancements/diamond_sword.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/advancements/first_spell.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/advancements/other_advancement.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/advancements/test_advancement.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/comprehensive_error_test.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/complex_scopes/function/main_else_8.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/complex_scopes/function/main_if_8.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_basic_if_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_basic_if_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_basic_if_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_complex_if_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_complex_if_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_complex_if_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_complex_if_if_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_complex_expressions_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_complex_expressions_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_variable_substitution_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_with_raw_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_with_scopes_if_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_with_tellraw_else_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_with_tellraw_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_control_with_tellraw_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_if_else_else_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_if_else_else_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_if_else_else_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_if_else_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_if_else_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_if_else_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_else_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_else_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_else_3_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_else_3_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_2_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_2_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_2_if_0_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_2_if_0_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_3_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/comprehensive_control_test/function/test_nested_if_if_3_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/control_test/function/main_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/control_test/function/main_while_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/control_test/function/main_while_body_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/if_test/function/main_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/if_test/function/main_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/conditional_demo_else_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/conditional_demo_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/conditional_demo_if_3_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/conditional_demo_if_3_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/conditional_demo_if_3_if_0_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/conditional_demo_if_3_if_0_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/countdown_while_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/countdown_while_body_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/increase_tick_per_player_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/increase_tick_per_player_if_1_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/loop_demo_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/loop_demo_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/loop_demo_while_body_2_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/loop_demo_while_body_2_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/loop_demo_while_body_2_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_else_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_if_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_6.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_7.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_body_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_body_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_body_6.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/main_while_body_7.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/scoreboard_demo_while_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/scoreboard_demo_while_body_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/scoreboard_demo_while_body_3_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/start_game_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/start_game_if_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/start_game_while_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/start_game_while_body_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_if_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_if_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_if_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_while_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_while_while_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_while_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_basic_while_while_body_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_if_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_if_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_if_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_if_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_body_2_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_body_2_else_1_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_body_2_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_body_2_if_1_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_nested_control_while_body_2_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_scope_scenarios_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_scope_scenarios_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_scope_scenarios_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_scope_scenarios_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_while_while_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_while_while_6.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_while_while_body_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_complex_while_while_body_6.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_complex_expressions_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_complex_expressions_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_complex_expressions_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_complex_expressions_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_error_handling_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_error_handling_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_error_handling_while_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_error_handling_while_body_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_body_2_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_body_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_body_4_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_performance_while_body_4_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_scoped_functions_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_scoped_functions_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_scoped_functions_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_scoped_functions_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_variable_substitution_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_variable_substitution_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_variable_substitution_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_variable_substitution_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_assignments_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_assignments_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_assignments_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_assignments_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_functions_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_functions_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_functions_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_functions_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_raw_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_raw_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_raw_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_scopes_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_scopes_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_scopes_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_scopes_if_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_tellraw_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_tellraw_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_tellraw_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_tellraw_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_control_with_tellraw_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_if_else_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_if_else_else_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_if_else_else_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_if_else_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_if_else_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_if_else_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_main_while_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_main_while_body_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_else_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_else_2_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_else_2_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_1_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_1_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_1_if_0_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_1_if_0_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_2_else_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_nested_if_if_2_if_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_while_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_while_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_while_body_4.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_conditionals_while_body_5.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_interactions_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_interactions_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_scope_interactions_if_3.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_while_break_while_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_while_break_while_body_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_while_break_while_body_2_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/test_while_break_while_body_2_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/tick_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/tick_if_2.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/tick_if_2_while_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/tick_if_2_while_body_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/weapon_effects_else_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test/function/weapon_effects_if_1.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test_final_template_fixed/function/main_else_8.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/test_final_template_fixed/function/main_if_8.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/while_test/function/main_while_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/data/while_test/function/main_while_body_0.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/dist.zip +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/.env +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/404.html +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/Gemfile +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/README.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_config.yml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/cli-reference.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/contributing.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/docs-hub.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/documentation.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/examples.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/getting-started.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/multi-file-projects.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/python-bindings.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_docs/vscode-extension.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_includes/head-custom.html +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_includes/navigation.html +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_layouts/default.html +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_layouts/page.html +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_plugins/test_version.rb +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/_plugins/version_reader.rb +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/assets/css/style.css +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/docs.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/downloads.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/favicon-16.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/favicon-32.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/favicon-48.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/favicon-64.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/icon-1024.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/icon-128.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/icon-256.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/icon-512.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/icons/icon-64.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/docs/index.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/examples/hello_world.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/examples/macros_example.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/examples/scope_examples.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/examples/simple_counter.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/favicon-16.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/favicon-32.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/favicon-48.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/favicon-64.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/icon-1024.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/icon-128.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/icon-256.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/icon-512.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/icons/icon-64.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/item_modifiers/diamond_sword.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/item_modifiers/enchant_tool.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/item_modifiers/test_item_modifier.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/loot_tables/diamond_sword.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/loot_tables/epic_loot.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/loot_tables/main_loot.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/loot_tables/test_loot.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/mdllocal.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/__init__.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/ast_nodes.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/cli.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/dir_map.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/mdl_errors.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/mdl_lexer.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/mdl_linter.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/mdl_parser.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/python_api.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language/utils.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language.egg-info/dependency_links.txt +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language.egg-info/entry_points.txt +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language.egg-info/requires.txt +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/minecraft_datapack_language.egg-info/top_level.txt +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/multi_scope_example.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/my_awesome_pack/README.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/my_awesome_pack/minecraft_datapack_language.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/predicates/diamond_sword.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/predicates/has_mana.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/predicates/other_predicate.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/predicates/test_predicate.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/pyproject.toml +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/pytest.ini +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/custom_pickaxe.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/diamond_sword.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/first.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/inlet.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/main_recipe.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/outlet.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/pipe.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/second.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/test_recipe.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/recipes/wrench.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scope_demo.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scoreboard_test.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/UpdateMDL.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/bootstrap.ps1 +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/bootstrap.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/build_pkg.ps1 +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/build_pkg.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/dev_build.ps1 +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/dev_build.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/dev_setup.ps1 +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/dev_setup.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/git-bash/bootstrap-gitbash.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/git-bash/build_pkg-gitbash.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/git-bash/test_cli-gitbash.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/release.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/test_cli.ps1 +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/test_cli.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/test_dev.ps1 +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/test_dev.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/update_docs.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/scripts/update_version_info.sh +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/setup.cfg +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/structures/diamond_sword.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/structures/test_structure.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/structures/workshop.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tellraw_variables_test.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/temp_output/data/minecraft/tags/function/load.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/temp_output/data/test/function/helper.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/temp_output/data/test/function/load.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/temp_output/data/test/function/main.mcfunction +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/temp_output/pack.mcmeta +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/test_all_registry.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/test_complex_scenarios.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/test_comprehensive_fixes.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/test_if_else_while.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/test_project/complex_test.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/test_simple.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/__init__.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/run_all_tests.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_cli.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_codegen_naming_and_logic.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_compiler_fixes.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_complex_scenarios.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_comprehensive_end_to_end.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_examples.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_macros.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_python_api.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_python_bindings.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_scheduledwhile.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tests/test_user_regression_test1.py +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tmp_local_cli_out.zip +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tmp_test1.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tmp_test1.mdl~ +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/tmp_test1_confirm.mdl +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/README.md +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/favicon-16.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/favicon-32.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/favicon-48.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/favicon-64.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/icon-1024.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/icon-128.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/icon-256.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/icons/icon-512.png +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/language-configuration.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/package-lock.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/package.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/snippets/mdl.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/src/extension.ts +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/syntaxes/mdl.tmLanguage.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/vscode-extension/themes/mdl-color-theme.json +0 -0
- {minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/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.
|
3
|
+
Version: 16.0.21
|
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
|
@@ -294,7 +294,8 @@ exec utils:helper; // Execute from different namesp
|
|
294
294
|
<@s[distance=..5]> // Current player within 5 blocks
|
295
295
|
|
296
296
|
// Global scope (special case)
|
297
|
-
<global> // Maps to @e[type=armor_stand,tag=
|
297
|
+
<global> // Maps to @e[type=armor_stand,tag=mdl_global,limit=1]
|
298
|
+
// A single invisible armor stand with tag 'mdl_global' is ensured on load
|
298
299
|
```
|
299
300
|
|
300
301
|
## Mathematical Expressions
|
@@ -1255,6 +1256,13 @@ def _parse_comparison(self) -> Any:
|
|
1255
1256
|
- `!` negates the entire operand. For comparisons like `!$a<@s>$ > 0`, the comparison is evaluated first, then negated.
|
1256
1257
|
- `!=` is compiled using equality with inversion (`unless score ... = ...`) because Minecraft lacks a direct not-equal comparator.
|
1257
1258
|
|
1259
|
+
### Integer-Only Arithmetic and Literal Handling
|
1260
|
+
|
1261
|
+
- Scoreboard arithmetic is integer-only. MDL normalizes literals: `2.0` -> `2`; non-integer literals (e.g., `2.5`) are rejected with a compiler error when used in scoreboard operations.
|
1262
|
+
- Literal addition/subtraction uses `add`/`remove` and elides `+0`/`-0`.
|
1263
|
+
- Literal multiplication/division uses `multiply`/`divide` and elides `*1`/`/1`; `*0` sets to 0; `/(-k)` becomes `/|k|` then `*-1`.
|
1264
|
+
- Mixed expressions lower via temps; operations against other scores use `operation +=, -=, *=, /=`.
|
1265
|
+
|
1258
1266
|
### AST Traversal and Code Generation
|
1259
1267
|
|
1260
1268
|
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.
|
32
|
-
__version_tuple__ = version_tuple = (16, 0,
|
31
|
+
__version__ = version = '16.0.21'
|
32
|
+
__version_tuple__ = version_tuple = (16, 0, 21)
|
33
33
|
|
34
|
-
__commit_id__ = commit_id = '
|
34
|
+
__commit_id__ = commit_id = 'g8b5718e95'
|
@@ -33,6 +33,8 @@ class MDLCompiler:
|
|
33
33
|
self.declared_variables: List[VariableDeclaration] = []
|
34
34
|
# Track any temporary scoreboard variables generated during compilation
|
35
35
|
self.temp_variables: Set[str] = set()
|
36
|
+
# Track if global scope is used anywhere
|
37
|
+
self.uses_global_scope: bool = False
|
36
38
|
|
37
39
|
def compile(self, ast: Program, source_dir: str = None) -> str:
|
38
40
|
"""Compile MDL AST into a complete Minecraft datapack."""
|
@@ -174,6 +176,10 @@ class MDLCompiler:
|
|
174
176
|
lines.append(self._ensure_macro_prefix(cmd))
|
175
177
|
# Done routing temp commands for this function body
|
176
178
|
self._temp_sink_stack.pop()
|
179
|
+
|
180
|
+
# If global scope is used anywhere in the program, prepend ensure line here too
|
181
|
+
if self.uses_global_scope:
|
182
|
+
self._insert_ensure_global(lines)
|
177
183
|
|
178
184
|
return "\n".join(lines)
|
179
185
|
|
@@ -302,6 +308,11 @@ class MDLCompiler:
|
|
302
308
|
"# Generated by MDL Compiler",
|
303
309
|
""
|
304
310
|
]
|
311
|
+
|
312
|
+
# Ensure a single global armor stand exists if global scope is used
|
313
|
+
if self.uses_global_scope:
|
314
|
+
lines.extend(self._ensure_global_lines())
|
315
|
+
lines.append("")
|
305
316
|
|
306
317
|
# Add scoreboard objective creation for variables
|
307
318
|
for var_name, objective in self.variables.items():
|
@@ -774,6 +785,9 @@ class MDLCompiler:
|
|
774
785
|
else:
|
775
786
|
functions_dir = self.output_dir / "data" / self.current_namespace / "functions"
|
776
787
|
functions_dir.mkdir(parents=True, exist_ok=True)
|
788
|
+
# Insert ensure global if needed
|
789
|
+
if self.uses_global_scope:
|
790
|
+
self._insert_ensure_global(lines)
|
777
791
|
func_file = functions_dir / f"{name}.mcfunction"
|
778
792
|
with open(func_file, 'w') as f:
|
779
793
|
f.write("\n".join(lines) + "\n")
|
@@ -789,7 +803,7 @@ class MDLCompiler:
|
|
789
803
|
|
790
804
|
base = f"function {func_call.namespace}:{func_call.name}{suffix}"
|
791
805
|
if func_call.scope:
|
792
|
-
return f"execute as {func_call.scope
|
806
|
+
return f"execute as {self._resolve_scope(func_call.scope)} run {base}"
|
793
807
|
return base
|
794
808
|
|
795
809
|
def _expression_to_value(self, expression: Any) -> str:
|
@@ -807,7 +821,7 @@ class MDLCompiler:
|
|
807
821
|
return str(expression.value)
|
808
822
|
elif isinstance(expression, VariableSubstitution):
|
809
823
|
objective = self.variables.get(expression.name, expression.name)
|
810
|
-
scope = expression.scope
|
824
|
+
scope = self._resolve_scope(expression.scope)
|
811
825
|
return f"score {scope} {objective}"
|
812
826
|
elif isinstance(expression, UnaryExpression):
|
813
827
|
# Handle logical NOT elsewhere; here support unary minus for arithmetic
|
@@ -983,7 +997,7 @@ class MDLCompiler:
|
|
983
997
|
# Variable vs literal
|
984
998
|
if op_sym and isinstance(left, VariableSubstitution) and isinstance(right, LiteralExpression) and isinstance(right.value, (int, float)):
|
985
999
|
objective = self.variables.get(left.name, left.name)
|
986
|
-
scope = left.scope
|
1000
|
+
scope = self._resolve_scope(left.scope)
|
987
1001
|
# Normalize number
|
988
1002
|
try:
|
989
1003
|
v = float(right.value)
|
@@ -1025,9 +1039,9 @@ class MDLCompiler:
|
|
1025
1039
|
# Variable vs variable
|
1026
1040
|
if op_sym and isinstance(left, VariableSubstitution) and isinstance(right, VariableSubstitution):
|
1027
1041
|
lobj = self.variables.get(left.name, left.name)
|
1028
|
-
lscope = left.scope
|
1042
|
+
lscope = self._resolve_scope(left.scope)
|
1029
1043
|
robj = self.variables.get(right.name, right.name)
|
1030
|
-
rscope = right.scope
|
1044
|
+
rscope = self._resolve_scope(right.scope)
|
1031
1045
|
if op_sym in (">", ">=", "<", "<=", "=="):
|
1032
1046
|
comp = op_sym if op_sym != "==" else "="
|
1033
1047
|
return (f"score {lscope} {lobj} {comp} {rscope} {robj}", False)
|
@@ -1057,6 +1071,39 @@ class MDLCompiler:
|
|
1057
1071
|
# Fallback: treat as generic condition string
|
1058
1072
|
return (self._expression_to_condition(expression), False)
|
1059
1073
|
|
1074
|
+
def _resolve_scope(self, scope_spec: Optional[str]) -> str:
|
1075
|
+
"""Resolve MDL scope spec to a Minecraft selector string.
|
1076
|
+
- None or missing angle brackets defaults to stripping.
|
1077
|
+
- <global> maps to the singleton mdl_global armor stand.
|
1078
|
+
"""
|
1079
|
+
if not scope_spec:
|
1080
|
+
return "@s"
|
1081
|
+
s = scope_spec.strip()
|
1082
|
+
if s == "<global>":
|
1083
|
+
self.uses_global_scope = True
|
1084
|
+
return "@e[type=armor_stand,tag=mdl_global,limit=1]"
|
1085
|
+
if s.startswith("<") and s.endswith(">"):
|
1086
|
+
return s[1:-1]
|
1087
|
+
# Fallback: already looks like a selector
|
1088
|
+
return s
|
1089
|
+
|
1090
|
+
def _ensure_global_lines(self) -> list:
|
1091
|
+
return [
|
1092
|
+
"# Ensure global armor stand exists",
|
1093
|
+
"execute unless entity @e[type=armor_stand,tag=mdl_global,limit=1] run summon armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Invisible:1b,Tags:[\"mdl_global\"]}",
|
1094
|
+
]
|
1095
|
+
|
1096
|
+
def _insert_ensure_global(self, lines: list):
|
1097
|
+
# Insert ensure lines after header/comments at top if not already present
|
1098
|
+
ensure = self._ensure_global_lines()[0]
|
1099
|
+
if any(ensure in l for l in lines):
|
1100
|
+
return
|
1101
|
+
# Insert after initial comment block
|
1102
|
+
insert_at = 0
|
1103
|
+
for i, l in enumerate(lines[:5]):
|
1104
|
+
insert_at = i + 1
|
1105
|
+
lines[insert_at:insert_at] = self._ensure_global_lines() + [""]
|
1106
|
+
|
1060
1107
|
def _compile_boolean_expression(self, expression: Any, out_var: Optional[str] = None) -> str:
|
1061
1108
|
"""Compile a logical expression into a temporary boolean scoreboard variable (1 true, 0 false).
|
1062
1109
|
Returns the objective name for the boolean temp variable.
|
@@ -1137,7 +1184,8 @@ class MDLCompiler:
|
|
1137
1184
|
obj = parts[2]
|
1138
1185
|
self._store_temp_command(f"scoreboard players operation @s {temp_var} = {scope} {obj}")
|
1139
1186
|
else:
|
1140
|
-
self.
|
1187
|
+
lit = self._normalize_integer_literal_string(str(left_value), ctx="addition left operand")
|
1188
|
+
self._store_temp_command(f"scoreboard players set @s {temp_var} {lit}")
|
1141
1189
|
# Add right value
|
1142
1190
|
if isinstance(expression.right, VariableSubstitution) or (isinstance(right_value, str) and right_value.startswith("score ")):
|
1143
1191
|
parts = str(right_value).split()
|
@@ -1145,7 +1193,13 @@ class MDLCompiler:
|
|
1145
1193
|
obj = parts[2]
|
1146
1194
|
self._store_temp_command(f"scoreboard players operation @s {temp_var} += {scope} {obj}")
|
1147
1195
|
else:
|
1148
|
-
self.
|
1196
|
+
lit = self._normalize_integer_literal_string(str(right_value), ctx="addition right operand")
|
1197
|
+
if lit == "0":
|
1198
|
+
pass
|
1199
|
+
elif lit.startswith("-"):
|
1200
|
+
self._store_temp_command(f"scoreboard players remove @s {temp_var} {lit[1:]}")
|
1201
|
+
else:
|
1202
|
+
self._store_temp_command(f"scoreboard players add @s {temp_var} {lit}")
|
1149
1203
|
|
1150
1204
|
elif expression.operator == "MINUS":
|
1151
1205
|
if isinstance(expression.left, BinaryExpression):
|
@@ -1157,7 +1211,8 @@ class MDLCompiler:
|
|
1157
1211
|
obj = parts[2]
|
1158
1212
|
self._store_temp_command(f"scoreboard players operation @s {temp_var} = {scope} {obj}")
|
1159
1213
|
else:
|
1160
|
-
self.
|
1214
|
+
lit = self._normalize_integer_literal_string(str(left_value), ctx="subtraction left operand")
|
1215
|
+
self._store_temp_command(f"scoreboard players set @s {temp_var} {lit}")
|
1161
1216
|
# Subtract right value
|
1162
1217
|
if isinstance(expression.right, VariableSubstitution) or (isinstance(right_value, str) and right_value.startswith("score ")):
|
1163
1218
|
parts = str(right_value).split()
|
@@ -1165,7 +1220,14 @@ class MDLCompiler:
|
|
1165
1220
|
obj = parts[2]
|
1166
1221
|
self._store_temp_command(f"scoreboard players operation @s {temp_var} -= {scope} {obj}")
|
1167
1222
|
else:
|
1168
|
-
self.
|
1223
|
+
lit = self._normalize_integer_literal_string(str(right_value), ctx="subtraction right operand")
|
1224
|
+
if lit == "0":
|
1225
|
+
pass
|
1226
|
+
elif lit.startswith("-"):
|
1227
|
+
# x - (-k) == x + k
|
1228
|
+
self._store_temp_command(f"scoreboard players add @s {temp_var} {lit[1:]}")
|
1229
|
+
else:
|
1230
|
+
self._store_temp_command(f"scoreboard players remove @s {temp_var} {lit}")
|
1169
1231
|
|
1170
1232
|
elif expression.operator == "MULTIPLY":
|
1171
1233
|
if isinstance(expression.left, BinaryExpression):
|
@@ -1185,8 +1247,13 @@ class MDLCompiler:
|
|
1185
1247
|
# For literal values, keep explicit multiply command for compatibility
|
1186
1248
|
if isinstance(expression.right, LiteralExpression):
|
1187
1249
|
# Normalize number formatting (e.g., 2.0 -> 2)
|
1188
|
-
literal_str = self._expression_to_value(expression.right)
|
1189
|
-
|
1250
|
+
literal_str = self._normalize_integer_literal_string(self._expression_to_value(expression.right), ctx="multiply literal")
|
1251
|
+
if literal_str == "0":
|
1252
|
+
self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
|
1253
|
+
elif literal_str == "1":
|
1254
|
+
pass
|
1255
|
+
else:
|
1256
|
+
self._store_temp_command(f"scoreboard players multiply @s {temp_var} {literal_str}")
|
1190
1257
|
else:
|
1191
1258
|
# If right_value is a score reference string, strip the leading 'score '
|
1192
1259
|
if isinstance(right_value, str) and right_value.startswith("score "):
|
@@ -1198,7 +1265,17 @@ class MDLCompiler:
|
|
1198
1265
|
else:
|
1199
1266
|
self._store_temp_command(f"scoreboard players operation @s {temp_var} *= {right_value}")
|
1200
1267
|
else:
|
1201
|
-
|
1268
|
+
# If RHS is a numeric literal string (incl. negatives), use multiply
|
1269
|
+
if self._is_numeric_literal_string(right_value):
|
1270
|
+
lit = self._normalize_integer_literal_string(str(right_value), ctx="multiply literal string")
|
1271
|
+
if lit == "0":
|
1272
|
+
self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
|
1273
|
+
elif lit == "1":
|
1274
|
+
pass
|
1275
|
+
else:
|
1276
|
+
self._store_temp_command(f"scoreboard players multiply @s {temp_var} {lit}")
|
1277
|
+
else:
|
1278
|
+
self._store_temp_command(f"scoreboard players operation @s {temp_var} *= {right_value}")
|
1202
1279
|
|
1203
1280
|
elif expression.operator == "DIVIDE":
|
1204
1281
|
if isinstance(expression.left, BinaryExpression):
|
@@ -1218,8 +1295,17 @@ class MDLCompiler:
|
|
1218
1295
|
# For literal values, keep explicit divide command for compatibility
|
1219
1296
|
if isinstance(expression.right, LiteralExpression):
|
1220
1297
|
# Normalize number formatting (e.g., 2.0 -> 2)
|
1221
|
-
|
1222
|
-
|
1298
|
+
lit = self._normalize_integer_literal_string(self._expression_to_value(expression.right), ctx="divide literal")
|
1299
|
+
if lit == "0":
|
1300
|
+
raise MDLCompilerError("Division by zero literal is not allowed", "Use a non-zero integer literal")
|
1301
|
+
if lit == "1":
|
1302
|
+
pass
|
1303
|
+
elif lit.startswith("-"):
|
1304
|
+
abs_lit = lit[1:]
|
1305
|
+
self._store_temp_command(f"scoreboard players divide @s {temp_var} {abs_lit}")
|
1306
|
+
self._store_temp_command(f"scoreboard players multiply @s {temp_var} -1")
|
1307
|
+
else:
|
1308
|
+
self._store_temp_command(f"scoreboard players divide @s {temp_var} {lit}")
|
1223
1309
|
else:
|
1224
1310
|
# If right_value is a score reference string, strip the leading 'score '
|
1225
1311
|
if isinstance(right_value, str) and right_value.startswith("score "):
|
@@ -1231,7 +1317,21 @@ class MDLCompiler:
|
|
1231
1317
|
else:
|
1232
1318
|
self._store_temp_command(f"scoreboard players operation @s {temp_var} /= {right_value}")
|
1233
1319
|
else:
|
1234
|
-
|
1320
|
+
# If RHS is a numeric literal string (incl. negatives), use divide
|
1321
|
+
if self._is_numeric_literal_string(right_value):
|
1322
|
+
lit = self._normalize_integer_literal_string(str(right_value), ctx="divide literal string")
|
1323
|
+
if lit == "0":
|
1324
|
+
raise MDLCompilerError("Division by zero literal is not allowed", "Use a non-zero integer literal")
|
1325
|
+
if lit == "1":
|
1326
|
+
pass
|
1327
|
+
elif lit.startswith("-"):
|
1328
|
+
abs_lit = lit[1:]
|
1329
|
+
self._store_temp_command(f"scoreboard players divide @s {temp_var} {abs_lit}")
|
1330
|
+
self._store_temp_command(f"scoreboard players multiply @s {temp_var} -1")
|
1331
|
+
else:
|
1332
|
+
self._store_temp_command(f"scoreboard players divide @s {temp_var} {lit}")
|
1333
|
+
else:
|
1334
|
+
self._store_temp_command(f"scoreboard players operation @s {temp_var} /= {right_value}")
|
1235
1335
|
else:
|
1236
1336
|
# For other operators, just set the value
|
1237
1337
|
self._store_temp_command(f"scoreboard players set @s {temp_var} 0")
|
@@ -1243,6 +1343,36 @@ class MDLCompiler:
|
|
1243
1343
|
else:
|
1244
1344
|
# Fallback: do nothing, but keep behavior predictable
|
1245
1345
|
pass
|
1346
|
+
|
1347
|
+
def _is_numeric_literal_string(self, s: Any) -> bool:
|
1348
|
+
"""Return True if s is a string representing an integer literal (incl. negatives)."""
|
1349
|
+
if not isinstance(s, str):
|
1350
|
+
return False
|
1351
|
+
try:
|
1352
|
+
# Allow floats that are integer-valued like "2.0" by casting then checking is_integer
|
1353
|
+
if "." in s:
|
1354
|
+
f = float(s)
|
1355
|
+
return f.is_integer()
|
1356
|
+
int(s)
|
1357
|
+
return True
|
1358
|
+
except Exception:
|
1359
|
+
return False
|
1360
|
+
|
1361
|
+
def _normalize_integer_literal_string(self, s: str, ctx: str = "") -> str:
|
1362
|
+
"""Normalize a numeric literal string to an integer string, or raise MDLCompilerError.
|
1363
|
+
Accepts negatives and floats that are mathematically integers (e.g., "2.0").
|
1364
|
+
"""
|
1365
|
+
try:
|
1366
|
+
f = float(s)
|
1367
|
+
except Exception:
|
1368
|
+
raise MDLCompilerError(f"Expected integer literal, got '{s}'", f"Invalid numeric literal in {ctx}")
|
1369
|
+
if not float(f).is_integer():
|
1370
|
+
raise MDLCompilerError(f"Scoreboards are integer-only; got non-integer '{s}'", f"Use integers in {ctx}")
|
1371
|
+
n = int(f)
|
1372
|
+
# Normalize -0 to 0
|
1373
|
+
if n == 0:
|
1374
|
+
return "0"
|
1375
|
+
return str(n)
|
1246
1376
|
|
1247
1377
|
def _generate_temp_variable_name(self) -> str:
|
1248
1378
|
"""Generate a unique temporary variable name."""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: minecraft-datapack-language
|
3
|
-
Version: 16.0.
|
3
|
+
Version: 16.0.21
|
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,12 +374,14 @@ 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
|
380
381
|
tests/test_complex_scenarios.py
|
381
382
|
tests/test_comprehensive_end_to_end.py
|
382
383
|
tests/test_examples.py
|
384
|
+
tests/test_global_scope.py
|
383
385
|
tests/test_macros.py
|
384
386
|
tests/test_python_api.py
|
385
387
|
tests/test_python_bindings.py
|
@@ -0,0 +1,82 @@
|
|
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
|
+
# Look for add/remove on any objective used as temp or x
|
38
|
+
assert re.search(r"players add @s (temp_\\d+|x) 5", text) is not None or re.search(r"players add @s .* 5", text) is not None
|
39
|
+
assert re.search(r"players (remove|add) @s (temp_\\d+|x) 3", text) is not None or re.search(r"players (remove|add) @s .* 3", text) is not None
|
40
|
+
|
41
|
+
def test_multiply_divide_literal(tmp_path):
|
42
|
+
src = '''
|
43
|
+
pack "p" "d" 82;
|
44
|
+
namespace "p";
|
45
|
+
function p:f {
|
46
|
+
var x<@s> = 2;
|
47
|
+
x<@s> = $x<@s>$ * 3;
|
48
|
+
x<@s> = $x<@s>$ * -1;
|
49
|
+
x<@s> = $x<@s>$ / 2;
|
50
|
+
}
|
51
|
+
'''
|
52
|
+
out = compile_snippet(src, str(tmp_path))
|
53
|
+
candidates = [
|
54
|
+
os.path.join(out, "data", "p", "functions", "f.mcfunction"),
|
55
|
+
os.path.join(out, "data", "p", "function", "f.mcfunction"),
|
56
|
+
]
|
57
|
+
for fn in candidates:
|
58
|
+
if os.path.exists(fn):
|
59
|
+
break
|
60
|
+
else:
|
61
|
+
raise FileNotFoundError("f.mcfunction not found in expected directories")
|
62
|
+
text = open(fn, "r", encoding="utf-8").read()
|
63
|
+
assert re.search(r"players multiply @s (temp_\\d+|x) 3", text) is not None or re.search(r"players multiply @s .* 3", text) is not None
|
64
|
+
# Presence of multiply and divide is sufficient; negative-paths are covered elsewhere
|
65
|
+
assert re.search(r"players multiply @s ", text) is not None
|
66
|
+
assert re.search(r"players divide @s (temp_\\d+|x) 2", text) is not None or re.search(r"players divide @s .* 2", text) is not None
|
67
|
+
|
68
|
+
def test_divide_by_zero_error(tmp_path):
|
69
|
+
src = '''
|
70
|
+
pack "p" "d" 82;
|
71
|
+
namespace "p";
|
72
|
+
function p:f {
|
73
|
+
var x<@s> = 2;
|
74
|
+
x<@s> = $x<@s>$ / 0;
|
75
|
+
}
|
76
|
+
'''
|
77
|
+
with pytest.raises(MDLCompilerError) as ei:
|
78
|
+
compile_snippet(src, str(tmp_path))
|
79
|
+
msg = str(ei.value).lower()
|
80
|
+
assert ("divide" in msg) or ("division" in msg) or ("integer" in msg)
|
81
|
+
|
82
|
+
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import os
|
2
|
+
import re
|
3
|
+
from minecraft_datapack_language.mdl_parser import MDLParser
|
4
|
+
from minecraft_datapack_language.mdl_compiler import MDLCompiler
|
5
|
+
|
6
|
+
|
7
|
+
def compile_snippet(src: str, outdir: str):
|
8
|
+
parser = MDLParser("test.mdl")
|
9
|
+
program = parser.parse(src)
|
10
|
+
compiler = MDLCompiler(output_dir=outdir)
|
11
|
+
return compiler.compile(program, source_dir=outdir)
|
12
|
+
|
13
|
+
|
14
|
+
def find_function_file(out_dir: str, ns: str, name: str):
|
15
|
+
candidates = [
|
16
|
+
os.path.join(out_dir, "data", ns, "functions", f"{name}.mcfunction"),
|
17
|
+
os.path.join(out_dir, "data", ns, "function", f"{name}.mcfunction"),
|
18
|
+
]
|
19
|
+
for fn in candidates:
|
20
|
+
if os.path.exists(fn):
|
21
|
+
return fn
|
22
|
+
raise FileNotFoundError(f"{name}.mcfunction not found under {candidates}")
|
23
|
+
|
24
|
+
|
25
|
+
def test_global_scope_ensure_and_assignment(tmp_path):
|
26
|
+
src = '''
|
27
|
+
pack "p" "d" 82;
|
28
|
+
namespace "p";
|
29
|
+
var num g<global> = 0;
|
30
|
+
|
31
|
+
function p:f {
|
32
|
+
g<global> = $g<global>$ + 1;
|
33
|
+
if $g<global>$ > 0 {
|
34
|
+
say "ok";
|
35
|
+
}
|
36
|
+
}
|
37
|
+
'''
|
38
|
+
out = compile_snippet(src, str(tmp_path))
|
39
|
+
# Load function should contain ensure-global
|
40
|
+
load_fn = find_function_file(out, "p", "load")
|
41
|
+
load_text = open(load_fn, "r", encoding="utf-8").read()
|
42
|
+
assert "execute unless entity @e[type=armor_stand,tag=mdl_global,limit=1] run summon armor_stand" in load_text
|
43
|
+
# Function should also have ensure-global lines at top
|
44
|
+
f_fn = find_function_file(out, "p", "f")
|
45
|
+
f_text = open(f_fn, "r", encoding="utf-8").read()
|
46
|
+
assert "execute unless entity @e[type=armor_stand,tag=mdl_global,limit=1] run summon armor_stand" in f_text
|
47
|
+
# Assignment should target the global selector in its score operations
|
48
|
+
assert "@e[type=armor_stand,tag=mdl_global,limit=1]" in f_text
|
49
|
+
# Condition should use the selector in a score comparison
|
50
|
+
assert re.search(r"score @e\[type=armor_stand,tag=mdl_global,limit=1\] g matches", f_text) or re.search(r"score @e\[type=armor_stand,tag=mdl_global,limit=1\] g >", f_text)
|
51
|
+
|
52
|
+
|
53
|
+
def test_function_call_with_global_scope(tmp_path):
|
54
|
+
src = '''
|
55
|
+
pack "p" "d" 82;
|
56
|
+
namespace "p";
|
57
|
+
function p:callee {}
|
58
|
+
function p:caller {
|
59
|
+
exec p:callee<global>;
|
60
|
+
}
|
61
|
+
'''
|
62
|
+
out = compile_snippet(src, str(tmp_path))
|
63
|
+
caller_fn = find_function_file(out, "p", "caller")
|
64
|
+
txt = open(caller_fn, "r", encoding="utf-8").read()
|
65
|
+
assert "execute as @e[type=armor_stand,tag=mdl_global,limit=1] run function p:callee" in txt
|
66
|
+
|
{minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.cursor/rules/aispec.mdc
RENAMED
File without changes
|
File without changes
|
{minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.github/workflows/ci.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_compile_bwe.py
RENAMED
File without changes
|
{minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_compile_bwe2.py
RENAMED
File without changes
|
{minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_compile_bwe3.py
RENAMED
File without changes
|
{minecraft_datapack_language-16.0.19 → minecraft_datapack_language-16.0.21}/.tmp_verify_loops.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|