redscript-mc 2.5.0 → 2.6.2
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.
- package/CHANGELOG.md +80 -0
- package/README.md +5 -75
- package/README.zh.md +165 -147
- package/ROADMAP.md +195 -0
- package/dist/data/linalg/function/_vec2d_len_sq_fx.mcfunction +17 -0
- package/dist/data/linalg/function/_vec3d_len_sq_fx.mcfunction +27 -0
- package/dist/data/linalg/function/load.mcfunction +1 -0
- package/dist/data/linalg/function/mat2d_det.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r0c0.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r0c1.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r1c0.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_mul_r1c1.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_vecmul_x.mcfunction +16 -0
- package/dist/data/linalg/function/mat2d_vecmul_y.mcfunction +16 -0
- package/dist/data/linalg/function/solve2d_x.mcfunction +27 -0
- package/dist/data/linalg/function/solve2d_y.mcfunction +27 -0
- package/dist/data/linalg/function/vec2d_dist.mcfunction +15 -0
- package/dist/data/linalg/function/vec2d_dot.mcfunction +16 -0
- package/dist/data/linalg/function/vec2d_length.mcfunction +21 -0
- package/dist/data/linalg/function/vec2d_normalize_x.mcfunction +8 -0
- package/dist/data/linalg/function/vec2d_normalize_x__merge_1.mcfunction +10 -0
- package/dist/data/linalg/function/vec2d_normalize_x__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec2d_normalize_y.mcfunction +8 -0
- package/dist/data/linalg/function/vec2d_normalize_y__merge_1.mcfunction +10 -0
- package/dist/data/linalg/function/vec2d_normalize_y__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_cross_x.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_cross_y.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_cross_z.mcfunction +16 -0
- package/dist/data/linalg/function/vec3d_dist.mcfunction +21 -0
- package/dist/data/linalg/function/vec3d_dot.mcfunction +26 -0
- package/dist/data/linalg/function/vec3d_length.mcfunction +31 -0
- package/dist/data/linalg/function/vec3d_normalize_x.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_x__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_x__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_normalize_y.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_y__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_y__then_0.mcfunction +3 -0
- package/dist/data/linalg/function/vec3d_normalize_z.mcfunction +9 -0
- package/dist/data/linalg/function/vec3d_normalize_z__merge_1.mcfunction +11 -0
- package/dist/data/linalg/function/vec3d_normalize_z__then_0.mcfunction +3 -0
- package/dist/data/math_hp/function/cos_hp.mcfunction +8 -0
- package/dist/data/math_hp/function/div3_hp.mcfunction +23 -0
- package/dist/data/math_hp/function/div_hp.mcfunction +13 -0
- package/dist/data/math_hp/function/init_div.mcfunction +1 -0
- package/dist/data/math_hp/function/init_trig.mcfunction +1 -0
- package/dist/data/math_hp/function/ln_5term.mcfunction +6 -0
- package/dist/data/math_hp/function/ln_5term__loop_body_1.mcfunction +8 -0
- package/dist/data/math_hp/function/ln_5term__loop_body_4.mcfunction +8 -0
- package/dist/data/math_hp/function/ln_5term__loop_exit_2.mcfunction +1 -0
- package/dist/data/math_hp/function/ln_5term__loop_exit_5.mcfunction +61 -0
- package/dist/data/math_hp/function/ln_5term__loop_header_0.mcfunction +3 -0
- package/dist/data/math_hp/function/ln_5term__loop_header_3.mcfunction +6 -0
- package/dist/data/math_hp/function/load.mcfunction +1 -0
- package/dist/data/math_hp/function/norm3_hp.mcfunction +43 -0
- package/dist/data/math_hp/function/sin_hp.mcfunction +8 -0
- package/dist/data/math_hp/function/sqrt_hp.mcfunction +17 -0
- package/dist/data/math_hp/function/sqrt_hp__merge_1.mcfunction +21 -0
- package/dist/data/math_hp/function/sqrt_hp__then_0.mcfunction +2 -0
- package/dist/data/minecraft/tags/function/load.json +1 -2
- package/dist/data/minecraft/tags/function/tick.json +1 -1
- package/dist/data/readme_demo/function/_draw.mcfunction +1 -0
- package/dist/data/readme_demo/function/_init.mcfunction +1 -0
- package/dist/data/readme_demo/function/_math_init.mcfunction +4 -0
- package/dist/data/readme_demo/function/_wave_tick.mcfunction +1 -0
- package/dist/data/readme_demo/function/_wave_tick__foreach_t8.mcfunction +109 -0
- package/dist/data/readme_demo/function/acos_approx.mcfunction +7 -0
- package/dist/data/readme_demo/function/approx_eq.mcfunction +10 -0
- package/dist/data/readme_demo/function/approx_eq__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/approx_eq__merge_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/approx_eq__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/approx_eq__then_2.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx.mcfunction +5 -0
- package/dist/data/readme_demo/function/asin_approx__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/asin_approx__merge_10.mcfunction +5 -0
- package/dist/data/readme_demo/function/asin_approx__merge_4.mcfunction +12 -0
- package/dist/data/readme_demo/function/asin_approx__merge_7.mcfunction +14 -0
- package/dist/data/readme_demo/function/asin_approx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_6.mcfunction +2 -0
- package/dist/data/readme_demo/function/asin_approx__then_9.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_body_6.mcfunction +7 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_exit_7.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_fx__loop_header_5.mcfunction +4 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_11.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_13.mcfunction +4 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_4.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__merge_9.mcfunction +13 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_10.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_12.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_fx__then_8.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton.mcfunction +5 -0
- package/dist/data/readme_demo/function/cbrt_newton__else_7.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_1.mcfunction +11 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_4.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_newton__merge_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_3.mcfunction +17 -0
- package/dist/data/readme_demo/function/cbrt_newton__then_5.mcfunction +11 -0
- package/dist/data/readme_demo/function/ceil_div.mcfunction +9 -0
- package/dist/data/readme_demo/function/combinations.mcfunction +6 -0
- package/dist/data/readme_demo/function/combinations__loop_body_9.mcfunction +15 -0
- package/dist/data/readme_demo/function/combinations__loop_exit_10.mcfunction +1 -0
- package/dist/data/readme_demo/function/combinations__loop_header_8.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__merge_4.mcfunction +6 -0
- package/dist/data/readme_demo/function/combinations__merge_7.mcfunction +3 -0
- package/dist/data/readme_demo/function/combinations__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/combinations__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/combinations__then_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/cos_fixed.mcfunction +7 -0
- package/dist/data/readme_demo/function/cubic_disc_fx.mcfunction +26 -0
- package/dist/data/readme_demo/function/cubic_newton.mcfunction +8 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_body_1.mcfunction +55 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_exit_2.mcfunction +1 -0
- package/dist/data/readme_demo/function/cubic_newton__loop_header_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_10.mcfunction +1 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__merge_8.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/cubic_newton__then_5.mcfunction +13 -0
- package/dist/data/readme_demo/function/cubic_newton__then_7.mcfunction +4 -0
- package/dist/data/readme_demo/function/cubic_newton__then_9.mcfunction +2 -0
- package/dist/data/readme_demo/function/divfix.mcfunction +6 -0
- package/dist/data/readme_demo/function/divfix__merge_1.mcfunction +6 -0
- package/dist/data/readme_demo/function/divfix__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/exp_fx.mcfunction +16 -0
- package/dist/data/readme_demo/function/exp_fx__loop_body_10.mcfunction +8 -0
- package/dist/data/readme_demo/function/exp_fx__loop_body_5.mcfunction +8 -0
- package/dist/data/readme_demo/function/exp_fx__loop_exit_11.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__loop_exit_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__loop_header_4.mcfunction +3 -0
- package/dist/data/readme_demo/function/exp_fx__loop_header_9.mcfunction +3 -0
- package/dist/data/readme_demo/function/exp_fx__merge_1.mcfunction +47 -0
- package/dist/data/readme_demo/function/exp_fx__merge_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/exp_fx__merge_8.mcfunction +1 -0
- package/dist/data/readme_demo/function/exp_fx__then_0.mcfunction +7 -0
- package/dist/data/readme_demo/function/exp_fx__then_2.mcfunction +2 -0
- package/dist/data/readme_demo/function/exp_fx__then_7.mcfunction +5 -0
- package/dist/data/readme_demo/function/factorial.mcfunction +5 -0
- package/dist/data/readme_demo/function/factorial__loop_body_4.mcfunction +7 -0
- package/dist/data/readme_demo/function/factorial__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/factorial__loop_header_3.mcfunction +3 -0
- package/dist/data/readme_demo/function/factorial__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/factorial__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/gamma_int.mcfunction +5 -0
- package/dist/data/readme_demo/function/gamma_int__merge_1.mcfunction +6 -0
- package/dist/data/readme_demo/function/gamma_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/gcd.mcfunction +7 -0
- package/dist/data/readme_demo/function/gcd__loop_body_5.mcfunction +5 -0
- package/dist/data/readme_demo/function/gcd__loop_exit_6.mcfunction +1 -0
- package/dist/data/readme_demo/function/gcd__loop_header_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/gcd__merge_1.mcfunction +5 -0
- package/dist/data/readme_demo/function/gcd__merge_3.mcfunction +1 -0
- package/dist/data/readme_demo/function/gcd__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/gcd__then_2.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt.mcfunction +5 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_10.mcfunction +8 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_13.mcfunction +11 -0
- package/dist/data/readme_demo/function/isqrt__loop_body_7.mcfunction +8 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_11.mcfunction +2 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_14.mcfunction +1 -0
- package/dist/data/readme_demo/function/isqrt__loop_exit_8.mcfunction +9 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_12.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__loop_header_9.mcfunction +3 -0
- package/dist/data/readme_demo/function/isqrt__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/isqrt__merge_16.mcfunction +5 -0
- package/dist/data/readme_demo/function/isqrt__merge_4.mcfunction +3 -0
- package/dist/data/readme_demo/function/isqrt__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/isqrt__then_15.mcfunction +1 -0
- package/dist/data/readme_demo/function/isqrt__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/lcm.mcfunction +11 -0
- package/dist/data/readme_demo/function/lcm__merge_1.mcfunction +5 -0
- package/dist/data/readme_demo/function/lcm__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/lerp.mcfunction +13 -0
- package/dist/data/readme_demo/function/ln.mcfunction +9 -0
- package/dist/data/readme_demo/function/ln__loop_body_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/ln__loop_body_4.mcfunction +8 -0
- package/dist/data/readme_demo/function/ln__loop_exit_2.mcfunction +1 -0
- package/dist/data/readme_demo/function/ln__loop_exit_5.mcfunction +37 -0
- package/dist/data/readme_demo/function/ln__loop_header_0.mcfunction +3 -0
- package/dist/data/readme_demo/function/ln__loop_header_3.mcfunction +6 -0
- package/dist/data/readme_demo/function/load.mcfunction +1 -0
- package/dist/data/readme_demo/function/log10_fx.mcfunction +11 -0
- package/dist/data/readme_demo/function/log2_fx.mcfunction +11 -0
- package/dist/data/readme_demo/function/log2_int.mcfunction +5 -0
- package/dist/data/readme_demo/function/log2_int__loop_body_4.mcfunction +8 -0
- package/dist/data/readme_demo/function/log2_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/log2_int__loop_header_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/log2_int__merge_1.mcfunction +3 -0
- package/dist/data/readme_demo/function/log2_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/loga_fx.mcfunction +10 -0
- package/dist/data/readme_demo/function/loga_fx__merge_1.mcfunction +9 -0
- package/dist/data/readme_demo/function/loga_fx__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/map.mcfunction +12 -0
- package/dist/data/readme_demo/function/map__merge_1.mcfunction +11 -0
- package/dist/data/readme_demo/function/map__then_0.mcfunction +1 -0
- package/dist/data/readme_demo/function/mulfix.mcfunction +8 -0
- package/dist/data/readme_demo/function/newton_step.mcfunction +7 -0
- package/dist/data/readme_demo/function/newton_step__merge_1.mcfunction +8 -0
- package/dist/data/readme_demo/function/newton_step__then_0.mcfunction +1 -0
- package/dist/data/readme_demo/function/pow_int.mcfunction +6 -0
- package/dist/data/readme_demo/function/pow_int__loop_body_4.mcfunction +7 -0
- package/dist/data/readme_demo/function/pow_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/readme_demo/function/pow_int__loop_header_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/pow_int__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/pow_int__merge_7.mcfunction +8 -0
- package/dist/data/readme_demo/function/pow_int__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/pow_int__then_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/quadratic_disc.mcfunction +12 -0
- package/dist/data/readme_demo/function/quadratic_x1.mcfunction +7 -0
- package/dist/data/readme_demo/function/quadratic_x1__merge_1.mcfunction +13 -0
- package/dist/data/readme_demo/function/quadratic_x1__merge_4.mcfunction +15 -0
- package/dist/data/readme_demo/function/quadratic_x1__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x1__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x2.mcfunction +7 -0
- package/dist/data/readme_demo/function/quadratic_x2__merge_1.mcfunction +13 -0
- package/dist/data/readme_demo/function/quadratic_x2__merge_4.mcfunction +15 -0
- package/dist/data/readme_demo/function/quadratic_x2__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/quadratic_x2__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign.mcfunction +5 -0
- package/dist/data/readme_demo/function/sign__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/sign__merge_4.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/sign__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/simpson_step.mcfunction +16 -0
- package/dist/data/readme_demo/function/sin_fixed.mcfunction +9 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_1.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_3.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_6.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__merge_9.mcfunction +10 -0
- package/dist/data/readme_demo/function/sin_fixed__then_0.mcfunction +4 -0
- package/dist/data/readme_demo/function/sin_fixed__then_2.mcfunction +6 -0
- package/dist/data/readme_demo/function/sin_fixed__then_5.mcfunction +8 -0
- package/dist/data/readme_demo/function/sin_fixed__then_8.mcfunction +10 -0
- package/dist/data/readme_demo/function/smootherstep.mcfunction +10 -0
- package/dist/data/readme_demo/function/smootherstep__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/smootherstep__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/smootherstep__merge_6.mcfunction +27 -0
- package/dist/data/readme_demo/function/smootherstep__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/smootherstep__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/smootherstep__then_5.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep.mcfunction +10 -0
- package/dist/data/readme_demo/function/smoothstep__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/smoothstep__merge_4.mcfunction +4 -0
- package/dist/data/readme_demo/function/smoothstep__merge_6.mcfunction +15 -0
- package/dist/data/readme_demo/function/smoothstep__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep__then_3.mcfunction +2 -0
- package/dist/data/readme_demo/function/smoothstep__then_5.mcfunction +2 -0
- package/dist/data/readme_demo/function/solve2x2_x.mcfunction +17 -0
- package/dist/data/readme_demo/function/solve2x2_x__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/solve2x2_x__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/solve2x2_y.mcfunction +17 -0
- package/dist/data/readme_demo/function/solve2x2_y__merge_1.mcfunction +12 -0
- package/dist/data/readme_demo/function/solve2x2_y__then_0.mcfunction +2 -0
- package/dist/data/readme_demo/function/sqrt_fixed.mcfunction +8 -0
- package/dist/data/readme_demo/function/sqrt_fx.mcfunction +8 -0
- package/dist/data/readme_demo/function/start.mcfunction +2 -0
- package/dist/data/readme_demo/function/stop.mcfunction +1 -0
- package/dist/data/readme_demo/function/trapezoid_step.mcfunction +11 -0
- package/dist/data/stdextra/function/__load.mcfunction +2 -0
- package/dist/data/stdextra/function/load.mcfunction +1 -0
- package/dist/data/stdextra/function/test_bigint.mcfunction +52 -0
- package/dist/data/stdextra/function/test_bits.mcfunction +33 -0
- package/dist/data/stdextra/function/test_list_sort.mcfunction +55 -0
- package/dist/data/stdextra/function/test_random.mcfunction +17 -0
- package/dist/data/stdextra/function/test_random__merge_1.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__merge_11.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__merge_3.mcfunction +14 -0
- package/dist/data/stdextra/function/test_random__merge_5.mcfunction +8 -0
- package/dist/data/stdextra/function/test_random__merge_7.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__merge_9.mcfunction +1 -0
- package/dist/data/stdextra/function/test_random__then_0.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__then_10.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_2.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_4.mcfunction +4 -0
- package/dist/data/stdextra/function/test_random__then_6.mcfunction +2 -0
- package/dist/data/stdextra/function/test_random__then_8.mcfunction +4 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_nums.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_parent.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_queue.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_rev.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_visited.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_parent.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_visited.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1.mcfunction +17 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_body_1_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_1__loop_header_0_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__else_8.mcfunction +19 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_body_4.mcfunction +9 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__loop_header_3_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_10.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_12.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_14.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_16.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_18.mcfunction +11 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_20.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_22.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_24.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__merge_7_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_11.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_13.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_15.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_17.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_19.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_21.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_23.mcfunction +15 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_6.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_2__then_9.mcfunction +13 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__else_32.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_body_28.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_header_27.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__loop_header_27_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31.mcfunction +6 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__merge_31_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_3__then_30.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4.mcfunction +2 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34.mcfunction +16 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34_continue.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_body_34_yield.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_header_33.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_4__loop_header_33_exit.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_5.mcfunction +16 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_cont_5__merge_26.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_1.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_2.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_3.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_4.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__call_5.mcfunction +1 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_2.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_3.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_4.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__check_5.mcfunction +4 -0
- package/dist/data/test/function/_coro_pathfind_bfs_coro_tick__done.mcfunction +1 -0
- package/dist/data/test/function/_hsl_chroma_x.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_1.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_10.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_13.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_4.mcfunction +1 -2
- package/dist/data/test/function/aabb_contains__merge_7.mcfunction +1 -2
- package/dist/data/test/function/acos_approx.mcfunction +7 -0
- package/dist/data/test/function/add_to_team.mcfunction +5 -0
- package/dist/data/test/function/angle_diff.mcfunction +1 -2
- package/dist/data/test/function/angle_normalize__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/angle_normalize__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/angry_at.mcfunction +1 -0
- package/dist/data/test/function/apply_damage.mcfunction +12 -0
- package/dist/data/test/function/apply_damage__else_2.mcfunction +2 -0
- package/dist/data/test/function/apply_damage__merge_1.mcfunction +1 -0
- package/dist/data/test/function/apply_damage__then_0.mcfunction +2 -0
- package/dist/data/test/function/arr_test.mcfunction +4 -0
- package/dist/data/test/function/asin_approx.mcfunction +5 -0
- package/dist/data/test/function/asin_approx__merge_1.mcfunction +3 -0
- package/dist/data/test/function/asin_approx__merge_10.mcfunction +5 -0
- package/dist/data/test/function/asin_approx__merge_4.mcfunction +12 -0
- package/dist/data/test/function/asin_approx__merge_7.mcfunction +14 -0
- package/dist/data/test/function/asin_approx__then_0.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_3.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_6.mcfunction +2 -0
- package/dist/data/test/function/asin_approx__then_9.mcfunction +2 -0
- package/dist/data/test/function/barrier_wall.mcfunction +1 -0
- package/dist/data/test/function/bernoulli.mcfunction +1 -2
- package/dist/data/test/function/bernoulli__merge_1.mcfunction +1 -2
- package/dist/data/test/function/bigint_chunk.mcfunction +2 -0
- package/dist/data/test/function/bigint_div_small.mcfunction +6 -0
- package/dist/data/test/function/bigint_div_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_div_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_div_small__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_mod_small.mcfunction +6 -0
- package/dist/data/test/function/bigint_mod_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_mod_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mod_small__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bit_and__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_and__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_and__then_3.mcfunction +1 -2
- package/dist/data/test/function/bit_clear__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_clear__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_get__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_not__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_not__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_or__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_or__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_or__merge_4.mcfunction +1 -2
- package/dist/data/test/function/bit_or__then_5.mcfunction +1 -2
- package/dist/data/test/function/bit_set__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_set__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_shl__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_shr__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_toggle__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/bit_toggle__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/bit_xor__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/bit_xor__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/buff_all.mcfunction +22 -0
- package/dist/data/test/function/cbrt_newton.mcfunction +5 -0
- package/dist/data/test/function/cbrt_newton__else_7.mcfunction +2 -0
- package/dist/data/test/function/cbrt_newton__merge_1.mcfunction +11 -0
- package/dist/data/test/function/cbrt_newton__merge_4.mcfunction +1 -0
- package/dist/data/test/function/cbrt_newton__merge_6.mcfunction +1 -0
- package/dist/data/test/function/cbrt_newton__then_0.mcfunction +2 -0
- package/dist/data/test/function/cbrt_newton__then_3.mcfunction +17 -0
- package/dist/data/test/function/cbrt_newton__then_5.mcfunction +11 -0
- package/dist/data/test/function/check_holding_item.mcfunction +1 -0
- package/dist/data/test/function/check_look_down.mcfunction +1 -0
- package/dist/data/test/function/check_look_down__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/check_look_straight.mcfunction +1 -0
- package/dist/data/test/function/check_look_straight__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/check_look_up.mcfunction +1 -0
- package/dist/data/test/function/check_look_up__foreach_t0.mcfunction +2 -0
- package/dist/data/test/function/cleanup_teams.mcfunction +8 -0
- package/dist/data/test/function/clear_area.mcfunction +1 -0
- package/dist/data/test/function/clear_effect.mcfunction +1 -0
- package/dist/data/test/function/clear_effects.mcfunction +1 -0
- package/dist/data/test/function/clear_inventory.mcfunction +1 -0
- package/dist/data/test/function/cooldown_ready.mcfunction +7 -0
- package/dist/data/test/function/cooldown_ready__merge_1.mcfunction +4 -0
- package/dist/data/test/function/cooldown_ready__merge_4.mcfunction +2 -0
- package/dist/data/test/function/cooldown_ready__then_0.mcfunction +2 -0
- package/dist/data/test/function/cooldown_ready__then_3.mcfunction +2 -0
- package/dist/data/test/function/cooldown_start.mcfunction +3 -0
- package/dist/data/test/function/cooldown_tick.mcfunction +7 -0
- package/dist/data/test/function/cooldown_tick__else_5.mcfunction +2 -0
- package/dist/data/test/function/cooldown_tick__merge_1.mcfunction +4 -0
- package/dist/data/test/function/cooldown_tick__merge_4.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__merge_7.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__then_0.mcfunction +1 -0
- package/dist/data/test/function/cooldown_tick__then_3.mcfunction +7 -0
- package/dist/data/test/function/cooldown_tick__then_6.mcfunction +2 -0
- package/dist/data/test/function/cos_hp.mcfunction +4 -2
- package/dist/data/test/function/create_blue_team.mcfunction +10 -0
- package/dist/data/test/function/create_green_team.mcfunction +10 -0
- package/dist/data/test/function/create_health_bar.mcfunction +24 -0
- package/dist/data/test/function/create_progress_bar.mcfunction +24 -0
- package/dist/data/test/function/create_red_team.mcfunction +10 -0
- package/dist/data/test/function/create_team.mcfunction +8 -0
- package/dist/data/test/function/create_timer_bar.mcfunction +30 -0
- package/dist/data/test/function/create_yellow_team.mcfunction +10 -0
- package/dist/data/test/function/cubic_disc_fx.mcfunction +26 -0
- package/dist/data/test/function/cubic_newton.mcfunction +8 -0
- package/dist/data/test/function/cubic_newton__loop_body_1.mcfunction +55 -0
- package/dist/data/test/function/cubic_newton__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/cubic_newton__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_10.mcfunction +1 -0
- package/dist/data/test/function/cubic_newton__merge_4.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_6.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__merge_8.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__then_3.mcfunction +2 -0
- package/dist/data/test/function/cubic_newton__then_5.mcfunction +13 -0
- package/dist/data/test/function/cubic_newton__then_7.mcfunction +4 -0
- package/dist/data/test/function/cubic_newton__then_9.mcfunction +2 -0
- package/dist/data/test/function/curve_length_2d.mcfunction +6 -0
- package/dist/data/test/function/curve_length_2d__loop_body_1.mcfunction +32 -0
- package/dist/data/test/function/curve_length_2d__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/curve_length_2d__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/cylinder_contains.mcfunction +1 -2
- package/dist/data/test/function/damage.mcfunction +9 -0
- package/dist/data/test/function/damage__else_2.mcfunction +2 -0
- package/dist/data/test/function/damage__merge_1.mcfunction +1 -0
- package/dist/data/test/function/damage__then_0.mcfunction +2 -0
- package/dist/data/test/function/deriv_central.mcfunction +7 -0
- package/dist/data/test/function/deriv_central__merge_1.mcfunction +10 -0
- package/dist/data/test/function/deriv_central__then_0.mcfunction +2 -0
- package/dist/data/test/function/deriv_forward.mcfunction +7 -0
- package/dist/data/test/function/deriv_forward__merge_1.mcfunction +8 -0
- package/dist/data/test/function/deriv_forward__then_0.mcfunction +2 -0
- package/dist/data/test/function/disable_fire_spread.mcfunction +1 -0
- package/dist/data/test/function/disable_keep_inventory.mcfunction +1 -0
- package/dist/data/test/function/disable_mob_griefing.mcfunction +1 -0
- package/dist/data/test/function/div3_hp.mcfunction +23 -0
- package/dist/data/test/function/div_hp.mcfunction +13 -0
- package/dist/data/test/function/draw_circle.mcfunction +8 -0
- package/dist/data/test/function/draw_circle__loop_body_1.mcfunction +34 -0
- package/dist/data/test/function/draw_circle__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_circle__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/draw_helix.mcfunction +10 -0
- package/dist/data/test/function/draw_helix__loop_body_1.mcfunction +42 -0
- package/dist/data/test/function/draw_helix__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_helix__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/draw_line_2d.mcfunction +9 -0
- package/dist/data/test/function/draw_line_2d__loop_body_1.mcfunction +34 -0
- package/dist/data/test/function/draw_line_2d__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/draw_line_2d__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/ease_in_expo.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_back.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_bounce.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_cubic.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_quad.mcfunction +1 -2
- package/dist/data/test/function/ease_in_out_sine.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce__merge_1.mcfunction +1 -2
- package/dist/data/test/function/ease_out_bounce__merge_4.mcfunction +1 -2
- package/dist/data/test/function/ease_out_expo.mcfunction +1 -2
- package/dist/data/test/function/enable_keep_inventory.mcfunction +1 -0
- package/dist/data/test/function/end_sparkles_at.mcfunction +1 -0
- package/dist/data/test/function/enemy_health.mcfunction +2 -0
- package/dist/data/test/function/example_right_click.mcfunction +1 -0
- package/dist/data/test/function/example_right_click__foreach_t0.mcfunction +5 -0
- package/dist/data/test/function/example_right_click__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/example_right_click__foreach_t0__then_0.mcfunction +3 -0
- package/dist/data/test/function/exp_dist_approx.mcfunction +1 -2
- package/dist/data/test/function/exp_dist_approx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/exp_dist_approx__merge_3.mcfunction +1 -2
- package/dist/data/test/function/explosion_effect.mcfunction +1 -0
- package/dist/data/test/function/fbm_1d__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/fbm_1d__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/fbm_2d__loop_exit_2.mcfunction +1 -2
- package/dist/data/test/function/fbm_2d__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/flames.mcfunction +1 -0
- package/dist/data/test/function/gather_all.mcfunction +8 -0
- package/dist/data/test/function/give_kit_archer.mcfunction +6 -0
- package/dist/data/test/function/give_kit_mage.mcfunction +5 -0
- package/dist/data/test/function/give_kit_warrior.mcfunction +6 -0
- package/dist/data/test/function/glass_box.mcfunction +2 -0
- package/dist/data/test/function/glow.mcfunction +1 -0
- package/dist/data/test/function/goto_arena.mcfunction +7 -0
- package/dist/data/test/function/goto_lobby.mcfunction +7 -0
- package/dist/data/test/function/happy_at.mcfunction +1 -0
- package/dist/data/test/function/hash_1d_pos.mcfunction +1 -2
- package/dist/data/test/function/hash_2d_pos.mcfunction +1 -2
- package/dist/data/test/function/heal.mcfunction +5 -0
- package/dist/data/test/function/heap_new.mcfunction +7 -0
- package/dist/data/test/function/heap_new__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/heap_new__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_new__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_peek.mcfunction +2 -0
- package/dist/data/test/function/heap_pop.mcfunction +4 -0
- package/dist/data/test/function/heap_pop__else_13.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__loop_body_1.mcfunction +14 -0
- package/dist/data/test/function/heap_pop__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_pop__merge_10.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_12.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_4.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__merge_6.mcfunction +1 -0
- package/dist/data/test/function/heap_pop__merge_8.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_11.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__then_3.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_5.mcfunction +2 -0
- package/dist/data/test/function/heap_pop__then_7.mcfunction +3 -0
- package/dist/data/test/function/heap_pop__then_9.mcfunction +2 -0
- package/dist/data/test/function/heap_push.mcfunction +6 -0
- package/dist/data/test/function/heap_push__else_5.mcfunction +2 -0
- package/dist/data/test/function/heap_push__else_8.mcfunction +2 -0
- package/dist/data/test/function/heap_push__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/heap_push__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/heap_push__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/heap_push__merge_4.mcfunction +1 -0
- package/dist/data/test/function/heap_push__merge_7.mcfunction +1 -0
- package/dist/data/test/function/heap_push__then_3.mcfunction +7 -0
- package/dist/data/test/function/heap_push__then_6.mcfunction +2 -0
- package/dist/data/test/function/heap_size.mcfunction +2 -0
- package/dist/data/test/function/hearts_at.mcfunction +1 -0
- package/dist/data/test/function/hide_bar.mcfunction +4 -0
- package/dist/data/test/function/hsl_to_b.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_b__merge_9.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_g__merge_9.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_1.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_12.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_3.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_6.mcfunction +1 -2
- package/dist/data/test/function/hsl_to_r__merge_9.mcfunction +1 -2
- package/dist/data/test/function/init_div.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__else_11.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort__else_8.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort__loop_body_1.mcfunction +6 -0
- package/dist/data/test/function/insertion_sort__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__loop_exit_5.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort__merge_10.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__merge_7.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort__then_6.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort__then_9.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__else_11.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort_desc__else_8.mcfunction +2 -0
- package/dist/data/test/function/insertion_sort_desc__loop_body_1.mcfunction +6 -0
- package/dist/data/test/function/insertion_sort_desc__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__loop_exit_5.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort_desc__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/insertion_sort_desc__merge_10.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__merge_7.mcfunction +1 -0
- package/dist/data/test/function/insertion_sort_desc__then_6.mcfunction +3 -0
- package/dist/data/test/function/insertion_sort_desc__then_9.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__loop_body_6.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__loop_exit_7.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__loop_header_5.mcfunction +5 -0
- package/dist/data/test/function/integrate_simpson__merge_1.mcfunction +8 -0
- package/dist/data/test/function/integrate_simpson__merge_11.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson__merge_4.mcfunction +5 -0
- package/dist/data/test/function/integrate_simpson__merge_9.mcfunction +7 -0
- package/dist/data/test/function/integrate_simpson__then_0.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__then_10.mcfunction +6 -0
- package/dist/data/test/function/integrate_simpson__then_3.mcfunction +4 -0
- package/dist/data/test/function/integrate_simpson__then_8.mcfunction +6 -0
- package/dist/data/test/function/integrate_trapezoid.mcfunction +7 -0
- package/dist/data/test/function/integrate_trapezoid__loop_body_4.mcfunction +7 -0
- package/dist/data/test/function/integrate_trapezoid__loop_exit_5.mcfunction +6 -0
- package/dist/data/test/function/integrate_trapezoid__loop_header_3.mcfunction +5 -0
- package/dist/data/test/function/integrate_trapezoid__merge_1.mcfunction +11 -0
- package/dist/data/test/function/integrate_trapezoid__then_0.mcfunction +2 -0
- package/dist/data/test/function/interactions_init.mcfunction +9 -0
- package/dist/data/test/function/invisible.mcfunction +1 -0
- package/dist/data/test/function/is_op.mcfunction +2 -0
- package/dist/data/test/function/is_op__exec_t1.mcfunction +1 -0
- package/dist/data/test/function/is_sneaking.mcfunction +5 -0
- package/dist/data/test/function/is_sneaking__merge_1.mcfunction +2 -0
- package/dist/data/test/function/is_sneaking__then_0.mcfunction +2 -0
- package/dist/data/test/function/jump.mcfunction +1 -0
- package/dist/data/test/function/launch_up.mcfunction +6 -0
- package/dist/data/test/function/list_max3.mcfunction +1 -2
- package/dist/data/test/function/list_max3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_max5.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/list_max5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/list_min3.mcfunction +1 -2
- package/dist/data/test/function/list_min3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_min5.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/list_min5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/list_sort_asc__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/list_sort_desc__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/max_heap_pop.mcfunction +4 -0
- package/dist/data/test/function/max_heap_pop__else_13.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__loop_body_1.mcfunction +14 -0
- package/dist/data/test/function/max_heap_pop__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/max_heap_pop__merge_10.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_12.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_4.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__merge_6.mcfunction +1 -0
- package/dist/data/test/function/max_heap_pop__merge_8.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_11.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__then_3.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_5.mcfunction +2 -0
- package/dist/data/test/function/max_heap_pop__then_7.mcfunction +3 -0
- package/dist/data/test/function/max_heap_pop__then_9.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push.mcfunction +6 -0
- package/dist/data/test/function/max_heap_push__else_5.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push__else_8.mcfunction +2 -0
- package/dist/data/test/function/max_heap_push__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/max_heap_push__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/max_heap_push__merge_4.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__merge_7.mcfunction +1 -0
- package/dist/data/test/function/max_heap_push__then_3.mcfunction +7 -0
- package/dist/data/test/function/max_heap_push__then_6.mcfunction +2 -0
- package/dist/data/test/function/newton_step.mcfunction +7 -0
- package/dist/data/test/function/newton_step__merge_1.mcfunction +8 -0
- package/dist/data/test/function/newton_step__then_0.mcfunction +1 -0
- package/dist/data/test/function/night_vision.mcfunction +1 -0
- package/dist/data/test/function/norm3_hp.mcfunction +43 -0
- package/dist/data/test/function/normal_approx12.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_1.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_11.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_13.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_15.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_17.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_19.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_21.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_3.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_5.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_7.mcfunction +1 -2
- package/dist/data/test/function/normal_approx12__merge_9.mcfunction +1 -2
- package/dist/data/test/function/on_double_sneak.mcfunction +1 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0.mcfunction +9 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__merge_3.mcfunction +2 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__then_0.mcfunction +6 -0
- package/dist/data/test/function/on_double_sneak__foreach_t0__then_2.mcfunction +2 -0
- package/dist/data/test/function/on_right_click.mcfunction +1 -0
- package/dist/data/test/function/on_right_click__foreach_t1.mcfunction +5 -0
- package/dist/data/test/function/on_right_click__foreach_t1__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_right_click__foreach_t1__then_0.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_click.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0.mcfunction +7 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__else_4.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__merge_3.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__then_0.mcfunction +4 -0
- package/dist/data/test/function/on_sneak_click__foreach_t0__then_2.mcfunction +3 -0
- package/dist/data/test/function/on_sneak_start.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0.mcfunction +5 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__else_2.mcfunction +2 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__merge_1.mcfunction +1 -0
- package/dist/data/test/function/on_sneak_start__foreach_t0__then_0.mcfunction +2 -0
- package/dist/data/test/function/particle_at_fx.mcfunction +1 -0
- package/dist/data/test/function/particle_dot.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__else_33.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__else_8.mcfunction +19 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_1.mcfunction +10 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_29.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_35.mcfunction +9 -0
- package/dist/data/test/function/pathfind_bfs__loop_body_4.mcfunction +9 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_2.mcfunction +24 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_30.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_36.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__loop_exit_5.mcfunction +6 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_28.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/pathfind_bfs__loop_header_34.mcfunction +4 -0
- package/dist/data/test/function/pathfind_bfs__merge_10.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_12.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_14.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_16.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_18.mcfunction +11 -0
- package/dist/data/test/function/pathfind_bfs__merge_20.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_22.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_24.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_26.mcfunction +5 -0
- package/dist/data/test/function/pathfind_bfs__merge_32.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__merge_7.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__then_11.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_13.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_15.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_17.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_19.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_21.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs__then_23.mcfunction +15 -0
- package/dist/data/test/function/pathfind_bfs__then_25.mcfunction +1 -0
- package/dist/data/test/function/pathfind_bfs__then_31.mcfunction +2 -0
- package/dist/data/test/function/pathfind_bfs__then_6.mcfunction +3 -0
- package/dist/data/test/function/pathfind_bfs__then_9.mcfunction +13 -0
- package/dist/data/test/function/pathfind_bfs_coro.mcfunction +1 -0
- package/dist/data/test/function/pcg_output.mcfunction +1 -2
- package/dist/data/test/function/pf_heuristic.mcfunction +14 -0
- package/dist/data/test/function/pf_heuristic__merge_1.mcfunction +4 -0
- package/dist/data/test/function/pf_heuristic__merge_3.mcfunction +6 -0
- package/dist/data/test/function/pf_heuristic__then_0.mcfunction +4 -0
- package/dist/data/test/function/pf_heuristic__then_2.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked.mcfunction +7 -0
- package/dist/data/test/function/pf_is_blocked__merge_1.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_10.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_4.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__merge_7.mcfunction +4 -0
- package/dist/data/test/function/pf_is_blocked__then_0.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_3.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_6.mcfunction +2 -0
- package/dist/data/test/function/pf_is_blocked__then_9.mcfunction +2 -0
- package/dist/data/test/function/pf_new_map.mcfunction +4 -0
- package/dist/data/test/function/pf_new_map__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/pf_new_map__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/pf_new_map__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/pf_noop.mcfunction +1 -0
- package/dist/data/test/function/pf_pack.mcfunction +8 -0
- package/dist/data/test/function/pf_set_blocked.mcfunction +5 -0
- package/dist/data/test/function/pf_set_open.mcfunction +5 -0
- package/dist/data/test/function/pf_unpack_x.mcfunction +5 -0
- package/dist/data/test/function/pf_unpack_z.mcfunction +5 -0
- package/dist/data/test/function/popcount__loop_body_1.mcfunction +1 -2
- package/dist/data/test/function/popcount__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/portal_effect.mcfunction +1 -0
- package/dist/data/test/function/random_bool.mcfunction +1 -2
- package/dist/data/test/function/random_range.mcfunction +1 -2
- package/dist/data/test/function/regen.mcfunction +1 -0
- package/dist/data/test/function/remove_bar.mcfunction +3 -0
- package/dist/data/test/function/remove_from_teams.mcfunction +3 -0
- package/dist/data/test/function/remove_item.mcfunction +1 -0
- package/dist/data/test/function/resistance.mcfunction +1 -0
- package/dist/data/test/function/rgb_to_h.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_12.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_7.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__merge_9.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_h__then_11.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_l__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_1.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_3.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_5.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_7.mcfunction +1 -2
- package/dist/data/test/function/rgb_to_s__merge_9.mcfunction +1 -2
- package/dist/data/test/function/riemann_left.mcfunction +6 -0
- package/dist/data/test/function/riemann_left__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_left__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_left__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/riemann_mid.mcfunction +6 -0
- package/dist/data/test/function/riemann_mid__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_mid__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_mid__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/riemann_right.mcfunction +6 -0
- package/dist/data/test/function/riemann_right__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/riemann_right__loop_exit_2.mcfunction +6 -0
- package/dist/data/test/function/riemann_right__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/running_m2.mcfunction +16 -0
- package/dist/data/test/function/running_mean.mcfunction +7 -0
- package/dist/data/test/function/running_mean__merge_1.mcfunction +13 -0
- package/dist/data/test/function/running_mean__then_0.mcfunction +1 -0
- package/dist/data/test/function/second_deriv.mcfunction +8 -0
- package/dist/data/test/function/second_deriv__merge_1.mcfunction +14 -0
- package/dist/data/test/function/second_deriv__then_0.mcfunction +2 -0
- package/dist/data/test/function/set_day.mcfunction +1 -0
- package/dist/data/test/function/set_easy.mcfunction +1 -0
- package/dist/data/test/function/set_hard.mcfunction +1 -0
- package/dist/data/test/function/set_midnight.mcfunction +1 -0
- package/dist/data/test/function/set_night.mcfunction +1 -0
- package/dist/data/test/function/set_noon.mcfunction +1 -0
- package/dist/data/test/function/set_normal.mcfunction +1 -0
- package/dist/data/test/function/set_peaceful.mcfunction +1 -0
- package/dist/data/test/function/setup_four_teams.mcfunction +4 -0
- package/dist/data/test/function/setup_two_teams.mcfunction +2 -0
- package/dist/data/test/function/show_bar.mcfunction +4 -0
- package/dist/data/test/function/simpson_step.mcfunction +16 -0
- package/dist/data/test/function/sin_hp.mcfunction +4 -2
- package/dist/data/test/function/slow_fall.mcfunction +1 -0
- package/dist/data/test/function/smoke.mcfunction +1 -0
- package/dist/data/test/function/sort2_max.mcfunction +1 -2
- package/dist/data/test/function/sort2_min.mcfunction +1 -2
- package/dist/data/test/function/sort3.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort3__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort4.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_11.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_14.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort4__merge_9.mcfunction +1 -2
- package/dist/data/test/function/sort5.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_11.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_13.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_15.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_17.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_19.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_22.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_25.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_5.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_7.mcfunction +1 -2
- package/dist/data/test/function/sort5__merge_9.mcfunction +1 -2
- package/dist/data/test/function/sort_merge.mcfunction +10 -0
- package/dist/data/test/function/sort_merge__else_11.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__else_14.mcfunction +2 -0
- package/dist/data/test/function/sort_merge__else_5.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__else_8.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__loop_body_1.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/sort_merge__merge_10.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_13.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_4.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__merge_7.mcfunction +1 -0
- package/dist/data/test/function/sort_merge__then_12.mcfunction +7 -0
- package/dist/data/test/function/sort_merge__then_3.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__then_6.mcfunction +3 -0
- package/dist/data/test/function/sort_merge__then_9.mcfunction +7 -0
- package/dist/data/test/function/sparkles_at.mcfunction +1 -0
- package/dist/data/test/function/speed.mcfunction +1 -0
- package/dist/data/test/function/sphere_contains.mcfunction +1 -2
- package/dist/data/test/function/spread_players.mcfunction +1 -0
- package/dist/data/test/function/sqrt_fx.mcfunction +5 -8
- package/dist/data/test/function/sqrt_hp.mcfunction +17 -0
- package/dist/data/test/function/sqrt_hp__merge_1.mcfunction +21 -0
- package/dist/data/test/function/sqrt_hp__then_0.mcfunction +2 -0
- package/dist/data/test/function/std_dev_approx.mcfunction +5 -0
- package/dist/data/test/function/std_dev_approx__merge_1.mcfunction +13 -0
- package/dist/data/test/function/std_dev_approx__then_0.mcfunction +2 -0
- package/dist/data/test/function/str_len.mcfunction +2 -0
- package/dist/data/test/function/strength.mcfunction +1 -0
- package/dist/data/test/function/t.mcfunction +3 -0
- package/dist/data/test/function/teleport_to.mcfunction +9 -0
- package/dist/data/test/function/teleport_to_entity.mcfunction +5 -0
- package/dist/data/test/function/test.mcfunction +5 -0
- package/dist/data/test/function/test__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/test__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/test__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/tile_of.mcfunction +1 -2
- package/dist/data/test/function/timer/done.mcfunction +1 -2
- package/dist/data/test/function/timer/remaining.mcfunction +1 -2
- package/dist/data/test/function/timer/tick.mcfunction +1 -2
- package/dist/data/test/function/timer/tick__then_0.mcfunction +1 -2
- package/dist/data/test/function/totem_at.mcfunction +1 -0
- package/dist/data/test/function/trapezoid_step.mcfunction +11 -0
- package/dist/data/test/function/uniform_frac.mcfunction +1 -2
- package/dist/data/test/function/uniform_int.mcfunction +1 -2
- package/dist/data/test/function/update_bar.mcfunction +5 -0
- package/dist/data/test/function/update_bar_color.mcfunction +6 -0
- package/dist/data/test/function/update_bar_color__else_2.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__else_5.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__merge_1.mcfunction +1 -0
- package/dist/data/test/function/update_bar_color__merge_4.mcfunction +1 -0
- package/dist/data/test/function/update_bar_color__then_0.mcfunction +4 -0
- package/dist/data/test/function/update_bar_color__then_3.mcfunction +4 -0
- package/dist/data/test/function/value_noise_1d.mcfunction +1 -2
- package/dist/data/test/function/value_noise_2d.mcfunction +1 -2
- package/dist/data/test/function/value_noise_2d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/variance_from_m2.mcfunction +6 -0
- package/dist/data/test/function/variance_from_m2__merge_1.mcfunction +5 -0
- package/dist/data/test/function/variance_from_m2__then_0.mcfunction +2 -0
- package/dist/data/test/function/weapon_damage.mcfunction +5 -0
- package/dist/data/test/function/weather_clear.mcfunction +1 -0
- package/dist/data/test/function/weather_rain.mcfunction +1 -0
- package/dist/data/test/function/weather_thunder.mcfunction +1 -0
- package/dist/data/test/function/weighted2.mcfunction +1 -2
- package/dist/data/test/function/weighted2__merge_1.mcfunction +1 -2
- package/dist/data/test/function/weighted3.mcfunction +1 -2
- package/dist/data/test/function/weighted3__merge_1.mcfunction +1 -2
- package/dist/data/test/function/weighted3__merge_3.mcfunction +1 -2
- package/dist/data/test_dmul/function/__double_mul_macro.mcfunction +1 -0
- package/dist/data/test_dmul/function/double_mul_fixed.mcfunction +6 -0
- package/dist/data/test_dmul/function/load.mcfunction +1 -0
- package/dist/data/test_double_fn/function/double_test.mcfunction +2 -0
- package/dist/data/test_double_fn/function/load.mcfunction +1 -0
- package/dist/data/test_double_fn2/function/double_test.mcfunction +2 -0
- package/dist/data/test_double_fn2/function/load.mcfunction +1 -0
- package/dist/data/test_double_pass/function/caller_fn.mcfunction +4 -0
- package/dist/data/test_double_pass/function/consume_double.mcfunction +2 -0
- package/dist/data/test_double_pass/function/load.mcfunction +1 -0
- package/dist/data/test_macro/function/load.mcfunction +1 -0
- package/dist/data/test_macro/function/macro_helper.mcfunction +1 -0
- package/dist/data/test_macro3/function/__dmul_macro.mcfunction +1 -0
- package/dist/data/test_macro3/function/double_mul_test.mcfunction +7 -0
- package/dist/data/test_macro3/function/load.mcfunction +1 -0
- package/dist/data/test_ret_double/function/load.mcfunction +1 -0
- package/dist/data/test_ret_double/function/make_double.mcfunction +3 -0
- package/dist/data/test_ret_double/function/use_it.mcfunction +3 -0
- package/dist/pack.mcmeta +1 -1
- package/dist/src/__tests__/array-dynamic.test.js +42 -0
- package/dist/src/__tests__/builtins.test.d.ts +1 -0
- package/dist/src/__tests__/builtins.test.js +55 -0
- package/dist/src/__tests__/compile-all.test.js +1 -0
- package/dist/src/__tests__/diagnostics.test.js +8 -11
- package/dist/src/__tests__/double.test.d.ts +7 -0
- package/dist/src/__tests__/double.test.js +464 -0
- package/dist/src/__tests__/e2e/ecs-stdlib.test.d.ts +7 -0
- package/dist/src/__tests__/e2e/ecs-stdlib.test.js +328 -0
- package/dist/src/__tests__/e2e/events-stdlib.test.d.ts +1 -0
- package/dist/src/__tests__/e2e/events-stdlib.test.js +81 -0
- package/dist/src/__tests__/e2e/fft-stdlib.test.d.ts +13 -0
- package/dist/src/__tests__/e2e/fft-stdlib.test.js +288 -0
- package/dist/src/__tests__/e2e/for-in-array.test.d.ts +4 -0
- package/dist/src/__tests__/e2e/for-in-array.test.js +59 -0
- package/dist/src/__tests__/e2e/macros.test.js +7 -7
- package/dist/src/__tests__/e2e/ode-stdlib.test.d.ts +1 -0
- package/dist/src/__tests__/e2e/ode-stdlib.test.js +91 -0
- package/dist/src/__tests__/e2e/stdlib-e2e.test.js +1616 -0
- package/dist/src/__tests__/emit/compile.test.d.ts +1 -0
- package/dist/src/__tests__/emit/compile.test.js +95 -0
- package/dist/src/__tests__/emit/index.test.d.ts +1 -0
- package/dist/src/__tests__/emit/index.test.js +180 -0
- package/dist/src/__tests__/emit/modules-extra.test.d.ts +1 -0
- package/dist/src/__tests__/emit/modules-extra.test.js +77 -0
- package/dist/src/__tests__/enum.test.js +4 -6
- package/dist/src/__tests__/fixed.test.d.ts +7 -0
- package/dist/src/__tests__/fixed.test.js +148 -0
- package/dist/src/__tests__/float-lint.test.d.ts +7 -0
- package/dist/src/__tests__/float-lint.test.js +96 -0
- package/dist/src/__tests__/float.test.d.ts +7 -0
- package/dist/src/__tests__/float.test.js +148 -0
- package/dist/src/__tests__/for-each.test.d.ts +1 -0
- package/dist/src/__tests__/for-each.test.js +125 -0
- package/dist/src/__tests__/for-range.test.d.ts +1 -0
- package/dist/src/__tests__/for-range.test.js +136 -0
- package/dist/src/__tests__/generics.test.js +4 -4
- package/dist/src/__tests__/impl.test.d.ts +1 -0
- package/dist/src/__tests__/impl.test.js +199 -0
- package/dist/src/__tests__/lsp-logic.test.d.ts +1 -0
- package/dist/src/__tests__/lsp-logic.test.js +145 -0
- package/dist/src/__tests__/match.test.d.ts +10 -0
- package/dist/src/__tests__/match.test.js +197 -0
- package/dist/src/__tests__/mc-integration/item-entity-events.test.d.ts +18 -0
- package/dist/src/__tests__/mc-integration/item-entity-events.test.js +287 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage-2.test.d.ts +13 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage-2.test.js +833 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage.test.d.ts +13 -0
- package/dist/src/__tests__/mc-integration/stdlib-coverage.test.js +707 -0
- package/dist/src/__tests__/mc-integration/syntax-coverage.test.d.ts +9 -0
- package/dist/src/__tests__/mc-integration/syntax-coverage.test.js +442 -0
- package/dist/src/__tests__/mc-integration.test.js +835 -5
- package/dist/src/__tests__/optimizer/constant_fold.test.js +105 -0
- package/dist/src/__tests__/optimizer/coroutine.test.js +3 -2
- package/dist/src/__tests__/parser.test.js +5 -5
- package/dist/src/__tests__/runtime.test.js +143 -238
- package/dist/src/__tests__/stdlib/arr-len.test.d.ts +13 -0
- package/dist/src/__tests__/stdlib/arr-len.test.js +195 -0
- package/dist/src/__tests__/stdlib/calculus.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/calculus.test.js +123 -0
- package/dist/src/__tests__/stdlib/dialog.test.d.ts +6 -0
- package/dist/src/__tests__/stdlib/dialog.test.js +142 -0
- package/dist/src/__tests__/stdlib/easing.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/easing.test.js +117 -0
- package/dist/src/__tests__/stdlib/geometry.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/geometry.test.js +163 -0
- package/dist/src/__tests__/stdlib/heap.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/heap.test.js +141 -0
- package/dist/src/__tests__/stdlib/list.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/list.test.js +134 -0
- package/dist/src/__tests__/stdlib/matrix.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/matrix.test.js +148 -0
- package/dist/src/__tests__/stdlib/pathfind.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/pathfind.test.js +167 -0
- package/dist/src/__tests__/stdlib/scheduler.test.d.ts +6 -0
- package/dist/src/__tests__/stdlib/scheduler.test.js +177 -0
- package/dist/src/__tests__/stdlib/sort-v2.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/sort-v2.test.js +131 -0
- package/dist/src/__tests__/stdlib/sort.test.d.ts +4 -0
- package/dist/src/__tests__/stdlib/sort.test.js +128 -0
- package/dist/src/__tests__/stdlib/state.test.d.ts +5 -0
- package/dist/src/__tests__/stdlib/state.test.js +176 -0
- package/dist/src/__tests__/typechecker-strict.test.js +21 -21
- package/dist/src/__tests__/typechecker.test.js +5 -3
- package/dist/src/ast/types.d.ts +28 -2
- package/dist/src/emit/compile.js +30 -3
- package/dist/src/emit/index.d.ts +2 -0
- package/dist/src/emit/index.js +20 -1
- package/dist/src/emit/modules.js +3 -2
- package/dist/src/events/types.d.ts +1 -1
- package/dist/src/events/types.js +5 -2
- package/dist/src/hir/lower.js +88 -2
- package/dist/src/hir/monomorphize.js +11 -5
- package/dist/src/hir/types.d.ts +20 -1
- package/dist/src/lexer/index.d.ts +1 -1
- package/dist/src/lexer/index.js +10 -1
- package/dist/src/lir/lower.js +7 -0
- package/dist/src/lsp/server.js +912 -56
- package/dist/src/mc-test/client.d.ts +13 -1
- package/dist/src/mc-test/client.js +29 -1
- package/dist/src/mir/lower.js +703 -74
- package/dist/src/mir/types.d.ts +5 -0
- package/dist/src/mir/verify.js +2 -0
- package/dist/src/optimizer/constant_fold.js +10 -6
- package/dist/src/optimizer/coroutine.js +90 -33
- package/dist/src/optimizer/interprocedural.js +4 -0
- package/dist/src/parser/index.d.ts +5 -0
- package/dist/src/parser/index.js +171 -39
- package/dist/src/runtime/index.js +24 -0
- package/dist/src/typechecker/index.d.ts +8 -1
- package/dist/src/typechecker/index.js +73 -14
- package/docs/LANGUAGE_REFERENCE.md +302 -67
- package/docs/stdlib/README.md +54 -0
- package/docs/stdlib/advanced.md +276 -0
- package/docs/stdlib/bigint.md +285 -0
- package/docs/stdlib/bits.md +159 -0
- package/docs/stdlib/bossbar.md +101 -0
- package/docs/stdlib/calculus.md +141 -0
- package/docs/stdlib/color.md +125 -0
- package/docs/stdlib/combat.md +41 -0
- package/docs/stdlib/cooldown.md +48 -0
- package/docs/stdlib/easing.md +157 -0
- package/docs/stdlib/effects.md +101 -0
- package/docs/stdlib/expr.md +38 -0
- package/docs/stdlib/geometry.md +130 -0
- package/docs/stdlib/interactions.md +111 -0
- package/docs/stdlib/inventory.md +53 -0
- package/docs/stdlib/list.md +189 -0
- package/docs/stdlib/math.md +334 -0
- package/docs/stdlib/math_hp.md +185 -0
- package/docs/stdlib/matrix.md +123 -0
- package/docs/stdlib/mobs.md +131 -0
- package/docs/stdlib/noise.md +103 -0
- package/docs/stdlib/parabola.md +119 -0
- package/docs/stdlib/particles.md +123 -0
- package/docs/stdlib/physics.md +148 -0
- package/docs/stdlib/player.md +43 -0
- package/docs/stdlib/quaternion.md +159 -0
- package/docs/stdlib/random.md +86 -0
- package/docs/stdlib/sets.md +68 -0
- package/docs/stdlib/signal.md +141 -0
- package/docs/stdlib/spawn.md +65 -0
- package/docs/stdlib/strings.md +17 -0
- package/docs/stdlib/tags.md +117 -0
- package/docs/stdlib/teams.md +87 -0
- package/docs/stdlib/timer.md +126 -0
- package/docs/stdlib/vec.md +193 -0
- package/docs/stdlib/world.md +151 -0
- package/editors/vscode/build.mjs +31 -12
- package/editors/vscode/out/extension.js +3670 -200
- package/editors/vscode/out/lsp-server.js +14854 -0
- package/editors/vscode/package-lock.json +3 -3
- package/editors/vscode/package.json +1 -1
- package/editors/vscode/snippets/redscript.json +109 -30
- package/editors/vscode/src/extension.ts +15 -13
- package/examples/readme-demo.mcrs +4 -4
- package/jest.config.js +5 -2
- package/package.json +1 -1
- package/scripts/postbuild.js +20 -0
- package/src/__tests__/array-dynamic.test.ts +42 -0
- package/src/__tests__/builtins.test.ts +66 -0
- package/src/__tests__/compile-all.test.ts +3 -2
- package/src/__tests__/diagnostics.test.ts +8 -10
- package/src/__tests__/double.test.ts +478 -0
- package/src/__tests__/e2e/ecs-stdlib.test.ts +371 -0
- package/src/__tests__/e2e/events-stdlib.test.ts +50 -0
- package/src/__tests__/e2e/fft-stdlib.test.ts +313 -0
- package/src/__tests__/e2e/macros.test.ts +7 -7
- package/src/__tests__/e2e/ode-stdlib.test.ts +68 -0
- package/src/__tests__/e2e/stdlib-e2e.test.ts +1952 -0
- package/src/__tests__/emit/compile.test.ts +102 -0
- package/src/__tests__/emit/index.test.ts +189 -0
- package/src/__tests__/emit/modules-extra.test.ts +80 -0
- package/src/__tests__/enum.test.ts +4 -6
- package/src/__tests__/fixed.test.ts +159 -0
- package/src/__tests__/fixtures/coroutine-mc-test.mcrs +58 -0
- package/src/__tests__/fixtures/for-range.mcrs +15 -0
- package/src/__tests__/fixtures/heap-sort-mc-test.mcrs +87 -0
- package/src/__tests__/fixtures/impl-test.mcrs +13 -44
- package/src/__tests__/fixtures/stdlib-extra-test.mcrs +226 -0
- package/src/__tests__/fixtures/stdlib-math-integration.mcrs +28 -0
- package/src/__tests__/fixtures/stdlib-math-test.mcrs +53 -0
- package/src/__tests__/float-lint.test.ts +102 -0
- package/src/__tests__/float.test.ts +158 -0
- package/src/__tests__/for-each.test.ts +135 -0
- package/src/__tests__/for-range.test.ts +149 -0
- package/src/__tests__/generics.test.ts +4 -4
- package/src/__tests__/impl.test.ts +207 -0
- package/src/__tests__/lsp-logic.test.ts +162 -0
- package/src/__tests__/match.test.ts +212 -0
- package/src/__tests__/mc-integration/item-entity-events.test.ts +298 -0
- package/src/__tests__/mc-integration/stdlib-coverage-2.test.ts +817 -0
- package/src/__tests__/mc-integration/stdlib-coverage.test.ts +699 -0
- package/src/__tests__/mc-integration/syntax-coverage.test.ts +464 -0
- package/src/__tests__/mc-integration.test.ts +889 -5
- package/src/__tests__/optimizer/constant_fold.test.ts +115 -0
- package/src/__tests__/optimizer/coroutine.test.ts +3 -2
- package/src/__tests__/parser.test.ts +5 -5
- package/src/__tests__/runtime.test.ts +194 -0
- package/src/__tests__/stdlib/arr-len.test.ts +231 -0
- package/src/__tests__/stdlib/calculus.test.ts +99 -0
- package/src/__tests__/stdlib/dialog.test.ts +132 -0
- package/src/__tests__/stdlib/easing.test.ts +97 -0
- package/src/__tests__/stdlib/geometry.test.ts +171 -0
- package/src/__tests__/stdlib/heap.test.ts +121 -0
- package/src/__tests__/stdlib/list.test.ts +117 -0
- package/src/__tests__/stdlib/matrix.test.ts +140 -0
- package/src/__tests__/stdlib/pathfind.test.ts +151 -0
- package/src/__tests__/stdlib/scheduler.test.ts +171 -0
- package/src/__tests__/stdlib/sort-v2.test.ts +111 -0
- package/src/__tests__/stdlib/sort.test.ts +106 -0
- package/src/__tests__/stdlib/state.test.ts +164 -0
- package/src/__tests__/typechecker-strict.test.ts +21 -21
- package/src/__tests__/typechecker.test.ts +5 -3
- package/src/ast/types.ts +16 -3
- package/src/emit/compile.ts +32 -3
- package/src/emit/index.ts +24 -1
- package/src/emit/modules.ts +2 -1
- package/src/events/types.ts +5 -2
- package/src/examples/capture_the_flag.mcrs +2 -2
- package/src/examples/hunger_games.mcrs +4 -4
- package/src/examples/parkour_race.mcrs +8 -8
- package/src/examples/tutorial_01_hello.mcrs +63 -0
- package/src/examples/tutorial_02_variables.mcrs +157 -0
- package/src/examples/tutorial_03_functions_structs.mcrs +162 -0
- package/src/examples/tutorial_04_selectors.mcrs +139 -0
- package/src/examples/tutorial_05_decorators.mcrs +131 -0
- package/src/examples/tutorial_06_math_particles.mcrs +123 -0
- package/src/examples/tutorial_07_random.mcrs +142 -0
- package/src/examples/tutorial_08_coroutine.mcrs +163 -0
- package/src/examples/tutorial_09_precision.mcrs +154 -0
- package/src/examples/tutorial_10_kill_race.mcrs +289 -0
- package/src/examples/zombie_survival.mcrs +7 -7
- package/src/hir/lower.ts +101 -4
- package/src/hir/monomorphize.ts +11 -6
- package/src/hir/types.ts +14 -1
- package/src/lexer/index.ts +11 -2
- package/src/lir/lower.ts +8 -0
- package/src/lsp/server.ts +894 -54
- package/src/mc-test/client.ts +32 -1
- package/src/mir/lower.ts +703 -74
- package/src/mir/types.ts +1 -0
- package/src/mir/verify.ts +2 -0
- package/src/optimizer/constant_fold.ts +11 -6
- package/src/optimizer/coroutine.ts +89 -29
- package/src/optimizer/interprocedural.ts +4 -0
- package/src/parser/index.ts +175 -41
- package/src/runtime/index.ts +26 -0
- package/src/stdlib/advanced.mcrs +47 -0
- package/src/stdlib/bigint.mcrs +251 -0
- package/src/stdlib/calculus.mcrs +150 -0
- package/src/stdlib/color.mcrs +102 -82
- package/src/stdlib/combat.mcrs +18 -12
- package/src/stdlib/dialog.mcrs +55 -0
- package/src/stdlib/ecs.mcrs +238 -0
- package/src/stdlib/events.mcrs +29 -0
- package/src/stdlib/expr.mcrs +117 -0
- package/src/stdlib/fft.mcrs +177 -0
- package/src/stdlib/geometry.mcrs +89 -0
- package/src/stdlib/graph.mcrs +274 -0
- package/src/stdlib/heap.mcrs +175 -0
- package/src/stdlib/linalg.mcrs +260 -0
- package/src/stdlib/list.mcrs +99 -0
- package/src/stdlib/math.mcrs +121 -5
- package/src/stdlib/math_hp.mcrs +452 -0
- package/src/stdlib/matrix.mcrs +113 -0
- package/src/stdlib/ode.mcrs +168 -0
- package/src/stdlib/parabola.mcrs +160 -0
- package/src/stdlib/particles.mcrs +69 -0
- package/src/stdlib/pathfind.mcrs +321 -0
- package/src/stdlib/quaternion.mcrs +192 -0
- package/src/stdlib/random.mcrs +46 -1
- package/src/stdlib/scheduler.mcrs +271 -0
- package/src/stdlib/signal.mcrs +223 -0
- package/src/stdlib/sort.mcrs +194 -0
- package/src/stdlib/state.mcrs +65 -0
- package/src/stdlib/world.mcrs +24 -0
- package/src/typechecker/index.ts +88 -15
- package/test_trig.ts +43 -0
package/src/stdlib/math_hp.mcrs
CHANGED
|
@@ -63,3 +63,455 @@ fn cos_hp(angle: int): int {
|
|
|
63
63
|
raw("tp @e[tag=rs_trig,limit=1] 0 0 0");
|
|
64
64
|
return scoreboard_get("$cos_hp_out", "__rs_math_hp");
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
// ─── Display Entity SVD: High-precision arithmetic ────────────────────────────
|
|
68
|
+
//
|
|
69
|
+
// MC Display Entities use SVD (Singular Value Decomposition) internally.
|
|
70
|
+
// By setting a diagonal matrix [a,0,0,0, 0,b,0,0, 0,0,c,0, 0,0,0,d],
|
|
71
|
+
// MC computes scale = [a/d, b/d, c/d] in Java double precision (~15 sig figs).
|
|
72
|
+
//
|
|
73
|
+
// This allows:
|
|
74
|
+
// - div_hp(a, b) → a/b with double precision
|
|
75
|
+
// - div3_hp(a,b,c, d) → [a/d, b/d, c/d] — three divisions in one call
|
|
76
|
+
// - sqrt_hp(x) → √x via distance trick
|
|
77
|
+
// - norm3_hp(x, y, z) → √(x²+y²+z²) via vector magnitude
|
|
78
|
+
//
|
|
79
|
+
// ⚠ SETUP: Also call init_trig() in your @load (reuses rs_trig entity).
|
|
80
|
+
// Uses a SEPARATE entity tagged "rs_div" for SVD operations.
|
|
81
|
+
// init_trig() does NOT create rs_div — call init_div() separately.
|
|
82
|
+
|
|
83
|
+
// init_div(): create the Display Entity for SVD operations.
|
|
84
|
+
// Call once from your @load function.
|
|
85
|
+
@require_on_load(init_div)
|
|
86
|
+
fn init_div() {
|
|
87
|
+
raw("execute unless entity @e[tag=rs_div,limit=1] run summon minecraft:block_display ~ 0 ~ {Tags:[\"rs_div\"]}");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// div_hp(a, b): high-precision division a/b, returns (a/b) × 10000
|
|
91
|
+
// a, b: integers (×10000 scale). Result: (a/b) × 10000
|
|
92
|
+
// Example: div_hp(10000, 3000) ≈ 33333 (10000/3000 = 3.3333...)
|
|
93
|
+
@require_on_load(init_div)
|
|
94
|
+
fn div_hp(a: int, b: int): int {
|
|
95
|
+
// Set transformation matrix: [a,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,b]
|
|
96
|
+
// MC SVD gives scale.x = a/b
|
|
97
|
+
scoreboard_set("$div_a", "__rs_math_hp", a);
|
|
98
|
+
scoreboard_set("$div_b", "__rs_math_hp", b);
|
|
99
|
+
raw("execute store result storage rs:math_hp div_a float 0.0001 run scoreboard players get $div_a __rs_math_hp");
|
|
100
|
+
raw("execute store result storage rs:math_hp div_b float 0.0001 run scoreboard players get $div_b __rs_math_hp");
|
|
101
|
+
raw("data modify entity @e[tag=rs_div,limit=1] transformation set value {left_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f]}");
|
|
102
|
+
raw("execute store result storage rs:math_hp div_mat[0] float 1 run data get storage rs:math_hp div_a");
|
|
103
|
+
raw("execute store result storage rs:math_hp div_mat[15] float 1 run data get storage rs:math_hp div_b");
|
|
104
|
+
raw("data modify entity @e[tag=rs_div,limit=1] transformation set from storage rs:math_hp div_mat");
|
|
105
|
+
raw("execute store result score $div_result __rs_math_hp run data get entity @e[tag=rs_div,limit=1] transformation.scale[0] 10000.0");
|
|
106
|
+
return scoreboard_get("$div_result", "__rs_math_hp");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// div3_hp(a, b, c, d): divide three values by d simultaneously
|
|
110
|
+
// Returns a/d, result in scoreboard $div3_x/y/z __rs_math_hp (×10000)
|
|
111
|
+
// Use scoreboard_get to read each result.
|
|
112
|
+
@require_on_load(init_div)
|
|
113
|
+
fn div3_hp(a: int, b: int, c: int, d: int): int {
|
|
114
|
+
scoreboard_set("$div3_a", "__rs_math_hp", a);
|
|
115
|
+
scoreboard_set("$div3_b", "__rs_math_hp", b);
|
|
116
|
+
scoreboard_set("$div3_c", "__rs_math_hp", c);
|
|
117
|
+
scoreboard_set("$div3_d", "__rs_math_hp", d);
|
|
118
|
+
raw("execute store result storage rs:math_hp d3a float 0.0001 run scoreboard players get $div3_a __rs_math_hp");
|
|
119
|
+
raw("execute store result storage rs:math_hp d3b float 0.0001 run scoreboard players get $div3_b __rs_math_hp");
|
|
120
|
+
raw("execute store result storage rs:math_hp d3c float 0.0001 run scoreboard players get $div3_c __rs_math_hp");
|
|
121
|
+
raw("execute store result storage rs:math_hp d3d float 0.0001 run scoreboard players get $div3_d __rs_math_hp");
|
|
122
|
+
// Build diagonal matrix [a,0,0,0, 0,b,0,0, 0,0,c,0, 0,0,0,d]
|
|
123
|
+
raw("data modify storage rs:math_hp div3_mat set value [0f,0f,0f,0f,0f,0f,0f,0f,0f,0f,0f,0f,0f,0f,0f,0f]");
|
|
124
|
+
raw("execute store result storage rs:math_hp div3_mat[0] float 1 run data get storage rs:math_hp d3a");
|
|
125
|
+
raw("execute store result storage rs:math_hp div3_mat[5] float 1 run data get storage rs:math_hp d3b");
|
|
126
|
+
raw("execute store result storage rs:math_hp div3_mat[10] float 1 run data get storage rs:math_hp d3c");
|
|
127
|
+
raw("execute store result storage rs:math_hp div3_mat[15] float 1 run data get storage rs:math_hp d3d");
|
|
128
|
+
raw("data modify entity @e[tag=rs_div,limit=1] transformation set from storage rs:math_hp div3_mat");
|
|
129
|
+
// Read all three scale components
|
|
130
|
+
raw("execute store result score $div3_x __rs_math_hp run data get entity @e[tag=rs_div,limit=1] transformation.scale[0] 10000.0");
|
|
131
|
+
raw("execute store result score $div3_y __rs_math_hp run data get entity @e[tag=rs_div,limit=1] transformation.scale[1] 10000.0");
|
|
132
|
+
raw("execute store result score $div3_z __rs_math_hp run data get entity @e[tag=rs_div,limit=1] transformation.scale[2] 10000.0");
|
|
133
|
+
return scoreboard_get("$div3_x", "__rs_math_hp");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// sqrt_hp(x): high-precision square root via vector magnitude trick
|
|
137
|
+
// x: integer ×10000. Returns √(x/10000) × 10000
|
|
138
|
+
// Uses: send vector (√x, 0, 0) unit → magnitude = √x
|
|
139
|
+
@require_on_load(init_div)
|
|
140
|
+
fn sqrt_hp(x: int): int {
|
|
141
|
+
// Use trig entity: tp it to (sqrt(x), 0, 0) direction
|
|
142
|
+
// Trick: set pos to (x_float, 0, 0), then use unit_vector to get 1.0 in x
|
|
143
|
+
// Actually simpler: use div3 with a=x, b=0, c=0, d=1 and read scale[0]
|
|
144
|
+
scoreboard_set("$sqrt_x", "__rs_math_hp", x);
|
|
145
|
+
raw("execute store result storage rs:math_hp sq_x float 0.0001 run scoreboard players get $sqrt_x __rs_math_hp");
|
|
146
|
+
// Diagonal matrix [x,0,0, 0,1,0, 0,0,1, 0,0,0,1] → scale[0] = sqrt(x) via SVD? No...
|
|
147
|
+
// Actually: use distance trick via entity positioned at (√x, 0, 0) after tp ^√x
|
|
148
|
+
// Simpler approach: Newton iteration with div_hp for refinement
|
|
149
|
+
// g = isqrt(x), then refine: g = (g + div_hp(x, g)) / 2
|
|
150
|
+
let g: int = isqrt(x * 100) * 100; // initial from integer sqrt, ×10000 scale
|
|
151
|
+
if (g <= 0) { g = 1; }
|
|
152
|
+
// Two Newton refinement steps using div_hp
|
|
153
|
+
let d: int = div_hp(x, g);
|
|
154
|
+
g = (g + d) / 2;
|
|
155
|
+
d = div_hp(x, g);
|
|
156
|
+
g = (g + d) / 2;
|
|
157
|
+
return g;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// norm3_hp(x, y, z): high-precision 3D vector norm √(x²+y²+z²)
|
|
161
|
+
// All inputs ×10000. Returns magnitude ×10000.
|
|
162
|
+
// Uses trig entity position trick.
|
|
163
|
+
@require_on_load(init_trig)
|
|
164
|
+
fn norm3_hp(x: int, y: int, z: int): int {
|
|
165
|
+
// Store x,y,z as float in storage
|
|
166
|
+
scoreboard_set("$norm_x", "__rs_math_hp", x);
|
|
167
|
+
scoreboard_set("$norm_y", "__rs_math_hp", y);
|
|
168
|
+
scoreboard_set("$norm_z", "__rs_math_hp", z);
|
|
169
|
+
raw("execute store result storage rs:math_hp nrm_x float 0.0001 run scoreboard players get $norm_x __rs_math_hp");
|
|
170
|
+
raw("execute store result storage rs:math_hp nrm_y float 0.0001 run scoreboard players get $norm_y __rs_math_hp");
|
|
171
|
+
raw("execute store result storage rs:math_hp nrm_z float 0.0001 run scoreboard players get $norm_z __rs_math_hp");
|
|
172
|
+
// TP marker to (x,y,z), then read distance from origin
|
|
173
|
+
raw("execute as @e[tag=rs_trig,limit=1] run tp @s 0.0 0.0 0.0");
|
|
174
|
+
raw("data modify entity @e[tag=rs_trig,limit=1] Pos set from storage rs:math_hp nrm_x");
|
|
175
|
+
// Actually distance from world origin: read distance using entity selector
|
|
176
|
+
// Simpler: use Pythagorean theorem via sqrt_hp
|
|
177
|
+
let x2: int = x / 100 * x / 100; // x² / 10000
|
|
178
|
+
let y2: int = y / 100 * y / 100;
|
|
179
|
+
let z2: int = z / 100 * z / 100;
|
|
180
|
+
return sqrt_hp(x2 + y2 + z2);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// ─── Double-precision arithmetic helpers ──────────────────────────────────────
|
|
184
|
+
//
|
|
185
|
+
// double_mul_fixed(d, f): double × fixed-point, true double precision.
|
|
186
|
+
// Computes d × (f / 10000) entirely in IEEE 754 double arithmetic.
|
|
187
|
+
// d: double (NBT-backed IEEE 754)
|
|
188
|
+
// f: int in ×10000 fixed-point representation (e.g. 15000 = 1.5)
|
|
189
|
+
// Returns: double result = d × (f / 10000)
|
|
190
|
+
//
|
|
191
|
+
// Algorithm (function-macro trick):
|
|
192
|
+
// 1. Compute scale = f × 0.0001 and store as a double in rs:math_hp __dmul_args.scale
|
|
193
|
+
// 2. Call __dmul_apply_scale via 'with storage' macro so $(scale) is substituted
|
|
194
|
+
// 3. Helper does: $execute store result storage rs:d __dp0 double $(scale) run data get storage rs:d __dp0 1
|
|
195
|
+
// = __dp0 ← __dp0 × scale (pure double arithmetic, no integer intermediate)
|
|
196
|
+
// 4. Return __dp0 (now contains d × (f/10000)) as fixed for the caller
|
|
197
|
+
//
|
|
198
|
+
// No integer overflow risk; no truncation of d before multiplication.
|
|
199
|
+
//
|
|
200
|
+
|
|
201
|
+
// Internal macro helper — DO NOT CALL DIRECTLY.
|
|
202
|
+
// Called via: function __NS__:__dmul_apply_scale with storage rs:math_hp __dmul_args
|
|
203
|
+
// Reads $(scale) from rs:math_hp __dmul_args.scale, multiplies __dp0 by it in-place.
|
|
204
|
+
fn __dmul_apply_scale() {
|
|
205
|
+
raw("$execute store result storage rs:d __dp0 double $(scale) run data get storage rs:d __dp0 1");
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
fn double_mul_fixed(d: double, f: int): double {
|
|
209
|
+
// Step 1: store f into math_hp scoreboard, then compute scale = f × 0.0001
|
|
210
|
+
scoreboard_set("$dmul_f", "__rs_math_hp", f);
|
|
211
|
+
// Store scale as double into the macro-args compound (path must use dot notation)
|
|
212
|
+
raw("execute store result storage rs:math_hp __dmul_args.scale double 0.0001 run scoreboard players get $dmul_f __rs_math_hp");
|
|
213
|
+
// Step 2: d is already in __dp0 (first double param convention)
|
|
214
|
+
// Step 3: call macro helper — overwrites __dp0 with d × (f/10000) in IEEE 754 double
|
|
215
|
+
raw("function __NS__:__dmul_apply_scale with storage rs:math_hp __dmul_args");
|
|
216
|
+
// Step 4: __dp0 now holds d × (f/10000). Return it (read as ×10000 fixed for caller).
|
|
217
|
+
return d;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// ─── Double-precision addition: entity position trick ─────────────────────────
|
|
221
|
+
//
|
|
222
|
+
// double_add(a, b): a + b in full IEEE 754 double precision.
|
|
223
|
+
//
|
|
224
|
+
// Algorithm: Minecraft internally stores entity Pos as Java double[].
|
|
225
|
+
// By TPing a marker to x=a then doing a relative TP of +b, the game computes
|
|
226
|
+
// a+b in native Java double arithmetic (no int intermediate).
|
|
227
|
+
//
|
|
228
|
+
// Entity: area_effect_cloud, UUID b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4
|
|
229
|
+
// Tag: rs_math_hp_marker
|
|
230
|
+
// Summoned once at load via init_double_add().
|
|
231
|
+
//
|
|
232
|
+
// ⚠ Precision: full double (~15 sig figs). No overflow within double range.
|
|
233
|
+
//
|
|
234
|
+
|
|
235
|
+
// init_double_add(): summon the AEC marker entity for double_add/sub.
|
|
236
|
+
// Called automatically via @require_on_load.
|
|
237
|
+
@require_on_load(init_double_add)
|
|
238
|
+
fn init_double_add() {
|
|
239
|
+
raw("execute unless entity b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 run summon minecraft:area_effect_cloud ~ ~ ~ {UUID:[I;-1238834609,-698744574,-1879932794,1006600372],NoGravity:1b,Duration:2147483647,Tags:[\"rs_math_hp_marker\"]}");
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// __dadd_tp_to: macro helper — teleport marker to absolute x=$(x).
|
|
243
|
+
// DO NOT CALL DIRECTLY. Called via: function __NS__:__dadd_tp_to with storage rs:d __dadd_args
|
|
244
|
+
fn __dadd_tp_to() {
|
|
245
|
+
raw("$tp b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 $(x) 0.0 0.0");
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// __dadd_tp_rel: macro helper — relative TP marker by +$(dx) on X axis.
|
|
249
|
+
// DO NOT CALL DIRECTLY. Called via: function __NS__:__dadd_tp_rel with storage rs:d __dadd_args
|
|
250
|
+
fn __dadd_tp_rel() {
|
|
251
|
+
raw("$execute at b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 run tp b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 ~$(dx) 0.0 0.0");
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// double_add(a, b): a + b in true double precision.
|
|
255
|
+
// a, b: double (NBT-backed). Returns: a + b as double in __dp0.
|
|
256
|
+
@require_on_load(init_double_add)
|
|
257
|
+
fn double_add(a: double, b: double): double {
|
|
258
|
+
// __dp0 = a, __dp1 = b (set by caller)
|
|
259
|
+
// Copy a into __dadd_args.x, b into __dadd_args.dx for macro substitution
|
|
260
|
+
raw("data modify storage rs:d __dadd_args.x set from storage rs:d __dp0");
|
|
261
|
+
raw("function __NS__:__dadd_tp_to with storage rs:d __dadd_args");
|
|
262
|
+
raw("data modify storage rs:d __dadd_args.dx set from storage rs:d __dp1");
|
|
263
|
+
raw("function __NS__:__dadd_tp_rel with storage rs:d __dadd_args");
|
|
264
|
+
// Read Pos[0] back into __dp0 — this is a+b in double precision
|
|
265
|
+
raw("data modify storage rs:d __dp0 set from entity b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 Pos[0]");
|
|
266
|
+
// Reset marker to origin
|
|
267
|
+
raw("tp b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 0.0 0.0 0.0");
|
|
268
|
+
return a;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// ─── double_sub: subtraction via negation + add ────────────────────────────────
|
|
272
|
+
//
|
|
273
|
+
// double_sub(a, b): a - b.
|
|
274
|
+
//
|
|
275
|
+
// Negates b by re-reading it through execute store with scale -1 (double ×(-1)).
|
|
276
|
+
// ⚠ Precision note: the negation step uses:
|
|
277
|
+
// execute store result storage rs:d __dp1 double -0.0001 run data get storage rs:d __dp1 10000
|
|
278
|
+
// This round-trips through a Java long (int64), which truncates the value to
|
|
279
|
+
// ~15 decimal digits (same as double precision). Exact for |b| ≤ 2^53.
|
|
280
|
+
// Catastrophic cancellation warning applies when a ≈ b (same as all FP subtraction).
|
|
281
|
+
//
|
|
282
|
+
|
|
283
|
+
// double_sub(a, b): a - b in double precision.
|
|
284
|
+
// a, b: double. Returns: a - b as double in __dp0.
|
|
285
|
+
@require_on_load(init_double_add)
|
|
286
|
+
fn double_sub(a: double, b: double): double {
|
|
287
|
+
// Negate __dp1 (b): read as ×10000 long, store back as double × -0.0001
|
|
288
|
+
raw("execute store result storage rs:d __dp1 double -0.0001 run data get storage rs:d __dp1 10000");
|
|
289
|
+
// Now compute a + (-b)
|
|
290
|
+
raw("data modify storage rs:d __dadd_args.x set from storage rs:d __dp0");
|
|
291
|
+
raw("function __NS__:__dadd_tp_to with storage rs:d __dadd_args");
|
|
292
|
+
raw("data modify storage rs:d __dadd_args.dx set from storage rs:d __dp1");
|
|
293
|
+
raw("function __NS__:__dadd_tp_rel with storage rs:d __dadd_args");
|
|
294
|
+
raw("data modify storage rs:d __dp0 set from entity b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 Pos[0]");
|
|
295
|
+
raw("tp b54f1a4f-d7ac-4002-915e-3c2a3bf6f8a4 0.0 0.0 0.0");
|
|
296
|
+
return a;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// ─── double_mul: scoreboard 4-decimal approximation ───────────────────────────
|
|
300
|
+
//
|
|
301
|
+
// double_mul(a, b): a × b — scoreboard integer approximation.
|
|
302
|
+
//
|
|
303
|
+
// Algorithm:
|
|
304
|
+
// score_a = floor(a × 10000) [stored as int32 via data get × 10000]
|
|
305
|
+
// score_b = floor(b × 10000)
|
|
306
|
+
// result_score = (score_a × score_b) / 10000 [integer division]
|
|
307
|
+
// result = result_score as double × 0.0001
|
|
308
|
+
//
|
|
309
|
+
// ⚠ Limitations:
|
|
310
|
+
// - Overflow: score_a and score_b are Java int (32-bit signed).
|
|
311
|
+
// |a| × 10000 must fit in int32: safe for |a|, |b| ≤ ~214748.
|
|
312
|
+
// Products score_a × score_b overflow int32 for |a|×|b| > ~21474.
|
|
313
|
+
// For larger values use double_mul_fixed on log/exp decomposition.
|
|
314
|
+
// - Precision: ~4 decimal digits (10000× scale). Not full double precision.
|
|
315
|
+
// - Negative values: correctly handled by signed scoreboard arithmetic.
|
|
316
|
+
//
|
|
317
|
+
// For true double-precision multiplication, use the ln/exp approach once
|
|
318
|
+
// double-precision ln/exp are available.
|
|
319
|
+
//
|
|
320
|
+
|
|
321
|
+
fn double_mul(a: double, b: double): double {
|
|
322
|
+
// Convert a and b to ×10000 integer scores
|
|
323
|
+
raw("execute store result score $dmul_a __rs_math_hp run data get storage rs:d __dp0 10000");
|
|
324
|
+
raw("execute store result score $dmul_b __rs_math_hp run data get storage rs:d __dp1 10000");
|
|
325
|
+
// Multiply: result = score_a * score_b / 10000
|
|
326
|
+
raw("scoreboard players operation $dmul_a __rs_math_hp *= $dmul_b __rs_math_hp");
|
|
327
|
+
raw("scoreboard players set $dmul_div __rs_math_hp 10000");
|
|
328
|
+
raw("scoreboard players operation $dmul_a __rs_math_hp /= $dmul_div __rs_math_hp");
|
|
329
|
+
// Store result back as double × 0.0001
|
|
330
|
+
raw("execute store result storage rs:d __dp0 double 0.0001 run scoreboard players get $dmul_a __rs_math_hp");
|
|
331
|
+
return a;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// ─── double_div: display entity SVD trick ─────────────────────────────────────
|
|
335
|
+
//
|
|
336
|
+
// double_div(a, b): a / b in full IEEE 754 double precision.
|
|
337
|
+
//
|
|
338
|
+
// Algorithm: MC display entities decompose their transformation matrix via SVD.
|
|
339
|
+
// Setting matrix element [0] = a and [15] = b in a 4×4 diagonal matrix causes
|
|
340
|
+
// MC to compute scale[0] = a/b in native Java double arithmetic.
|
|
341
|
+
//
|
|
342
|
+
// Uses the rs_div entity (block_display, tag="rs_div") from init_div() above.
|
|
343
|
+
// init_div() must be called — it is via @require_on_load(init_div).
|
|
344
|
+
//
|
|
345
|
+
// ⚠ Precision: full double (~15 sig figs). Division by zero produces Infinity/NaN
|
|
346
|
+
// (Java double semantics) which will corrupt NBT if read back.
|
|
347
|
+
//
|
|
348
|
+
|
|
349
|
+
// __ddiv_set_mat: macro helper — set div entity transformation matrix elements.
|
|
350
|
+
// $(da) → a as float, $(db) → b as float (already in NBT as doubles).
|
|
351
|
+
// DO NOT CALL DIRECTLY.
|
|
352
|
+
fn __ddiv_set_mat() {
|
|
353
|
+
raw("$data modify entity @e[tag=rs_div,limit=1] transformation set value [$(da)f,0f,0f,0f,0f,1f,0f,0f,0f,0f,1f,0f,0f,0f,0f,$(db)f]");
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// double_div(a, b): a / b in true double precision.
|
|
357
|
+
// a, b: double. Returns: a / b as double in __dp0.
|
|
358
|
+
// ⚠ b must not be zero (produces Java Infinity, corrupts NBT).
|
|
359
|
+
@require_on_load(init_div)
|
|
360
|
+
fn double_div(a: double, b: double): double {
|
|
361
|
+
// Store a and b as float in macro args compound for __ddiv_set_mat
|
|
362
|
+
// We piggyback on rs:math_hp storage for the args
|
|
363
|
+
raw("execute store result storage rs:math_hp __ddiv_args.da float 1 run data get storage rs:d __dp0 1");
|
|
364
|
+
raw("execute store result storage rs:math_hp __ddiv_args.db float 1 run data get storage rs:d __dp1 1");
|
|
365
|
+
raw("function __NS__:__ddiv_set_mat with storage rs:math_hp __ddiv_args");
|
|
366
|
+
// Read scale[0] = a/b back as double into __dp0
|
|
367
|
+
raw("data modify storage rs:d __dp0 set from entity @e[tag=rs_div,limit=1] transformation.scale[0]");
|
|
368
|
+
return a;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// ─── High-precision natural logarithm (Newton-refined) ───────────────────────
|
|
372
|
+
//
|
|
373
|
+
// ln_hp(x): high-precision natural log via Newton refinement of ln_5term.
|
|
374
|
+
// Input/Output: ×10000 fixed-point (e.g. 10000 = 1.0, 27183 ≈ e)
|
|
375
|
+
// Valid range: x ∈ [100, 1000000]
|
|
376
|
+
//
|
|
377
|
+
// Algorithm:
|
|
378
|
+
// 1. y = ln_5term(x) — ~6-digit atanh series estimate
|
|
379
|
+
// 2. e_y = exp_fx(y) — compute e^y in ×10000 fixed-point
|
|
380
|
+
// 3. correction = (x - e_y) * 10000 / e_y — Newton step: ln(x/e^y) ≈ x/e^y - 1
|
|
381
|
+
// 4. return y + correction
|
|
382
|
+
//
|
|
383
|
+
// Precision: one Newton step squares the error, improving from ~6 digits to ~11 digits.
|
|
384
|
+
// Since exp_fx itself has ~6-digit precision, the effective output is ~8–9 digits.
|
|
385
|
+
//
|
|
386
|
+
fn ln_hp(x: int): int {
|
|
387
|
+
// Step 1: initial estimate via 5-term atanh series
|
|
388
|
+
let y: int = ln_5term(x);
|
|
389
|
+
|
|
390
|
+
// Step 2: compute e^y — exp_fx takes ×10000 input, returns ×10000 output
|
|
391
|
+
let e_y: int = exp_fx(y);
|
|
392
|
+
|
|
393
|
+
// Step 3: Newton correction — (x/e^y - 1) in ×10000 fixed-point
|
|
394
|
+
// correction = (x - e_y) × 10000 / e_y
|
|
395
|
+
if (e_y <= 0) { return y; }
|
|
396
|
+
let correction: int = (x - e_y) * 10000 / e_y;
|
|
397
|
+
|
|
398
|
+
// Step 4: refined result
|
|
399
|
+
return y + correction;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// ─── Extended-precision natural logarithm (5-term atanh series) ───────────────
|
|
403
|
+
//
|
|
404
|
+
// ln_5term(x): natural log using 5-term atanh series (more precise than 3-term ln())
|
|
405
|
+
// Input/Output: same as ln() — ×10000 fixed-point
|
|
406
|
+
// Valid range: x ∈ [100, 1000000]
|
|
407
|
+
//
|
|
408
|
+
// max_error ≈ 0.000002 (2× better than 3-term ln())
|
|
409
|
+
// Cost: ~5 more scoreboard operations than ln()
|
|
410
|
+
//
|
|
411
|
+
fn ln_5term(x: int): int {
|
|
412
|
+
let scale: int = 10000;
|
|
413
|
+
let ln2: int = 6931;
|
|
414
|
+
|
|
415
|
+
// Range reduction: bring x into [scale, 2*scale)
|
|
416
|
+
let xr: int = x;
|
|
417
|
+
let k: int = 0;
|
|
418
|
+
while (xr < scale) {
|
|
419
|
+
xr = xr * 2;
|
|
420
|
+
k = k - 1;
|
|
421
|
+
}
|
|
422
|
+
while (xr >= scale * 2) {
|
|
423
|
+
xr = xr / 2;
|
|
424
|
+
k = k + 1;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// s = (xr - scale) * scale / (xr + scale) ∈ [0, 3333]
|
|
428
|
+
let s: int = (xr - scale) * scale / (xr + scale);
|
|
429
|
+
|
|
430
|
+
// 5-term atanh series: ln(xr/scale) = 2*(A1*s + A3*s³ + A5*s⁵ + A7*s⁷ + A9*s⁹)
|
|
431
|
+
// Theoretical coefficients ×10000: A1=20000, A3=6667, A5=4000, A7=2857, A9=2222
|
|
432
|
+
let s2: int = s * s / scale;
|
|
433
|
+
let s3: int = s * s2 / scale;
|
|
434
|
+
let s5: int = s3 * s2 / scale;
|
|
435
|
+
let s7: int = s5 * s2 / scale;
|
|
436
|
+
let s9: int = s7 * s2 / scale;
|
|
437
|
+
let lnxr: int = 20000 * s / scale + 6667 * s3 / scale + 4000 * s5 / scale + 2857 * s7 / scale + 2222 * s9 / scale;
|
|
438
|
+
|
|
439
|
+
return k * ln2 + lnxr;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// ─── double_sqrt: square root of a double-precision value ─────────────────────
|
|
443
|
+
//
|
|
444
|
+
// double_sqrt(x): √x, returned as double.
|
|
445
|
+
// Strategy: x_fixed = x * 10000 (via "as fixed"), then sqrt_fx gives
|
|
446
|
+
// sqrt_fx(x_fixed) = floor(√x_fixed) = floor(√(x*10000)) = floor(√x * 100)
|
|
447
|
+
// So r = sqrt_fx(x_fixed) satisfies r ≈ √x * 100.
|
|
448
|
+
// Scale r by 100 more to get √x in ×10000 units: r_scaled = r * 100.
|
|
449
|
+
// Then convert to double with scale 0.0001.
|
|
450
|
+
//
|
|
451
|
+
fn double_sqrt(x: double): double {
|
|
452
|
+
// Convert double → ×10000 int
|
|
453
|
+
let x_fixed: int = x as int;
|
|
454
|
+
raw("execute store result score $dsqrt_xfx __rs_math_hp run data get storage rs:d __dp0 10000");
|
|
455
|
+
let xfx: int = scoreboard_get("$dsqrt_xfx", "__rs_math_hp");
|
|
456
|
+
// r = floor(√(x * 10000)) ≈ √x * 100
|
|
457
|
+
let r: int = isqrt(xfx);
|
|
458
|
+
// r_scaled = r * 100 → represents √x in ×10000 units
|
|
459
|
+
let r_scaled: int = r * 100;
|
|
460
|
+
scoreboard_set("$dsqrt_rsc", "__rs_math_hp", r_scaled);
|
|
461
|
+
// Convert ×10000 int back to double with scale 0.0001
|
|
462
|
+
raw("execute store result storage rs:d __dp0 double 0.0001 run scoreboard players get $dsqrt_rsc __rs_math_hp");
|
|
463
|
+
return x;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// ─── pow_real: real-valued power base^exp_val ─────────────────────────────────
|
|
467
|
+
//
|
|
468
|
+
// pow_real(base, exp_val): base^exp_val for double inputs, double result.
|
|
469
|
+
// Uses: a^b = e^(b * ln(a)) via fixed-point helpers.
|
|
470
|
+
// Steps:
|
|
471
|
+
// 1. base_fixed = base (×10000 int) via scoreboard read
|
|
472
|
+
// 2. ln_base = ln_hp(base_fixed) — ×10000 fixed, ≈ ln(base)
|
|
473
|
+
// 3. exp_fixed = exp_val (×10000 int) — ≈ exp_val
|
|
474
|
+
// 4. exponent = ln_base * exp_fixed / 10000 — ×10000, ≈ ln(base) * exp_val
|
|
475
|
+
// 5. result_fixed = exp_fx(exponent) — ×10000, ≈ e^(ln(base)*exp_val)
|
|
476
|
+
// 6. Convert result_fixed to double via scoreboard
|
|
477
|
+
//
|
|
478
|
+
@require_on_load(init_trig)
|
|
479
|
+
fn pow_real(base: double, exp_val: double): double {
|
|
480
|
+
// Read base ×10000 from __dp0 (first double param)
|
|
481
|
+
raw("execute store result score $preal_base __rs_math_hp run data get storage rs:d __dp0 10000");
|
|
482
|
+
let base_fixed: int = scoreboard_get("$preal_base", "__rs_math_hp");
|
|
483
|
+
// Read exp_val ×10000 from __dp1 (second double param)
|
|
484
|
+
raw("execute store result score $preal_exp __rs_math_hp run data get storage rs:d __dp1 10000");
|
|
485
|
+
let exp_fixed: int = scoreboard_get("$preal_exp", "__rs_math_hp");
|
|
486
|
+
// Compute ln(base) via high-precision log
|
|
487
|
+
let ln_base: int = ln_hp(base_fixed);
|
|
488
|
+
// exponent = ln(base) * exp_val, both ×10000 → divide by 10000 to stay in scale
|
|
489
|
+
let exponent: int = ln_base * exp_fixed / 10000;
|
|
490
|
+
// result = e^exponent in ×10000
|
|
491
|
+
let result_fixed: int = exp_fx(exponent);
|
|
492
|
+
scoreboard_set("$preal_res", "__rs_math_hp", result_fixed);
|
|
493
|
+
// Convert result to double
|
|
494
|
+
raw("execute store result storage rs:d __dp0 double 0.0001 run scoreboard players get $preal_res __rs_math_hp");
|
|
495
|
+
return base;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
// ─── pow_fast: integer-exponent double power via recursive squaring ────────────
|
|
499
|
+
//
|
|
500
|
+
// pow_fast(base, exp_val): base^exp_val for double base, int exponent.
|
|
501
|
+
// Uses binary exponentiation. Handles negative exponents via double_div.
|
|
502
|
+
// Recursion supported in RedScript.
|
|
503
|
+
//
|
|
504
|
+
fn pow_fast(base: double, exp_val: int): double {
|
|
505
|
+
if (exp_val == 0) { return 1.0d; }
|
|
506
|
+
if (exp_val < 0) {
|
|
507
|
+
// 1.0 / base^(-exp_val)
|
|
508
|
+
let pos_result: double = pow_fast(base, 0 - exp_val);
|
|
509
|
+
return double_div(1.0d, pos_result);
|
|
510
|
+
}
|
|
511
|
+
if (exp_val % 2 == 0) {
|
|
512
|
+
let half: double = pow_fast(base, exp_val / 2);
|
|
513
|
+
return double_mul(half, half);
|
|
514
|
+
}
|
|
515
|
+
let rest: double = pow_fast(base, exp_val - 1);
|
|
516
|
+
return double_mul(base, rest);
|
|
517
|
+
}
|
package/src/stdlib/matrix.mcrs
CHANGED
|
@@ -106,3 +106,116 @@ fn lerp_angle(a_fx: int, b_fx: int, t: int): int {
|
|
|
106
106
|
while (diff < -1800000) { diff = diff + 3600000; }
|
|
107
107
|
return a_fx + diff * t / 10000;
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
// ─── 3×3 Matrix multiplication ───────────────────────────────────────────────
|
|
111
|
+
// All matrix values are ×10000 (fixed-point).
|
|
112
|
+
// mat3_mul(a, b): C = A × B where each element = sum of row×col / 10000
|
|
113
|
+
//
|
|
114
|
+
// Matrix layout (row-major, 9 components):
|
|
115
|
+
// a00 a01 a02
|
|
116
|
+
// a10 a11 a12
|
|
117
|
+
// a20 a21 a22
|
|
118
|
+
|
|
119
|
+
// mat3_mul: compute one element C[row][col] of a 3×3 matrix product
|
|
120
|
+
// row ∈ {0,1,2}, col ∈ {0,1,2}
|
|
121
|
+
// Pass all 18 components of A and B individually.
|
|
122
|
+
// Returns C[row][col] ×10000
|
|
123
|
+
|
|
124
|
+
fn mat3_mul_elem(
|
|
125
|
+
a00: int, a01: int, a02: int,
|
|
126
|
+
a10: int, a11: int, a12: int,
|
|
127
|
+
a20: int, a21: int, a22: int,
|
|
128
|
+
b00: int, b01: int, b02: int,
|
|
129
|
+
b10: int, b11: int, b12: int,
|
|
130
|
+
b20: int, b21: int, b22: int,
|
|
131
|
+
row: int, col: int
|
|
132
|
+
): int {
|
|
133
|
+
let r0: int = 0;
|
|
134
|
+
let r1: int = 0;
|
|
135
|
+
let r2: int = 0;
|
|
136
|
+
// Select row of A
|
|
137
|
+
let ar0: int = 0; let ar1: int = 0; let ar2: int = 0;
|
|
138
|
+
if (row == 0) { ar0 = a00; ar1 = a01; ar2 = a02; }
|
|
139
|
+
if (row == 1) { ar0 = a10; ar1 = a11; ar2 = a12; }
|
|
140
|
+
if (row == 2) { ar0 = a20; ar1 = a21; ar2 = a22; }
|
|
141
|
+
// Select column of B
|
|
142
|
+
let bc0: int = 0; let bc1: int = 0; let bc2: int = 0;
|
|
143
|
+
if (col == 0) { bc0 = b00; bc1 = b10; bc2 = b20; }
|
|
144
|
+
if (col == 1) { bc0 = b01; bc1 = b11; bc2 = b21; }
|
|
145
|
+
if (col == 2) { bc0 = b02; bc1 = b12; bc2 = b22; }
|
|
146
|
+
// Dot product: divide each term by 10000 to keep ×10000 scale
|
|
147
|
+
r0 = ar0 * bc0 / 10000;
|
|
148
|
+
r1 = ar1 * bc1 / 10000;
|
|
149
|
+
r2 = ar2 * bc2 / 10000;
|
|
150
|
+
return r0 + r1 + r2;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// mat3_mul_vec3: multiply 3×3 matrix by a column vector (vx, vy, vz) ×10000
|
|
154
|
+
// Returns one component (0=x, 1=y, 2=z) of the result vector ×10000
|
|
155
|
+
fn mat3_mul_vec3_elem(
|
|
156
|
+
a00: int, a01: int, a02: int,
|
|
157
|
+
a10: int, a11: int, a12: int,
|
|
158
|
+
a20: int, a21: int, a22: int,
|
|
159
|
+
vx: int, vy: int, vz: int,
|
|
160
|
+
comp: int
|
|
161
|
+
): int {
|
|
162
|
+
let row0: int = a00 * vx / 10000 + a01 * vy / 10000 + a02 * vz / 10000;
|
|
163
|
+
let row1: int = a10 * vx / 10000 + a11 * vy / 10000 + a12 * vz / 10000;
|
|
164
|
+
let row2: int = a20 * vx / 10000 + a21 * vy / 10000 + a22 * vz / 10000;
|
|
165
|
+
if (comp == 0) { return row0; }
|
|
166
|
+
if (comp == 1) { return row1; }
|
|
167
|
+
return row2;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// ─── 4×4 Matrix multiplication ───────────────────────────────────────────────
|
|
171
|
+
// MC Display Entity transformation uses 4×4 matrices (TRS decomposition).
|
|
172
|
+
// All values ×10000.
|
|
173
|
+
//
|
|
174
|
+
// mat4_mul_elem: compute one element C[row][col] of a 4×4 matrix product.
|
|
175
|
+
// Row-major, 16+16=32 components. Returns C[row][col] ×10000.
|
|
176
|
+
|
|
177
|
+
fn mat4_mul_elem(
|
|
178
|
+
a00: int, a01: int, a02: int, a03: int,
|
|
179
|
+
a10: int, a11: int, a12: int, a13: int,
|
|
180
|
+
a20: int, a21: int, a22: int, a23: int,
|
|
181
|
+
a30: int, a31: int, a32: int, a33: int,
|
|
182
|
+
b00: int, b01: int, b02: int, b03: int,
|
|
183
|
+
b10: int, b11: int, b12: int, b13: int,
|
|
184
|
+
b20: int, b21: int, b22: int, b23: int,
|
|
185
|
+
b30: int, b31: int, b32: int, b33: int,
|
|
186
|
+
row: int, col: int
|
|
187
|
+
): int {
|
|
188
|
+
// Select row of A
|
|
189
|
+
let ar0: int = 0; let ar1: int = 0; let ar2: int = 0; let ar3: int = 0;
|
|
190
|
+
if (row == 0) { ar0 = a00; ar1 = a01; ar2 = a02; ar3 = a03; }
|
|
191
|
+
if (row == 1) { ar0 = a10; ar1 = a11; ar2 = a12; ar3 = a13; }
|
|
192
|
+
if (row == 2) { ar0 = a20; ar1 = a21; ar2 = a22; ar3 = a23; }
|
|
193
|
+
if (row == 3) { ar0 = a30; ar1 = a31; ar2 = a32; ar3 = a33; }
|
|
194
|
+
// Select column of B
|
|
195
|
+
let bc0: int = 0; let bc1: int = 0; let bc2: int = 0; let bc3: int = 0;
|
|
196
|
+
if (col == 0) { bc0 = b00; bc1 = b10; bc2 = b20; bc3 = b30; }
|
|
197
|
+
if (col == 1) { bc0 = b01; bc1 = b11; bc2 = b21; bc3 = b31; }
|
|
198
|
+
if (col == 2) { bc0 = b02; bc1 = b12; bc2 = b22; bc3 = b32; }
|
|
199
|
+
if (col == 3) { bc0 = b03; bc1 = b13; bc2 = b23; bc3 = b33; }
|
|
200
|
+
return ar0 * bc0 / 10000 + ar1 * bc1 / 10000 + ar2 * bc2 / 10000 + ar3 * bc3 / 10000;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// mat4_mul_vec4_elem: multiply 4×4 matrix by homogeneous vector (vx,vy,vz,vw) ×10000
|
|
204
|
+
// comp: 0=x, 1=y, 2=z, 3=w
|
|
205
|
+
fn mat4_mul_vec4_elem(
|
|
206
|
+
a00: int, a01: int, a02: int, a03: int,
|
|
207
|
+
a10: int, a11: int, a12: int, a13: int,
|
|
208
|
+
a20: int, a21: int, a22: int, a23: int,
|
|
209
|
+
a30: int, a31: int, a32: int, a33: int,
|
|
210
|
+
vx: int, vy: int, vz: int, vw: int,
|
|
211
|
+
comp: int
|
|
212
|
+
): int {
|
|
213
|
+
let row0: int = a00*vx/10000 + a01*vy/10000 + a02*vz/10000 + a03*vw/10000;
|
|
214
|
+
let row1: int = a10*vx/10000 + a11*vy/10000 + a12*vz/10000 + a13*vw/10000;
|
|
215
|
+
let row2: int = a20*vx/10000 + a21*vy/10000 + a22*vz/10000 + a23*vw/10000;
|
|
216
|
+
let row3: int = a30*vx/10000 + a31*vy/10000 + a32*vz/10000 + a33*vw/10000;
|
|
217
|
+
if (comp == 0) { return row0; }
|
|
218
|
+
if (comp == 1) { return row1; }
|
|
219
|
+
if (comp == 2) { return row2; }
|
|
220
|
+
return row3;
|
|
221
|
+
}
|