redscript-mc 2.4.1 → 2.5.0
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 +16 -0
- package/README.md +2 -0
- package/dist/data/mathdemo/function/__load.mcfunction +2 -0
- package/dist/data/mathdemo/function/_atan_init.mcfunction +4 -0
- package/dist/data/mathdemo/function/_math_init.mcfunction +4 -0
- package/dist/data/mathdemo/function/add2d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/add2d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/add3d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/add3d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/add3d_z.mcfunction +5 -0
- package/dist/data/mathdemo/function/air_drag_fx.mcfunction +2 -0
- package/dist/data/mathdemo/function/apply_drag.mcfunction +8 -0
- package/dist/data/mathdemo/function/apply_gravity.mcfunction +6 -0
- package/dist/data/mathdemo/function/approx_eq.mcfunction +10 -0
- package/dist/data/mathdemo/function/approx_eq__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/approx_eq__merge_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/approx_eq__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/approx_eq__then_2.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed.mcfunction +6 -0
- package/dist/data/mathdemo/function/atan2_fixed__else_30.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__loop_body_26.mcfunction +21 -0
- package/dist/data/mathdemo/function/atan2_fixed__loop_exit_27.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__loop_header_25.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_10.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_12.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_16.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_18.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_20.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_22.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_24.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_29.mcfunction +1 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_32.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_34.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_36.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_40.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__merge_6.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_11.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_15.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_17.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_19.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_2.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_21.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_23.mcfunction +5 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_28.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_31.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_33.mcfunction +4 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_35.mcfunction +1 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_39.mcfunction +3 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_5.mcfunction +2 -0
- package/dist/data/mathdemo/function/atan2_fixed__then_9.mcfunction +4 -0
- package/dist/data/mathdemo/function/bounce_v.mcfunction +10 -0
- package/dist/data/mathdemo/function/cbrt_fx.mcfunction +5 -0
- package/dist/data/mathdemo/function/cbrt_fx__loop_body_6.mcfunction +7 -0
- package/dist/data/mathdemo/function/cbrt_fx__loop_exit_7.mcfunction +1 -0
- package/dist/data/mathdemo/function/cbrt_fx__loop_header_5.mcfunction +4 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_1.mcfunction +8 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_11.mcfunction +5 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_13.mcfunction +4 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_4.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__merge_9.mcfunction +13 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_10.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_12.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/cbrt_fx__then_8.mcfunction +2 -0
- package/dist/data/mathdemo/function/ceil_div.mcfunction +9 -0
- package/dist/data/mathdemo/function/chebyshev.mcfunction +14 -0
- package/dist/data/mathdemo/function/chebyshev3d.mcfunction +19 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_5.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_7.mcfunction +3 -0
- package/dist/data/mathdemo/function/chebyshev3d__merge_9.mcfunction +1 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_6.mcfunction +2 -0
- package/dist/data/mathdemo/function/chebyshev3d__then_8.mcfunction +2 -0
- package/dist/data/mathdemo/function/chebyshev__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev__merge_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/chebyshev__merge_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/chebyshev__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/chebyshev__then_4.mcfunction +1 -0
- package/dist/data/mathdemo/function/circular_x.mcfunction +14 -0
- package/dist/data/mathdemo/function/circular_z.mcfunction +14 -0
- package/dist/data/mathdemo/function/clamp_velocity.mcfunction +5 -0
- package/dist/data/mathdemo/function/clamp_velocity__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/clamp_velocity__merge_4.mcfunction +1 -0
- package/dist/data/mathdemo/function/clamp_velocity__then_0.mcfunction +1 -0
- package/dist/data/mathdemo/function/clamp_velocity__then_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations.mcfunction +6 -0
- package/dist/data/mathdemo/function/combinations__loop_body_9.mcfunction +15 -0
- package/dist/data/mathdemo/function/combinations__loop_exit_10.mcfunction +1 -0
- package/dist/data/mathdemo/function/combinations__loop_header_8.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations__merge_4.mcfunction +6 -0
- package/dist/data/mathdemo/function/combinations__merge_7.mcfunction +3 -0
- package/dist/data/mathdemo/function/combinations__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/combinations__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/combinations__then_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/cos_fixed.mcfunction +7 -0
- package/dist/data/mathdemo/function/cross2d.mcfunction +11 -0
- package/dist/data/mathdemo/function/cross3d_x.mcfunction +11 -0
- package/dist/data/mathdemo/function/cross3d_y.mcfunction +11 -0
- package/dist/data/mathdemo/function/cross3d_z.mcfunction +11 -0
- package/dist/data/mathdemo/function/demo_easing.mcfunction +12 -0
- package/dist/data/mathdemo/function/demo_math.mcfunction +16 -0
- package/dist/data/mathdemo/function/demo_noise.mcfunction +14 -0
- package/dist/data/mathdemo/function/demo_physics.mcfunction +11 -0
- package/dist/data/mathdemo/function/demo_physics__loop_body_1.mcfunction +9 -0
- package/dist/data/mathdemo/function/demo_physics__loop_body_4.mcfunction +18 -0
- package/dist/data/mathdemo/function/demo_physics__loop_exit_2.mcfunction +6 -0
- package/dist/data/mathdemo/function/demo_physics__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/demo_physics__loop_header_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/demo_physics__loop_header_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/distance2d_fixed.mcfunction +13 -0
- package/dist/data/mathdemo/function/distance3d_fixed.mcfunction +18 -0
- package/dist/data/mathdemo/function/divfix.mcfunction +6 -0
- package/dist/data/mathdemo/function/divfix__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/divfix__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/dot2d.mcfunction +11 -0
- package/dist/data/mathdemo/function/dot3d.mcfunction +17 -0
- package/dist/data/mathdemo/function/ease_in_back.mcfunction +26 -0
- package/dist/data/mathdemo/function/ease_in_bounce.mcfunction +9 -0
- package/dist/data/mathdemo/function/ease_in_cubic.mcfunction +12 -0
- package/dist/data/mathdemo/function/ease_in_expo.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_expo__merge_1.mcfunction +11 -0
- package/dist/data/mathdemo/function/ease_in_expo__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_in_out_back.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_back__merge_1.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_in_out_back__then_0.mcfunction +10 -0
- package/dist/data/mathdemo/function/ease_in_out_bounce.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_bounce__merge_1.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_in_out_bounce__then_0.mcfunction +10 -0
- package/dist/data/mathdemo/function/ease_in_out_cubic.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_cubic__merge_1.mcfunction +17 -0
- package/dist/data/mathdemo/function/ease_in_out_cubic__then_0.mcfunction +13 -0
- package/dist/data/mathdemo/function/ease_in_out_quad.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_quad__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/ease_in_out_quad__then_0.mcfunction +8 -0
- package/dist/data/mathdemo/function/ease_in_out_sine.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_out_sine__merge_1.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_in_out_sine__then_0.mcfunction +10 -0
- package/dist/data/mathdemo/function/ease_in_quad.mcfunction +7 -0
- package/dist/data/mathdemo/function/ease_in_quad__const_5000.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_in_quart.mcfunction +12 -0
- package/dist/data/mathdemo/function/ease_in_sine.mcfunction +30 -0
- package/dist/data/mathdemo/function/ease_linear.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_linear__const_5000.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_out_back.mcfunction +9 -0
- package/dist/data/mathdemo/function/ease_out_back__const_5000.mcfunction +7 -0
- package/dist/data/mathdemo/function/ease_out_bounce.mcfunction +6 -0
- package/dist/data/mathdemo/function/ease_out_bounce__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/ease_out_bounce__merge_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/ease_out_bounce__merge_7.mcfunction +15 -0
- package/dist/data/mathdemo/function/ease_out_bounce__then_0.mcfunction +11 -0
- package/dist/data/mathdemo/function/ease_out_bounce__then_3.mcfunction +15 -0
- package/dist/data/mathdemo/function/ease_out_bounce__then_6.mcfunction +15 -0
- package/dist/data/mathdemo/function/ease_out_cubic.mcfunction +16 -0
- package/dist/data/mathdemo/function/ease_out_cubic__const_5000.mcfunction +14 -0
- package/dist/data/mathdemo/function/ease_out_expo.mcfunction +5 -0
- package/dist/data/mathdemo/function/ease_out_expo__merge_1.mcfunction +8 -0
- package/dist/data/mathdemo/function/ease_out_expo__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/ease_out_quad.mcfunction +11 -0
- package/dist/data/mathdemo/function/ease_out_quart.mcfunction +16 -0
- package/dist/data/mathdemo/function/ease_out_sine.mcfunction +9 -0
- package/dist/data/mathdemo/function/ease_smooth.mcfunction +23 -0
- package/dist/data/mathdemo/function/ease_smoother.mcfunction +41 -0
- package/dist/data/mathdemo/function/exp_fx.mcfunction +16 -0
- package/dist/data/mathdemo/function/exp_fx__loop_body_10.mcfunction +8 -0
- package/dist/data/mathdemo/function/exp_fx__loop_body_5.mcfunction +8 -0
- package/dist/data/mathdemo/function/exp_fx__loop_exit_11.mcfunction +1 -0
- package/dist/data/mathdemo/function/exp_fx__loop_exit_6.mcfunction +1 -0
- package/dist/data/mathdemo/function/exp_fx__loop_header_4.mcfunction +3 -0
- package/dist/data/mathdemo/function/exp_fx__loop_header_9.mcfunction +3 -0
- package/dist/data/mathdemo/function/exp_fx__merge_1.mcfunction +47 -0
- package/dist/data/mathdemo/function/exp_fx__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/exp_fx__merge_8.mcfunction +1 -0
- package/dist/data/mathdemo/function/exp_fx__then_0.mcfunction +7 -0
- package/dist/data/mathdemo/function/exp_fx__then_2.mcfunction +2 -0
- package/dist/data/mathdemo/function/exp_fx__then_7.mcfunction +5 -0
- package/dist/data/mathdemo/function/factorial.mcfunction +5 -0
- package/dist/data/mathdemo/function/factorial__loop_body_4.mcfunction +7 -0
- package/dist/data/mathdemo/function/factorial__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/factorial__loop_header_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/factorial__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/factorial__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/fbm_1d.mcfunction +9 -0
- package/dist/data/mathdemo/function/fbm_1d__loop_body_1.mcfunction +33 -0
- package/dist/data/mathdemo/function/fbm_1d__loop_exit_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/fbm_1d__loop_header_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/fbm_1d__merge_4.mcfunction +6 -0
- package/dist/data/mathdemo/function/fbm_1d__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/fbm_2d.mcfunction +10 -0
- package/dist/data/mathdemo/function/fbm_2d__loop_body_1.mcfunction +39 -0
- package/dist/data/mathdemo/function/fbm_2d__loop_exit_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/fbm_2d__loop_header_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/fbm_2d__merge_4.mcfunction +6 -0
- package/dist/data/mathdemo/function/fbm_2d__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/friction_decel.mcfunction +5 -0
- package/dist/data/mathdemo/function/friction_decel__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/friction_decel__merge_4.mcfunction +2 -0
- package/dist/data/mathdemo/function/friction_decel__then_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/friction_decel__then_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/gamma_int.mcfunction +5 -0
- package/dist/data/mathdemo/function/gamma_int__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/gamma_int__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/gcd.mcfunction +7 -0
- package/dist/data/mathdemo/function/gcd__loop_body_5.mcfunction +5 -0
- package/dist/data/mathdemo/function/gcd__loop_exit_6.mcfunction +1 -0
- package/dist/data/mathdemo/function/gcd__loop_header_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/gcd__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/gcd__merge_3.mcfunction +1 -0
- package/dist/data/mathdemo/function/gcd__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/gcd__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/gravity_fx.mcfunction +2 -0
- package/dist/data/mathdemo/function/hash_1d.mcfunction +15 -0
- package/dist/data/mathdemo/function/hash_1d_pos.mcfunction +9 -0
- package/dist/data/mathdemo/function/hash_1d_pos__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/hash_1d_pos__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/hash_2d.mcfunction +11 -0
- package/dist/data/mathdemo/function/hash_2d_pos.mcfunction +11 -0
- package/dist/data/mathdemo/function/hash_2d_pos__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/hash_2d_pos__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/impact_velocity.mcfunction +5 -0
- package/dist/data/mathdemo/function/impact_velocity__merge_1.mcfunction +16 -0
- package/dist/data/mathdemo/function/impact_velocity__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/is_grounded.mcfunction +5 -0
- package/dist/data/mathdemo/function/is_grounded__merge_1.mcfunction +2 -0
- package/dist/data/mathdemo/function/is_grounded__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/isqrt.mcfunction +5 -0
- package/dist/data/mathdemo/function/isqrt__loop_body_10.mcfunction +8 -0
- package/dist/data/mathdemo/function/isqrt__loop_body_13.mcfunction +11 -0
- package/dist/data/mathdemo/function/isqrt__loop_body_7.mcfunction +8 -0
- package/dist/data/mathdemo/function/isqrt__loop_exit_11.mcfunction +2 -0
- package/dist/data/mathdemo/function/isqrt__loop_exit_14.mcfunction +1 -0
- package/dist/data/mathdemo/function/isqrt__loop_exit_8.mcfunction +9 -0
- package/dist/data/mathdemo/function/isqrt__loop_header_12.mcfunction +4 -0
- package/dist/data/mathdemo/function/isqrt__loop_header_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/isqrt__loop_header_9.mcfunction +3 -0
- package/dist/data/mathdemo/function/isqrt__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/isqrt__merge_16.mcfunction +5 -0
- package/dist/data/mathdemo/function/isqrt__merge_4.mcfunction +3 -0
- package/dist/data/mathdemo/function/isqrt__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/isqrt__then_15.mcfunction +1 -0
- package/dist/data/mathdemo/function/isqrt__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/lcm.mcfunction +11 -0
- package/dist/data/mathdemo/function/lcm__merge_1.mcfunction +5 -0
- package/dist/data/mathdemo/function/lcm__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/length2d_fixed.mcfunction +15 -0
- package/dist/data/mathdemo/function/length3d_fixed.mcfunction +20 -0
- package/dist/data/mathdemo/function/lerp.mcfunction +13 -0
- package/dist/data/mathdemo/function/lerp2d_x.mcfunction +13 -0
- package/dist/data/mathdemo/function/lerp2d_y.mcfunction +13 -0
- package/dist/data/mathdemo/function/ln.mcfunction +9 -0
- package/dist/data/mathdemo/function/ln__loop_body_1.mcfunction +8 -0
- package/dist/data/mathdemo/function/ln__loop_body_4.mcfunction +8 -0
- package/dist/data/mathdemo/function/ln__loop_exit_2.mcfunction +1 -0
- package/dist/data/mathdemo/function/ln__loop_exit_5.mcfunction +37 -0
- package/dist/data/mathdemo/function/ln__loop_header_0.mcfunction +3 -0
- package/dist/data/mathdemo/function/ln__loop_header_3.mcfunction +6 -0
- package/dist/data/mathdemo/function/load.mcfunction +1 -0
- package/dist/data/mathdemo/function/log10_fx.mcfunction +11 -0
- package/dist/data/mathdemo/function/log2_fx.mcfunction +11 -0
- package/dist/data/mathdemo/function/log2_int.mcfunction +5 -0
- package/dist/data/mathdemo/function/log2_int__loop_body_4.mcfunction +8 -0
- package/dist/data/mathdemo/function/log2_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/log2_int__loop_header_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/log2_int__merge_1.mcfunction +3 -0
- package/dist/data/mathdemo/function/log2_int__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/loga_fx.mcfunction +10 -0
- package/dist/data/mathdemo/function/loga_fx__merge_1.mcfunction +9 -0
- package/dist/data/mathdemo/function/loga_fx__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/manhattan.mcfunction +14 -0
- package/dist/data/mathdemo/function/manhattan3d.mcfunction +19 -0
- package/dist/data/mathdemo/function/manhattan3d__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__merge_5.mcfunction +5 -0
- package/dist/data/mathdemo/function/manhattan3d__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan3d__then_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan__merge_3.mcfunction +3 -0
- package/dist/data/mathdemo/function/manhattan__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/manhattan__then_2.mcfunction +4 -0
- package/dist/data/mathdemo/function/map.mcfunction +12 -0
- package/dist/data/mathdemo/function/map__merge_1.mcfunction +11 -0
- package/dist/data/mathdemo/function/map__then_0.mcfunction +1 -0
- package/dist/data/mathdemo/function/mulfix.mcfunction +8 -0
- package/dist/data/mathdemo/function/neg2d_x.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg2d_y.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg3d_x.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg3d_y.mcfunction +4 -0
- package/dist/data/mathdemo/function/neg3d_z.mcfunction +4 -0
- package/dist/data/mathdemo/function/normalize2d_x.mcfunction +11 -0
- package/dist/data/mathdemo/function/normalize2d_x__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/normalize2d_x__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/normalize2d_y.mcfunction +11 -0
- package/dist/data/mathdemo/function/normalize2d_y__merge_1.mcfunction +6 -0
- package/dist/data/mathdemo/function/normalize2d_y__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/pow_int.mcfunction +6 -0
- package/dist/data/mathdemo/function/pow_int__loop_body_4.mcfunction +7 -0
- package/dist/data/mathdemo/function/pow_int__loop_exit_5.mcfunction +1 -0
- package/dist/data/mathdemo/function/pow_int__loop_header_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/pow_int__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/pow_int__merge_7.mcfunction +8 -0
- package/dist/data/mathdemo/function/pow_int__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/pow_int__then_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/projectile_land_t.mcfunction +5 -0
- package/dist/data/mathdemo/function/projectile_land_t__merge_1.mcfunction +7 -0
- package/dist/data/mathdemo/function/projectile_land_t__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/projectile_max_height.mcfunction +10 -0
- package/dist/data/mathdemo/function/projectile_max_height__const_200.mcfunction +8 -0
- package/dist/data/mathdemo/function/projectile_vy.mcfunction +9 -0
- package/dist/data/mathdemo/function/projectile_x.mcfunction +8 -0
- package/dist/data/mathdemo/function/projectile_y.mcfunction +19 -0
- package/dist/data/mathdemo/function/quadratic_disc.mcfunction +12 -0
- package/dist/data/mathdemo/function/quadratic_x1.mcfunction +7 -0
- package/dist/data/mathdemo/function/quadratic_x1__merge_1.mcfunction +13 -0
- package/dist/data/mathdemo/function/quadratic_x1__merge_4.mcfunction +15 -0
- package/dist/data/mathdemo/function/quadratic_x1__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/quadratic_x1__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/quadratic_x2.mcfunction +7 -0
- package/dist/data/mathdemo/function/quadratic_x2__merge_1.mcfunction +13 -0
- package/dist/data/mathdemo/function/quadratic_x2__merge_4.mcfunction +15 -0
- package/dist/data/mathdemo/function/quadratic_x2__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/quadratic_x2__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/rotate2d_x.mcfunction +20 -0
- package/dist/data/mathdemo/function/rotate2d_y.mcfunction +20 -0
- package/dist/data/mathdemo/function/scale2d_x.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale2d_y.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale3d_x.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale3d_y.mcfunction +8 -0
- package/dist/data/mathdemo/function/scale3d_z.mcfunction +8 -0
- package/dist/data/mathdemo/function/sign.mcfunction +5 -0
- package/dist/data/mathdemo/function/sign__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/sign__merge_4.mcfunction +2 -0
- package/dist/data/mathdemo/function/sign__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/sign__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/sin_fixed.mcfunction +9 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_1.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_3.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_6.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__merge_9.mcfunction +10 -0
- package/dist/data/mathdemo/function/sin_fixed__then_0.mcfunction +4 -0
- package/dist/data/mathdemo/function/sin_fixed__then_2.mcfunction +6 -0
- package/dist/data/mathdemo/function/sin_fixed__then_5.mcfunction +8 -0
- package/dist/data/mathdemo/function/sin_fixed__then_8.mcfunction +10 -0
- package/dist/data/mathdemo/function/smootherstep.mcfunction +10 -0
- package/dist/data/mathdemo/function/smootherstep__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/smootherstep__merge_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/smootherstep__merge_6.mcfunction +27 -0
- package/dist/data/mathdemo/function/smootherstep__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/smootherstep__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/smootherstep__then_5.mcfunction +2 -0
- package/dist/data/mathdemo/function/smoothstep.mcfunction +10 -0
- package/dist/data/mathdemo/function/smoothstep__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/smoothstep__merge_4.mcfunction +4 -0
- package/dist/data/mathdemo/function/smoothstep__merge_6.mcfunction +15 -0
- package/dist/data/mathdemo/function/smoothstep__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/smoothstep__then_3.mcfunction +2 -0
- package/dist/data/mathdemo/function/smoothstep__then_5.mcfunction +2 -0
- package/dist/data/mathdemo/function/solve2x2_x.mcfunction +17 -0
- package/dist/data/mathdemo/function/solve2x2_x__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/solve2x2_x__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/solve2x2_y.mcfunction +17 -0
- package/dist/data/mathdemo/function/solve2x2_y__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/solve2x2_y__then_0.mcfunction +2 -0
- package/dist/data/mathdemo/function/spring_force.mcfunction +11 -0
- package/dist/data/mathdemo/function/spring_update_v.mcfunction +18 -0
- package/dist/data/mathdemo/function/sqrt_fixed.mcfunction +8 -0
- package/dist/data/mathdemo/function/sqrt_fx.mcfunction +11 -0
- package/dist/data/mathdemo/function/sqrt_fx__const_20000.mcfunction +8 -0
- package/dist/data/mathdemo/function/start.mcfunction +6 -0
- package/dist/data/mathdemo/function/sub2d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub2d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub3d_x.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub3d_y.mcfunction +5 -0
- package/dist/data/mathdemo/function/sub3d_z.mcfunction +5 -0
- package/dist/data/mathdemo/function/terrain_height.mcfunction +24 -0
- package/dist/data/mathdemo/function/terrain_height__const_0_0_64_20.mcfunction +17 -0
- package/dist/data/mathdemo/function/terrain_height__const_10_5_64_20.mcfunction +17 -0
- package/dist/data/mathdemo/function/update_pos.mcfunction +5 -0
- package/dist/data/mathdemo/function/value_noise_1d.mcfunction +13 -0
- package/dist/data/mathdemo/function/value_noise_1d__merge_1.mcfunction +39 -0
- package/dist/data/mathdemo/function/value_noise_1d__then_0.mcfunction +7 -0
- package/dist/data/mathdemo/function/value_noise_2d.mcfunction +14 -0
- package/dist/data/mathdemo/function/value_noise_2d__merge_1.mcfunction +12 -0
- package/dist/data/mathdemo/function/value_noise_2d__merge_3.mcfunction +98 -0
- package/dist/data/mathdemo/function/value_noise_2d__then_0.mcfunction +7 -0
- package/dist/data/mathdemo/function/value_noise_2d__then_2.mcfunction +7 -0
- package/dist/data/mathdemo/function/water_drag_fx.mcfunction +2 -0
- package/dist/data/minecraft/tags/function/load.json +2 -1
- package/dist/data/minecraft/tags/function/tick.json +1 -1
- package/dist/data/test/function/__dyn_idx_test_arrays_a.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_b.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_c.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_counter.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_d.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_e.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_g.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_h.mcfunction +1 -0
- package/dist/data/test/function/__dyn_idx_test_arrays_one.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_f.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_r.mcfunction +1 -0
- package/dist/data/test/function/__dyn_wrt_test_arrays_s.mcfunction +1 -0
- package/dist/data/test/function/_apply.mcfunction +5 -0
- package/dist/data/test/function/_divider.mcfunction +1 -0
- package/dist/data/test/function/_dump_advanced_phase.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_body_6.mcfunction +10 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_exit_2.mcfunction +20 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_exit_7.mcfunction +12 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__merge_4.mcfunction +4 -0
- package/dist/data/test/function/_dump_advanced_phase__then_3.mcfunction +2 -0
- package/dist/data/test/function/_dump_bigint_phase.mcfunction +28 -0
- package/dist/data/test/function/_dump_math_phase.mcfunction +4 -0
- package/dist/data/test/function/_dump_math_phase__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/_dump_math_phase__loop_exit_2.mcfunction +18 -0
- package/dist/data/test/function/_dump_math_phase__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/_fp.mcfunction +2 -0
- package/dist/data/test/function/_next_phase.mcfunction +1 -0
- package/dist/data/test/function/_section.mcfunction +3 -0
- package/dist/data/test/function/_section__const_0.mcfunction +3 -0
- package/dist/data/test/function/_tick_advanced_live.mcfunction +5 -0
- package/dist/data/test/function/_tick_advanced_live__foreach_t12.mcfunction +1 -0
- package/dist/data/test/function/_tick_bigint_live.mcfunction +8 -0
- package/dist/data/test/function/_tick_bigint_live__foreach_t11.mcfunction +1 -0
- package/dist/data/test/function/_tick_math.mcfunction +9 -0
- package/dist/data/test/function/_tick_math__foreach_t12.mcfunction +1 -0
- package/dist/data/test/function/_tick_visual.mcfunction +11 -0
- package/dist/data/test/function/_tick_visual__foreach_t12.mcfunction +1 -0
- package/dist/data/test/function/_tick_visual__foreach_t16.mcfunction +8 -0
- package/dist/data/test/function/_tick_visual__foreach_t17.mcfunction +8 -0
- package/dist/data/test/function/_tick_visual__foreach_t21.mcfunction +1 -0
- package/dist/data/test/function/air_drag_fx.mcfunction +2 -0
- package/dist/data/test/function/angle_between.mcfunction +28 -0
- package/dist/data/test/function/angle_between__and_false_2.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_false_8.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_merge_1.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_merge_7.mcfunction +2 -0
- package/dist/data/test/function/angle_between__and_right_0.mcfunction +4 -0
- package/dist/data/test/function/angle_between__and_right_6.mcfunction +4 -0
- package/dist/data/test/function/angle_between__merge_10.mcfunction +26 -0
- package/dist/data/test/function/angle_between__merge_4.mcfunction +4 -0
- package/dist/data/test/function/angle_between__then_3.mcfunction +2 -0
- package/dist/data/test/function/angle_between__then_9.mcfunction +2 -0
- package/dist/data/test/function/apply_drag.mcfunction +8 -0
- package/dist/data/test/function/apply_gravity.mcfunction +6 -0
- package/dist/data/test/function/approx_eq.mcfunction +1 -2
- package/dist/data/test/function/approx_eq__merge_1.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__loop_body_26.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__loop_exit_27.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__loop_header_25.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_1.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_10.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_16.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_18.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_20.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_22.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_3.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_32.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__merge_34.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__then_0.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__then_33.mcfunction +1 -2
- package/dist/data/test/function/atan2_fixed__then_9.mcfunction +1 -2
- package/dist/data/test/function/bezier_cubic.mcfunction +36 -0
- package/dist/data/test/function/bezier_quad.mcfunction +20 -0
- package/dist/data/test/function/bigint3_borrow_lo.mcfunction +1 -2
- package/dist/data/test/function/bigint3_borrow_mid.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_1.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_10.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_13.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_4.mcfunction +1 -2
- package/dist/data/test/function/bigint3_cmp__merge_7.mcfunction +1 -2
- package/dist/data/test/function/bigint3_sub_lo.mcfunction +1 -2
- package/dist/data/test/function/bigint3_sub_mid.mcfunction +1 -2
- package/dist/data/test/function/bigint_add.mcfunction +8 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r.mcfunction +6 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r__loop_body_1.mcfunction +22 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__a__b__test_arrays__b__result__test_arrays__r__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r.mcfunction +6 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r__loop_body_1.mcfunction +22 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_add__arr_a__test_arrays__counter__b__test_arrays__one__result__test_arrays__r__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_add__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_add__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_add__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_cmp.mcfunction +5 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__loop_body_1.mcfunction +7 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__loop_exit_2.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__merge_4.mcfunction +7 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__merge_7.mcfunction +4 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__then_3.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__arr_a__test_arrays__g__b__test_arrays__h__then_6.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__loop_body_1.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__loop_exit_2.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__merge_4.mcfunction +3 -0
- package/dist/data/test/function/bigint_cmp__merge_7.mcfunction +4 -0
- package/dist/data/test/function/bigint_cmp__then_3.mcfunction +2 -0
- package/dist/data/test/function/bigint_cmp__then_6.mcfunction +2 -0
- package/dist/data/test/function/bigint_copy.mcfunction +3 -0
- package/dist/data/test/function/bigint_copy__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_copy__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_copy__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_is_zero.mcfunction +4 -0
- package/dist/data/test/function/bigint_is_zero__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_is_zero__loop_exit_2.mcfunction +2 -0
- package/dist/data/test/function/bigint_is_zero__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_is_zero__merge_4.mcfunction +4 -0
- package/dist/data/test/function/bigint_is_zero__then_3.mcfunction +2 -0
- package/dist/data/test/function/bigint_leading_zeros.mcfunction +5 -0
- package/dist/data/test/function/bigint_leading_zeros__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_leading_zeros__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_leading_zeros__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/bigint_leading_zeros__merge_4.mcfunction +9 -0
- package/dist/data/test/function/bigint_leading_zeros__then_3.mcfunction +1 -0
- package/dist/data/test/function/bigint_mul_small.mcfunction +8 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f.mcfunction +7 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f__loop_body_1.mcfunction +20 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mul_small__arr_a__test_arrays__e__result__test_arrays__f__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_mul_small__loop_body_1.mcfunction +12 -0
- package/dist/data/test/function/bigint_mul_small__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_mul_small__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_shift_left.mcfunction +3 -0
- package/dist/data/test/function/bigint_shift_left__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_shift_left__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_shift_left__loop_header_0.mcfunction +5 -0
- package/dist/data/test/function/bigint_sub.mcfunction +8 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s.mcfunction +6 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__loop_body_1.mcfunction +13 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__merge_4.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__merge_6.mcfunction +7 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__then_3.mcfunction +5 -0
- package/dist/data/test/function/bigint_sub__arr_a__test_arrays__c__b__test_arrays__d__result__test_arrays__s__then_5.mcfunction +2 -0
- package/dist/data/test/function/bigint_sub__loop_body_1.mcfunction +9 -0
- package/dist/data/test/function/bigint_sub__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_sub__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__merge_4.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__merge_6.mcfunction +4 -0
- package/dist/data/test/function/bigint_sub__then_3.mcfunction +5 -0
- package/dist/data/test/function/bigint_sub__then_5.mcfunction +2 -0
- package/dist/data/test/function/bigint_zero.mcfunction +3 -0
- package/dist/data/test/function/bigint_zero__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/bigint_zero__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/bigint_zero__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/billboard_y.mcfunction +7 -0
- package/dist/data/test/function/bounce_v.mcfunction +10 -0
- package/dist/data/test/function/cbrt_fx.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__loop_body_6.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__loop_header_5.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__merge_11.mcfunction +1 -2
- package/dist/data/test/function/cbrt_fx__merge_9.mcfunction +1 -2
- package/dist/data/test/function/chebyshev.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_3.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_5.mcfunction +1 -2
- package/dist/data/test/function/chebyshev3d__merge_7.mcfunction +1 -2
- package/dist/data/test/function/chebyshev__merge_1.mcfunction +1 -2
- package/dist/data/test/function/chebyshev__merge_3.mcfunction +1 -2
- package/dist/data/test/function/circular_x.mcfunction +14 -0
- package/dist/data/test/function/circular_z.mcfunction +14 -0
- package/dist/data/test/function/clamp_circle_x.mcfunction +13 -0
- package/dist/data/test/function/clamp_circle_x__merge_1.mcfunction +10 -0
- package/dist/data/test/function/clamp_circle_x__then_0.mcfunction +1 -0
- package/dist/data/test/function/clamp_circle_y.mcfunction +13 -0
- package/dist/data/test/function/clamp_circle_y__merge_1.mcfunction +10 -0
- package/dist/data/test/function/clamp_circle_y__then_0.mcfunction +1 -0
- package/dist/data/test/function/clamp_velocity.mcfunction +5 -0
- package/dist/data/test/function/clamp_velocity__merge_1.mcfunction +5 -0
- package/dist/data/test/function/clamp_velocity__merge_4.mcfunction +1 -0
- package/dist/data/test/function/clamp_velocity__then_0.mcfunction +1 -0
- package/dist/data/test/function/clamp_velocity__then_3.mcfunction +3 -0
- package/dist/data/test/function/collatz_steps.mcfunction +5 -0
- package/dist/data/test/function/collatz_steps__else_8.mcfunction +6 -0
- package/dist/data/test/function/collatz_steps__loop_body_4.mcfunction +7 -0
- package/dist/data/test/function/collatz_steps__loop_exit_5.mcfunction +1 -0
- package/dist/data/test/function/collatz_steps__loop_header_3.mcfunction +4 -0
- package/dist/data/test/function/collatz_steps__merge_1.mcfunction +3 -0
- package/dist/data/test/function/collatz_steps__merge_7.mcfunction +4 -0
- package/dist/data/test/function/collatz_steps__then_0.mcfunction +2 -0
- package/dist/data/test/function/collatz_steps__then_6.mcfunction +5 -0
- package/dist/data/test/function/combinations.mcfunction +1 -2
- package/dist/data/test/function/combinations__loop_header_8.mcfunction +1 -2
- package/dist/data/test/function/combinations__merge_1.mcfunction +1 -2
- package/dist/data/test/function/combinations__merge_4.mcfunction +1 -2
- package/dist/data/test/function/cos_fixed__const_0.mcfunction +5 -0
- package/dist/data/test/function/count_digits.mcfunction +6 -0
- package/dist/data/test/function/count_digits__loop_body_6.mcfunction +8 -0
- package/dist/data/test/function/count_digits__loop_exit_7.mcfunction +1 -0
- package/dist/data/test/function/count_digits__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/count_digits__merge_1.mcfunction +4 -0
- package/dist/data/test/function/count_digits__merge_3.mcfunction +2 -0
- package/dist/data/test/function/count_digits__then_0.mcfunction +4 -0
- package/dist/data/test/function/count_digits__then_2.mcfunction +2 -0
- package/dist/data/test/function/debug_bigint.mcfunction +25 -0
- package/dist/data/test/function/digit_sum.mcfunction +6 -0
- package/dist/data/test/function/digit_sum__loop_body_6.mcfunction +11 -0
- package/dist/data/test/function/digit_sum__loop_exit_7.mcfunction +1 -0
- package/dist/data/test/function/digit_sum__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/digit_sum__merge_1.mcfunction +4 -0
- package/dist/data/test/function/digit_sum__merge_3.mcfunction +2 -0
- package/dist/data/test/function/digit_sum__then_0.mcfunction +4 -0
- package/dist/data/test/function/digit_sum__then_2.mcfunction +2 -0
- package/dist/data/test/function/digital_root.mcfunction +5 -0
- package/dist/data/test/function/digital_root__merge_1.mcfunction +8 -0
- package/dist/data/test/function/digital_root__merge_4.mcfunction +1 -0
- package/dist/data/test/function/digital_root__then_0.mcfunction +2 -0
- package/dist/data/test/function/digital_root__then_3.mcfunction +2 -0
- package/dist/data/test/function/divfix.mcfunction +1 -2
- package/dist/data/test/function/dump_advanced.mcfunction +1 -0
- package/dist/data/test/function/dump_bigint.mcfunction +1 -0
- package/dist/data/test/function/dump_math.mcfunction +1 -0
- package/dist/data/test/function/ease_in_back.mcfunction +26 -0
- package/dist/data/test/function/ease_in_bounce.mcfunction +9 -0
- package/dist/data/test/function/ease_in_cubic.mcfunction +12 -0
- package/dist/data/test/function/ease_in_expo.mcfunction +6 -0
- package/dist/data/test/function/ease_in_expo__merge_1.mcfunction +11 -0
- package/dist/data/test/function/ease_in_expo__then_0.mcfunction +2 -0
- package/dist/data/test/function/ease_in_out_back.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_back__merge_1.mcfunction +14 -0
- package/dist/data/test/function/ease_in_out_back__then_0.mcfunction +10 -0
- package/dist/data/test/function/ease_in_out_bounce.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_bounce__merge_1.mcfunction +14 -0
- package/dist/data/test/function/ease_in_out_bounce__then_0.mcfunction +10 -0
- package/dist/data/test/function/ease_in_out_cubic.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_cubic__merge_1.mcfunction +17 -0
- package/dist/data/test/function/ease_in_out_cubic__then_0.mcfunction +13 -0
- package/dist/data/test/function/ease_in_out_quad.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_quad__merge_1.mcfunction +12 -0
- package/dist/data/test/function/ease_in_out_quad__then_0.mcfunction +8 -0
- package/dist/data/test/function/ease_in_out_sine.mcfunction +6 -0
- package/dist/data/test/function/ease_in_out_sine__merge_1.mcfunction +14 -0
- package/dist/data/test/function/ease_in_out_sine__then_0.mcfunction +10 -0
- package/dist/data/test/function/ease_in_quad.mcfunction +7 -0
- package/dist/data/test/function/ease_in_quart.mcfunction +12 -0
- package/dist/data/test/function/ease_in_sine.mcfunction +30 -0
- package/dist/data/test/function/ease_linear.mcfunction +2 -0
- package/dist/data/test/function/ease_out_back.mcfunction +9 -0
- package/dist/data/test/function/ease_out_bounce.mcfunction +7 -0
- package/dist/data/test/function/ease_out_bounce__merge_1.mcfunction +5 -0
- package/dist/data/test/function/ease_out_bounce__merge_4.mcfunction +5 -0
- package/dist/data/test/function/ease_out_bounce__merge_7.mcfunction +15 -0
- package/dist/data/test/function/ease_out_bounce__then_0.mcfunction +11 -0
- package/dist/data/test/function/ease_out_bounce__then_3.mcfunction +15 -0
- package/dist/data/test/function/ease_out_bounce__then_6.mcfunction +15 -0
- package/dist/data/test/function/ease_out_cubic.mcfunction +16 -0
- package/dist/data/test/function/ease_out_expo.mcfunction +6 -0
- package/dist/data/test/function/ease_out_expo__merge_1.mcfunction +8 -0
- package/dist/data/test/function/ease_out_expo__then_0.mcfunction +2 -0
- package/dist/data/test/function/ease_out_quad.mcfunction +11 -0
- package/dist/data/test/function/ease_out_quart.mcfunction +16 -0
- package/dist/data/test/function/ease_out_sine.mcfunction +9 -0
- package/dist/data/test/function/ease_smooth.mcfunction +23 -0
- package/dist/data/test/function/ease_smoother.mcfunction +41 -0
- package/dist/data/test/function/exp_fx.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__loop_header_4.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__loop_header_9.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__merge_1.mcfunction +1 -2
- package/dist/data/test/function/exp_fx__merge_3.mcfunction +1 -2
- package/dist/data/test/function/factorial.mcfunction +1 -2
- package/dist/data/test/function/factorial__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/fbm_1d.mcfunction +9 -0
- package/dist/data/test/function/fbm_1d__loop_body_1.mcfunction +33 -0
- package/dist/data/test/function/fbm_1d__loop_exit_2.mcfunction +5 -0
- package/dist/data/test/function/fbm_1d__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/fbm_1d__merge_4.mcfunction +6 -0
- package/dist/data/test/function/fbm_1d__then_3.mcfunction +2 -0
- package/dist/data/test/function/fbm_2d.mcfunction +10 -0
- package/dist/data/test/function/fbm_2d__loop_body_1.mcfunction +39 -0
- package/dist/data/test/function/fbm_2d__loop_exit_2.mcfunction +5 -0
- package/dist/data/test/function/fbm_2d__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/fbm_2d__merge_4.mcfunction +6 -0
- package/dist/data/test/function/fbm_2d__then_3.mcfunction +2 -0
- package/dist/data/test/function/fib.mcfunction +5 -0
- package/dist/data/test/function/fib__loop_body_7.mcfunction +8 -0
- package/dist/data/test/function/fib__loop_exit_8.mcfunction +1 -0
- package/dist/data/test/function/fib__loop_header_6.mcfunction +3 -0
- package/dist/data/test/function/fib__merge_1.mcfunction +4 -0
- package/dist/data/test/function/fib__merge_4.mcfunction +4 -0
- package/dist/data/test/function/fib__then_0.mcfunction +2 -0
- package/dist/data/test/function/fib__then_3.mcfunction +2 -0
- package/dist/data/test/function/friction_decel.mcfunction +5 -0
- package/dist/data/test/function/friction_decel__merge_1.mcfunction +5 -0
- package/dist/data/test/function/friction_decel__merge_4.mcfunction +2 -0
- package/dist/data/test/function/friction_decel__then_0.mcfunction +3 -0
- package/dist/data/test/function/friction_decel__then_3.mcfunction +3 -0
- package/dist/data/test/function/gamma_int.mcfunction +1 -2
- package/dist/data/test/function/gcd.mcfunction +1 -2
- package/dist/data/test/function/gcd__loop_header_4.mcfunction +1 -2
- package/dist/data/test/function/gcd__merge_1.mcfunction +1 -2
- package/dist/data/test/function/gravity_fx.mcfunction +2 -0
- package/dist/data/test/function/hash_1d.mcfunction +15 -0
- package/dist/data/test/function/hash_1d_pos.mcfunction +10 -0
- package/dist/data/test/function/hash_1d_pos__merge_1.mcfunction +4 -0
- package/dist/data/test/function/hash_1d_pos__then_0.mcfunction +4 -0
- package/dist/data/test/function/hash_2d.mcfunction +11 -0
- package/dist/data/test/function/hash_2d_pos.mcfunction +12 -0
- package/dist/data/test/function/hash_2d_pos__merge_1.mcfunction +4 -0
- package/dist/data/test/function/hash_2d_pos__then_0.mcfunction +4 -0
- package/dist/data/test/function/hash_int.mcfunction +6 -0
- package/dist/data/test/function/hash_int__merge_1.mcfunction +14 -0
- package/dist/data/test/function/hash_int__merge_3.mcfunction +14 -0
- package/dist/data/test/function/hash_int__merge_5.mcfunction +1 -0
- package/dist/data/test/function/hash_int__then_0.mcfunction +4 -0
- package/dist/data/test/function/hash_int__then_2.mcfunction +4 -0
- package/dist/data/test/function/hash_int__then_4.mcfunction +4 -0
- package/dist/data/test/function/impact_velocity.mcfunction +5 -0
- package/dist/data/test/function/impact_velocity__merge_1.mcfunction +16 -0
- package/dist/data/test/function/impact_velocity__then_0.mcfunction +2 -0
- package/dist/data/test/function/int32_to_bigint3_hi.mcfunction +1 -2
- package/dist/data/test/function/int32_to_bigint3_lo.mcfunction +1 -2
- package/dist/data/test/function/int32_to_bigint3_mid.mcfunction +1 -2
- package/dist/data/test/function/is_grounded.mcfunction +5 -0
- package/dist/data/test/function/is_grounded__merge_1.mcfunction +2 -0
- package/dist/data/test/function/is_grounded__then_0.mcfunction +2 -0
- package/dist/data/test/function/is_prime.mcfunction +5 -0
- package/dist/data/test/function/is_prime__loop_body_10.mcfunction +6 -0
- package/dist/data/test/function/is_prime__loop_exit_11.mcfunction +2 -0
- package/dist/data/test/function/is_prime__loop_header_9.mcfunction +5 -0
- package/dist/data/test/function/is_prime__merge_1.mcfunction +4 -0
- package/dist/data/test/function/is_prime__merge_13.mcfunction +4 -0
- package/dist/data/test/function/is_prime__merge_4.mcfunction +7 -0
- package/dist/data/test/function/is_prime__merge_7.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_0.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_12.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_3.mcfunction +2 -0
- package/dist/data/test/function/is_prime__then_6.mcfunction +2 -0
- package/dist/data/test/function/isqrt.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_body_13.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_header_12.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_header_6.mcfunction +1 -2
- package/dist/data/test/function/isqrt__loop_header_9.mcfunction +1 -2
- package/dist/data/test/function/isqrt__merge_1.mcfunction +1 -2
- package/dist/data/test/function/julia_iter.mcfunction +9 -0
- package/dist/data/test/function/julia_iter__loop_body_1.mcfunction +36 -0
- package/dist/data/test/function/julia_iter__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/julia_iter__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/julia_iter__merge_4.mcfunction +4 -0
- package/dist/data/test/function/julia_iter__then_3.mcfunction +1 -0
- package/dist/data/test/function/lambda_demo.mcfunction +2 -0
- package/dist/data/test/function/lcm.mcfunction +1 -2
- package/dist/data/test/function/lerp_angle.mcfunction +7 -0
- package/dist/data/test/function/lerp_angle__loop_body_1.mcfunction +4 -0
- package/dist/data/test/function/lerp_angle__loop_body_4.mcfunction +4 -0
- package/dist/data/test/function/lerp_angle__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/lerp_angle__loop_exit_5.mcfunction +8 -0
- package/dist/data/test/function/lerp_angle__loop_header_0.mcfunction +4 -0
- package/dist/data/test/function/lerp_angle__loop_header_3.mcfunction +3 -0
- package/dist/data/test/function/ln__loop_header_0.mcfunction +1 -2
- package/dist/data/test/function/ln__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/log2_int.mcfunction +1 -2
- package/dist/data/test/function/log2_int__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/loga_fx.mcfunction +1 -2
- package/dist/data/test/function/mandelbrot_iter.mcfunction +7 -0
- package/dist/data/test/function/mandelbrot_iter__loop_body_1.mcfunction +36 -0
- package/dist/data/test/function/mandelbrot_iter__loop_exit_2.mcfunction +1 -0
- package/dist/data/test/function/mandelbrot_iter__loop_header_0.mcfunction +3 -0
- package/dist/data/test/function/mandelbrot_iter__merge_4.mcfunction +4 -0
- package/dist/data/test/function/mandelbrot_iter__then_3.mcfunction +1 -0
- package/dist/data/test/function/manhattan.mcfunction +1 -2
- package/dist/data/test/function/manhattan3d.mcfunction +1 -2
- package/dist/data/test/function/manhattan3d__merge_1.mcfunction +1 -2
- package/dist/data/test/function/manhattan3d__merge_3.mcfunction +1 -2
- package/dist/data/test/function/manhattan__merge_1.mcfunction +1 -2
- package/dist/data/test/function/map.mcfunction +1 -2
- package/dist/data/test/function/mod_pow.mcfunction +7 -0
- package/dist/data/test/function/mod_pow__loop_body_6.mcfunction +7 -0
- package/dist/data/test/function/mod_pow__loop_exit_7.mcfunction +1 -0
- package/dist/data/test/function/mod_pow__loop_header_5.mcfunction +4 -0
- package/dist/data/test/function/mod_pow__merge_1.mcfunction +8 -0
- package/dist/data/test/function/mod_pow__merge_4.mcfunction +2 -0
- package/dist/data/test/function/mod_pow__merge_9.mcfunction +10 -0
- package/dist/data/test/function/mod_pow__then_0.mcfunction +2 -0
- package/dist/data/test/function/mod_pow__then_3.mcfunction +4 -0
- package/dist/data/test/function/mod_pow__then_8.mcfunction +6 -0
- package/dist/data/test/function/newton_sqrt.mcfunction +5 -0
- package/dist/data/test/function/newton_sqrt__loop_body_7.mcfunction +10 -0
- package/dist/data/test/function/newton_sqrt__loop_exit_8.mcfunction +1 -0
- package/dist/data/test/function/newton_sqrt__loop_header_6.mcfunction +3 -0
- package/dist/data/test/function/newton_sqrt__merge_1.mcfunction +4 -0
- package/dist/data/test/function/newton_sqrt__merge_4.mcfunction +6 -0
- package/dist/data/test/function/newton_sqrt__then_0.mcfunction +2 -0
- package/dist/data/test/function/newton_sqrt__then_3.mcfunction +2 -0
- package/dist/data/test/function/noise1d.mcfunction +13 -0
- package/dist/data/test/function/noise1d__merge_1.mcfunction +20 -0
- package/dist/data/test/function/noise1d__merge_3.mcfunction +4 -0
- package/dist/data/test/function/noise1d__merge_5.mcfunction +11 -0
- package/dist/data/test/function/noise1d__then_0.mcfunction +7 -0
- package/dist/data/test/function/noise1d__then_2.mcfunction +4 -0
- package/dist/data/test/function/noise1d__then_4.mcfunction +4 -0
- package/dist/data/test/function/normalize2d_x.mcfunction +1 -2
- package/dist/data/test/function/normalize2d_y.mcfunction +1 -2
- package/dist/data/test/function/pow_int.mcfunction +1 -2
- package/dist/data/test/function/pow_int__loop_body_4.mcfunction +1 -2
- package/dist/data/test/function/pow_int__loop_header_3.mcfunction +1 -2
- package/dist/data/test/function/projectile_land_t.mcfunction +5 -0
- package/dist/data/test/function/projectile_land_t__merge_1.mcfunction +7 -0
- package/dist/data/test/function/projectile_land_t__then_0.mcfunction +2 -0
- package/dist/data/test/function/projectile_max_height.mcfunction +10 -0
- package/dist/data/test/function/projectile_vy.mcfunction +9 -0
- package/dist/data/test/function/projectile_x.mcfunction +8 -0
- package/dist/data/test/function/projectile_y.mcfunction +19 -0
- package/dist/data/test/function/ptimer/new.mcfunction +3 -0
- package/dist/data/test/function/ptimer/reset.mcfunction +1 -0
- package/dist/data/test/function/ptimer/tick.mcfunction +8 -0
- package/dist/data/test/function/ptimer/tick__merge_1.mcfunction +2 -0
- package/dist/data/test/function/ptimer/tick__then_0.mcfunction +3 -0
- package/dist/data/test/function/quadratic_x1.mcfunction +1 -2
- package/dist/data/test/function/quadratic_x1__merge_1.mcfunction +1 -2
- package/dist/data/test/function/quadratic_x2.mcfunction +1 -2
- package/dist/data/test/function/quadratic_x2__merge_1.mcfunction +1 -2
- package/dist/data/test/function/quat_cos_half.mcfunction +8 -0
- package/dist/data/test/function/quat_sin_half.mcfunction +8 -0
- package/dist/data/test/function/reverse_int.mcfunction +7 -0
- package/dist/data/test/function/reverse_int__loop_body_3.mcfunction +14 -0
- package/dist/data/test/function/reverse_int__loop_exit_4.mcfunction +4 -0
- package/dist/data/test/function/reverse_int__loop_header_2.mcfunction +4 -0
- package/dist/data/test/function/reverse_int__merge_1.mcfunction +2 -0
- package/dist/data/test/function/reverse_int__merge_6.mcfunction +1 -0
- package/dist/data/test/function/reverse_int__then_0.mcfunction +5 -0
- package/dist/data/test/function/reverse_int__then_5.mcfunction +3 -0
- package/dist/data/test/function/rotate_x_y.mcfunction +28 -0
- package/dist/data/test/function/rotate_x_z.mcfunction +28 -0
- package/dist/data/test/function/rotate_y_x.mcfunction +28 -0
- package/dist/data/test/function/rotate_y_z.mcfunction +30 -0
- package/dist/data/test/function/scale_x.mcfunction +8 -0
- package/dist/data/test/function/scale_y.mcfunction +8 -0
- package/dist/data/test/function/scale_z.mcfunction +8 -0
- package/dist/data/test/function/showcase_load.mcfunction +4 -0
- package/dist/data/test/function/showcase_tick.mcfunction +1 -0
- package/dist/data/test/function/sign.mcfunction +1 -2
- package/dist/data/test/function/sign__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed__merge_1.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed__merge_3.mcfunction +1 -2
- package/dist/data/test/function/sin_fixed__merge_6.mcfunction +1 -2
- package/dist/data/test/function/smootherstep.mcfunction +1 -2
- package/dist/data/test/function/smootherstep__merge_1.mcfunction +1 -2
- package/dist/data/test/function/smootherstep__merge_4.mcfunction +1 -2
- package/dist/data/test/function/smoothstep.mcfunction +1 -2
- package/dist/data/test/function/smoothstep__merge_1.mcfunction +1 -2
- package/dist/data/test/function/smoothstep__merge_4.mcfunction +1 -2
- package/dist/data/test/function/solve2x2_x.mcfunction +1 -2
- package/dist/data/test/function/solve2x2_y.mcfunction +1 -2
- package/dist/data/test/function/spiral_ring.mcfunction +5 -0
- package/dist/data/test/function/spiral_ring__merge_1.mcfunction +13 -0
- package/dist/data/test/function/spiral_ring__then_0.mcfunction +2 -0
- package/dist/data/test/function/spring_force.mcfunction +11 -0
- package/dist/data/test/function/spring_update_v.mcfunction +18 -0
- package/dist/data/test/function/start.mcfunction +8 -0
- package/dist/data/test/function/stop.mcfunction +2 -0
- package/dist/data/test/function/stop__foreach_t0.mcfunction +1 -0
- package/dist/data/test/function/terrain_height.mcfunction +24 -0
- package/dist/data/test/function/uniform_scale.mcfunction +8 -0
- package/dist/data/test/function/update_pos.mcfunction +5 -0
- package/dist/data/test/function/value_noise_1d.mcfunction +14 -0
- package/dist/data/test/function/value_noise_1d__merge_1.mcfunction +39 -0
- package/dist/data/test/function/value_noise_1d__then_0.mcfunction +7 -0
- package/dist/data/test/function/value_noise_2d.mcfunction +15 -0
- package/dist/data/test/function/value_noise_2d__merge_1.mcfunction +13 -0
- package/dist/data/test/function/value_noise_2d__merge_3.mcfunction +98 -0
- package/dist/data/test/function/value_noise_2d__then_0.mcfunction +7 -0
- package/dist/data/test/function/value_noise_2d__then_2.mcfunction +7 -0
- package/dist/data/test/function/water_drag_fx.mcfunction +2 -0
- package/dist/pack.mcmeta +1 -1
- package/dist/src/__tests__/optimizer/lir/peephole.test.js +92 -0
- package/dist/src/ast/types.d.ts +7 -0
- package/dist/src/hir/lower.js +51 -0
- package/dist/src/optimizer/lir/peephole.d.ts +13 -4
- package/dist/src/optimizer/lir/peephole.js +44 -5
- package/dist/src/parser/index.js +12 -0
- package/editors/vscode/package-lock.json +3 -3
- package/editors/vscode/package.json +1 -1
- package/examples/math-demo.mcrs +127 -0
- package/examples/showcase.mcrs +64 -109
- package/package.json +1 -1
- package/src/__tests__/e2e/for-in-array.test.ts +62 -0
- package/src/__tests__/optimizer/lir/peephole.test.ts +100 -0
- package/src/ast/types.ts +1 -0
- package/src/hir/lower.ts +52 -0
- package/src/optimizer/lir/peephole.ts +50 -5
- package/src/parser/index.ts +13 -0
- package/src/stdlib/bigint.mcrs +128 -100
- package/src/stdlib/easing.mcrs +182 -0
- package/src/stdlib/matrix.mcrs +108 -0
- package/src/stdlib/noise.mcrs +153 -0
- package/src/stdlib/physics.mcrs +134 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// easing.mcrs — Easing functions for animations and transitions.
|
|
2
|
+
//
|
|
3
|
+
// All functions take t ∈ [0, 10000] (fixed-point ×10000)
|
|
4
|
+
// and return a value in [0, 10000] (or slightly outside for elastic/bounce).
|
|
5
|
+
//
|
|
6
|
+
// Common use: smooth particle movement, UI transitions, projectile arcs
|
|
7
|
+
//
|
|
8
|
+
// Requires: import "stdlib/math" (for abs, clamp, mul_fixed)
|
|
9
|
+
|
|
10
|
+
module library;
|
|
11
|
+
|
|
12
|
+
// ─── Linear ──────────────────────────────────────────────────────────────────
|
|
13
|
+
|
|
14
|
+
fn ease_linear(t: int): int { return t; }
|
|
15
|
+
|
|
16
|
+
// ─── Quadratic ───────────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
// ease_in_quad: slow start, fast end
|
|
19
|
+
fn ease_in_quad(t: int): int {
|
|
20
|
+
return t * t / 10000;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// ease_out_quad: fast start, slow end
|
|
24
|
+
fn ease_out_quad(t: int): int {
|
|
25
|
+
let inv: int = 10000 - t;
|
|
26
|
+
return 10000 - inv * inv / 10000;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ease_in_out_quad: slow start and end, fast middle
|
|
30
|
+
fn ease_in_out_quad(t: int): int {
|
|
31
|
+
if (t < 5000) {
|
|
32
|
+
return 2 * t * t / 10000;
|
|
33
|
+
}
|
|
34
|
+
let inv: int = 10000 - t;
|
|
35
|
+
return 10000 - 2 * inv * inv / 10000;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ─── Cubic ───────────────────────────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
fn ease_in_cubic(t: int): int {
|
|
41
|
+
return t * t / 10000 * t / 10000;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
fn ease_out_cubic(t: int): int {
|
|
45
|
+
let inv: int = 10000 - t;
|
|
46
|
+
return 10000 - inv * inv / 10000 * inv / 10000;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
fn ease_in_out_cubic(t: int): int {
|
|
50
|
+
if (t < 5000) {
|
|
51
|
+
return 4 * t * t / 10000 * t / 10000;
|
|
52
|
+
}
|
|
53
|
+
let inv: int = 10000 - t;
|
|
54
|
+
return 10000 - 4 * inv * inv / 10000 * inv / 10000;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ─── Quartic ──────────────────────────────────────────────────────────────────
|
|
58
|
+
|
|
59
|
+
fn ease_in_quart(t: int): int {
|
|
60
|
+
let t2: int = t * t / 10000;
|
|
61
|
+
return t2 * t2 / 10000;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
fn ease_out_quart(t: int): int {
|
|
65
|
+
let inv: int = 10000 - t;
|
|
66
|
+
let inv2: int = inv * inv / 10000;
|
|
67
|
+
return 10000 - inv2 * inv2 / 10000;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ─── Sine approximation ───────────────────────────────────────────────────────
|
|
71
|
+
// Approximated using polynomial — no actual trig needed for easing
|
|
72
|
+
|
|
73
|
+
// ease_in_sine: t ∈ [0,10000] → starts slow, accelerates
|
|
74
|
+
fn ease_in_sine(t: int): int {
|
|
75
|
+
// ≈ 1 - cos(t*π/2) using polynomial: 1 - (1 - t²/2 + t⁴/24)
|
|
76
|
+
let t2: int = t * t / 10000;
|
|
77
|
+
let t4: int = t2 * t2 / 10000;
|
|
78
|
+
let cos_approx: int = 10000 - t2 * 4934 / 10000 + t4 * 405 / 10000;
|
|
79
|
+
return 10000 - cos_approx;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
fn ease_out_sine(t: int): int {
|
|
83
|
+
return 10000 - ease_in_sine(10000 - t);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
fn ease_in_out_sine(t: int): int {
|
|
87
|
+
if (t < 5000) {
|
|
88
|
+
return ease_in_sine(t * 2) / 2;
|
|
89
|
+
}
|
|
90
|
+
return 5000 + ease_out_sine((t - 5000) * 2) / 2;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ─── Exponential ─────────────────────────────────────────────────────────────
|
|
94
|
+
|
|
95
|
+
// ease_in_expo: very slow start, explosive end
|
|
96
|
+
fn ease_in_expo(t: int): int {
|
|
97
|
+
if (t <= 0) { return 0; }
|
|
98
|
+
// Approximate 2^(10t-10) ≈ exp_fx((10*t-100000)*693/10000)
|
|
99
|
+
// Simplified: use cubic as proxy for games
|
|
100
|
+
let t3: int = t * t / 10000 * t / 10000;
|
|
101
|
+
return t3;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
fn ease_out_expo(t: int): int {
|
|
105
|
+
if (t >= 10000) { return 10000; }
|
|
106
|
+
return 10000 - ease_in_expo(10000 - t);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// ─── Back (overshoot) ─────────────────────────────────────────────────────────
|
|
110
|
+
|
|
111
|
+
// ease_in_back: slight pullback before moving forward
|
|
112
|
+
// c1 = 1.70158 × 10000 = 17015
|
|
113
|
+
fn ease_in_back(t: int): int {
|
|
114
|
+
let c1: int = 17015; // 1.70158
|
|
115
|
+
let c3: int = c1 + 10000; // c1 + 1
|
|
116
|
+
// t³ * c3 - t² * c1
|
|
117
|
+
let t2: int = t * t / 10000;
|
|
118
|
+
let t3: int = t2 * t / 10000;
|
|
119
|
+
return t3 * c3 / 10000 - t2 * c1 / 10000;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
fn ease_out_back(t: int): int {
|
|
123
|
+
return 10000 - ease_in_back(10000 - t);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
fn ease_in_out_back(t: int): int {
|
|
127
|
+
if (t < 5000) {
|
|
128
|
+
return ease_in_back(t * 2) / 2;
|
|
129
|
+
}
|
|
130
|
+
return 5000 + ease_out_back((t - 5000) * 2) / 2;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ─── Bounce ───────────────────────────────────────────────────────────────────
|
|
134
|
+
|
|
135
|
+
// ease_out_bounce: bounces at the end (ball dropping)
|
|
136
|
+
fn ease_out_bounce(t: int): int {
|
|
137
|
+
let n1: int = 75625; // 7.5625 × 10000
|
|
138
|
+
let d1: int = 27500; // 2.75 × 10000
|
|
139
|
+
// Piecewise: 4 bounce segments
|
|
140
|
+
if (t < 3636) { // t < 1/2.75
|
|
141
|
+
return n1 * t / 10000 * t / 10000;
|
|
142
|
+
}
|
|
143
|
+
if (t < 7272) { // t < 2/2.75
|
|
144
|
+
let t2: int = t - 5454; // t - 1.5/2.75
|
|
145
|
+
return n1 * t2 / 10000 * t2 / 10000 + 7500;
|
|
146
|
+
}
|
|
147
|
+
if (t < 9090) { // t < 2.5/2.75
|
|
148
|
+
let t2: int = t - 8181; // t - 2.25/2.75
|
|
149
|
+
return n1 * t2 / 10000 * t2 / 10000 + 9375;
|
|
150
|
+
}
|
|
151
|
+
let t2: int = t - 9545; // t - 2.625/2.75
|
|
152
|
+
return n1 * t2 / 10000 * t2 / 10000 + 9844;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
fn ease_in_bounce(t: int): int {
|
|
156
|
+
return 10000 - ease_out_bounce(10000 - t);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
fn ease_in_out_bounce(t: int): int {
|
|
160
|
+
if (t < 5000) {
|
|
161
|
+
return ease_in_bounce(t * 2) / 2;
|
|
162
|
+
}
|
|
163
|
+
return 5000 + ease_out_bounce((t - 5000) * 2) / 2;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ─── Smoothstep family ────────────────────────────────────────────────────────
|
|
167
|
+
|
|
168
|
+
// smoothstep already in math.mcrs — re-exported here for convenience
|
|
169
|
+
// smoothstep(t) = 3t² - 2t³
|
|
170
|
+
fn ease_smooth(t: int): int {
|
|
171
|
+
return 3 * t * t / 10000 - 2 * t * t / 10000 * t / 10000;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// smootherstep: even smoother (Ken Perlin)
|
|
175
|
+
// 6t⁵ - 15t⁴ + 10t³
|
|
176
|
+
fn ease_smoother(t: int): int {
|
|
177
|
+
let t2: int = t * t / 10000;
|
|
178
|
+
let t3: int = t2 * t / 10000;
|
|
179
|
+
let t4: int = t3 * t / 10000;
|
|
180
|
+
let t5: int = t4 * t / 10000;
|
|
181
|
+
return 6 * t5 / 10000 - 15 * t4 / 10000 + 10 * t3 / 10000;
|
|
182
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// matrix.mcrs — 2D/3D transformation matrices for Display Entities.
|
|
2
|
+
//
|
|
3
|
+
// MC Display Entities use a 4×4 transformation matrix (left_rotation × scale × right_rotation).
|
|
4
|
+
// This module provides helpers for common transforms.
|
|
5
|
+
//
|
|
6
|
+
// Fixed-point: all values ×10000 unless noted.
|
|
7
|
+
// Angle: degrees ×10000 (e.g. 450000 = 45°)
|
|
8
|
+
//
|
|
9
|
+
// Note: Actual matrix application to entities requires raw() commands.
|
|
10
|
+
// These functions compute the values; use raw() to apply them.
|
|
11
|
+
//
|
|
12
|
+
// Requires: import "stdlib/math" (for sin_fixed, cos_fixed, abs)
|
|
13
|
+
|
|
14
|
+
module library;
|
|
15
|
+
|
|
16
|
+
// ─── 2D transform helpers ────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
// rotate2d_x: x component after 2D rotation by angle_deg×10000
|
|
19
|
+
// rotate2d_x(x, y, 450000) ≈ x*cos45 - y*sin45
|
|
20
|
+
fn rotate2d_x(x: int, y: int, angle_deg: int): int {
|
|
21
|
+
let c: int = cos_fixed(angle_deg / 10000);
|
|
22
|
+
let s: int = sin_fixed(angle_deg / 10000);
|
|
23
|
+
return x * c / 1000 - y * s / 1000;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
fn rotate2d_y(x: int, y: int, angle_deg: int): int {
|
|
27
|
+
let c: int = cos_fixed(angle_deg / 10000);
|
|
28
|
+
let s: int = sin_fixed(angle_deg / 10000);
|
|
29
|
+
return x * s / 1000 + y * c / 1000;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ─── Scale helpers ────────────────────────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
// scale_x(x, sx_fx): scale x by sx_fx (sx_fx ×10000, e.g. 20000 = 2×)
|
|
35
|
+
fn scale_x(x: int, sx_fx: int): int { return x * sx_fx / 10000; }
|
|
36
|
+
fn scale_y(y: int, sy_fx: int): int { return y * sy_fx / 10000; }
|
|
37
|
+
fn scale_z(z: int, sz_fx: int): int { return z * sz_fx / 10000; }
|
|
38
|
+
|
|
39
|
+
// uniform_scale(v, s_fx): apply uniform scale
|
|
40
|
+
fn uniform_scale(v: int, s_fx: int): int { return v * s_fx / 10000; }
|
|
41
|
+
|
|
42
|
+
// ─── 3D rotation (Euler angles, Y-up) ────────────────────────────────────────
|
|
43
|
+
|
|
44
|
+
// rotate_y_x: X component after rotation around Y axis
|
|
45
|
+
fn rotate_y_x(x: int, z: int, angle_deg: int): int {
|
|
46
|
+
let c: int = cos_fixed(angle_deg / 10000);
|
|
47
|
+
let s: int = sin_fixed(angle_deg / 10000);
|
|
48
|
+
return x * c / 1000 + z * s / 1000;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
fn rotate_y_z(x: int, z: int, angle_deg: int): int {
|
|
52
|
+
let c: int = cos_fixed(angle_deg / 10000);
|
|
53
|
+
let s: int = sin_fixed(angle_deg / 10000);
|
|
54
|
+
return 0 - x * s / 1000 + z * c / 1000;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// rotate_x_y: Y component after rotation around X axis
|
|
58
|
+
fn rotate_x_y(y: int, z: int, angle_deg: int): int {
|
|
59
|
+
let c: int = cos_fixed(angle_deg / 10000);
|
|
60
|
+
let s: int = sin_fixed(angle_deg / 10000);
|
|
61
|
+
return y * c / 1000 - z * s / 1000;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
fn rotate_x_z(y: int, z: int, angle_deg: int): int {
|
|
65
|
+
let c: int = cos_fixed(angle_deg / 10000);
|
|
66
|
+
let s: int = sin_fixed(angle_deg / 10000);
|
|
67
|
+
return y * s / 1000 + z * c / 1000;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ─── Display Entity transformation ───────────────────────────────────────────
|
|
71
|
+
// MC Display Entity transformation format:
|
|
72
|
+
// transformation: {left_rotation:[0f,0f,0f,1f], scale:[1f,1f,1f],
|
|
73
|
+
// right_rotation:[0f,0f,0f,1f], translation:[0f,0f,0f]}
|
|
74
|
+
//
|
|
75
|
+
// Quaternion for Y-axis rotation by angle θ:
|
|
76
|
+
// [0, sin(θ/2), 0, cos(θ/2)]
|
|
77
|
+
//
|
|
78
|
+
// These helpers compute quaternion components (×10000)
|
|
79
|
+
|
|
80
|
+
// quat_sin_half(angle_deg_fx): sin(angle/2) ×1000
|
|
81
|
+
// angle_deg_fx: degrees ×10000
|
|
82
|
+
fn quat_sin_half(angle_deg_fx: int): int {
|
|
83
|
+
return sin_fixed(angle_deg_fx / 20000); // angle/2 in degrees, then /10000 for sin_fixed
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
fn quat_cos_half(angle_deg_fx: int): int {
|
|
87
|
+
return cos_fixed(angle_deg_fx / 20000);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// ─── Billboard helpers ────────────────────────────────────────────────────────
|
|
91
|
+
|
|
92
|
+
// billboard_rotation_y(player_yaw_fx): get Y rotation for a billboard facing player
|
|
93
|
+
// player_yaw_fx: player yaw ×10000 (from entity NBT Rotation[0])
|
|
94
|
+
fn billboard_y(player_yaw_fx: int): int {
|
|
95
|
+
// Billboard should face opposite direction
|
|
96
|
+
return (player_yaw_fx + 1800000) % 3600000;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ─── Interpolation for smooth animation ──────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
// lerp_angle(a_fx, b_fx, t): lerp between two angles ×10000, taking shortest path
|
|
102
|
+
fn lerp_angle(a_fx: int, b_fx: int, t: int): int {
|
|
103
|
+
let diff: int = b_fx - a_fx;
|
|
104
|
+
// Normalize to [-1800000, 1800000]
|
|
105
|
+
while (diff > 1800000) { diff = diff - 3600000; }
|
|
106
|
+
while (diff < -1800000) { diff = diff + 3600000; }
|
|
107
|
+
return a_fx + diff * t / 10000;
|
|
108
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// noise.mcrs — Procedural noise functions for Minecraft datapacks.
|
|
2
|
+
//
|
|
3
|
+
// Uses fixed-point arithmetic (×10000 scale).
|
|
4
|
+
// No floating point, no external dependencies.
|
|
5
|
+
//
|
|
6
|
+
// Functions:
|
|
7
|
+
// hash_1d, hash_2d — integer hash (pseudo-random per coordinate)
|
|
8
|
+
// value_noise_1d — smooth 1D value noise [0, 10000]
|
|
9
|
+
// value_noise_2d — smooth 2D value noise [0, 10000]
|
|
10
|
+
// fbm_1d — fractal Brownian motion (octave stacking)
|
|
11
|
+
//
|
|
12
|
+
// Requires: import "stdlib/math" (for lerp, abs, clamp)
|
|
13
|
+
|
|
14
|
+
module library;
|
|
15
|
+
|
|
16
|
+
// ─── Hash functions ───────────────────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
// hash_1d(x): pseudo-random int from a 1D coordinate
|
|
19
|
+
// Returns any int (use % to restrict range)
|
|
20
|
+
fn hash_1d(x: int): int {
|
|
21
|
+
let h: int = x * 374761393;
|
|
22
|
+
h = h + 1013904223;
|
|
23
|
+
h = h * 1664525;
|
|
24
|
+
h = h + (h / 65536);
|
|
25
|
+
return h;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// hash_2d(x, z): pseudo-random int from 2D coordinates
|
|
29
|
+
fn hash_2d(x: int, z: int): int {
|
|
30
|
+
return hash_1d(x + hash_1d(z));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// hash_1d_pos(x): hash in [0, 10000]
|
|
34
|
+
fn hash_1d_pos(x: int): int {
|
|
35
|
+
let h: int = hash_1d(x);
|
|
36
|
+
if (h < 0) { h = 0 - h; }
|
|
37
|
+
return h % 10001;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// hash_2d_pos(x, z): hash in [0, 10000]
|
|
41
|
+
fn hash_2d_pos(x: int, z: int): int {
|
|
42
|
+
let h: int = hash_2d(x, z);
|
|
43
|
+
if (h < 0) { h = 0 - h; }
|
|
44
|
+
return h % 10001;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ─── Value noise ─────────────────────────────────────────────────────────────
|
|
48
|
+
|
|
49
|
+
// value_noise_1d(x_fx): smooth 1D noise at position x_fx (fixed-point ×10000)
|
|
50
|
+
// Returns value in [0, 10000]
|
|
51
|
+
// Uses linear interpolation between random values at integer coords
|
|
52
|
+
fn value_noise_1d(x_fx: int): int {
|
|
53
|
+
let xi: int = x_fx / 10000; // integer part
|
|
54
|
+
let xf: int = x_fx % 10000; // fractional part [0, 9999]
|
|
55
|
+
if (xf < 0) { xf = xf + 10000; xi = xi - 1; }
|
|
56
|
+
|
|
57
|
+
let v0: int = hash_1d_pos(xi);
|
|
58
|
+
let v1: int = hash_1d_pos(xi + 1);
|
|
59
|
+
|
|
60
|
+
// Smooth interpolation using smoothstep on xf
|
|
61
|
+
let t: int = 3 * xf * xf / 10000 - 2 * xf * xf / 10000 * xf / 10000;
|
|
62
|
+
return v0 + (v1 - v0) * t / 10000;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// value_noise_2d(x_fx, z_fx): smooth 2D noise
|
|
66
|
+
// Returns value in [0, 10000]
|
|
67
|
+
fn value_noise_2d(x_fx: int, z_fx: int): int {
|
|
68
|
+
let xi: int = x_fx / 10000;
|
|
69
|
+
let xf: int = x_fx % 10000;
|
|
70
|
+
if (xf < 0) { xf = xf + 10000; xi = xi - 1; }
|
|
71
|
+
|
|
72
|
+
let zi: int = z_fx / 10000;
|
|
73
|
+
let zf: int = z_fx % 10000;
|
|
74
|
+
if (zf < 0) { zf = zf + 10000; zi = zi - 1; }
|
|
75
|
+
|
|
76
|
+
// Bilinear interpolation of 4 corner values
|
|
77
|
+
let v00: int = hash_2d_pos(xi, zi);
|
|
78
|
+
let v10: int = hash_2d_pos(xi + 1, zi);
|
|
79
|
+
let v01: int = hash_2d_pos(xi, zi + 1);
|
|
80
|
+
let v11: int = hash_2d_pos(xi + 1, zi + 1);
|
|
81
|
+
|
|
82
|
+
// Smooth t values
|
|
83
|
+
let tx: int = 3 * xf * xf / 10000 - 2 * xf * xf / 10000 * xf / 10000;
|
|
84
|
+
let tz: int = 3 * zf * zf / 10000 - 2 * zf * zf / 10000 * zf / 10000;
|
|
85
|
+
|
|
86
|
+
// Bilinear interpolation
|
|
87
|
+
let vz0: int = v00 + (v10 - v00) * tx / 10000;
|
|
88
|
+
let vz1: int = v01 + (v11 - v01) * tx / 10000;
|
|
89
|
+
return vz0 + (vz1 - vz0) * tz / 10000;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// ─── Fractal Brownian Motion ──────────────────────────────────────────────────
|
|
93
|
+
|
|
94
|
+
// fbm_1d(x_fx, octaves, persistence_fx):
|
|
95
|
+
// x_fx: position ×10000
|
|
96
|
+
// octaves: number of noise layers (1-6, more = more detail)
|
|
97
|
+
// persistence_fx: amplitude decay per octave ×10000 (typical: 5000 = 0.5)
|
|
98
|
+
// Returns value in approximately [0, 10000]
|
|
99
|
+
fn fbm_1d(x_fx: int, octaves: int, persistence_fx: int): int {
|
|
100
|
+
let value: int = 0;
|
|
101
|
+
let amplitude: int = 10000;
|
|
102
|
+
let frequency: int = 10000; // ×10000 multiplier (starts at 1.0)
|
|
103
|
+
let max_val: int = 0; // for normalization
|
|
104
|
+
|
|
105
|
+
let oct: int = 0;
|
|
106
|
+
while (oct < octaves) {
|
|
107
|
+
let sample_x: int = x_fx * frequency / 10000;
|
|
108
|
+
value = value + value_noise_1d(sample_x) * amplitude / 10000;
|
|
109
|
+
max_val = max_val + amplitude;
|
|
110
|
+
amplitude = amplitude * persistence_fx / 10000;
|
|
111
|
+
frequency = frequency * 2;
|
|
112
|
+
oct = oct + 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Normalize to [0, 10000]
|
|
116
|
+
if (max_val <= 0) { return 0; }
|
|
117
|
+
return value * 10000 / max_val;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// fbm_2d(x_fx, z_fx, octaves, persistence_fx): 2D fractal Brownian motion
|
|
121
|
+
fn fbm_2d(x_fx: int, z_fx: int, octaves: int, persistence_fx: int): int {
|
|
122
|
+
let value: int = 0;
|
|
123
|
+
let amplitude: int = 10000;
|
|
124
|
+
let frequency: int = 10000;
|
|
125
|
+
let max_val: int = 0;
|
|
126
|
+
|
|
127
|
+
let oct: int = 0;
|
|
128
|
+
while (oct < octaves) {
|
|
129
|
+
let sx: int = x_fx * frequency / 10000;
|
|
130
|
+
let sz: int = z_fx * frequency / 10000;
|
|
131
|
+
value = value + value_noise_2d(sx, sz) * amplitude / 10000;
|
|
132
|
+
max_val = max_val + amplitude;
|
|
133
|
+
amplitude = amplitude * persistence_fx / 10000;
|
|
134
|
+
frequency = frequency * 2;
|
|
135
|
+
oct = oct + 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (max_val <= 0) { return 0; }
|
|
139
|
+
return value * 10000 / max_val;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// ─── Convenience: terrain height ─────────────────────────────────────────────
|
|
143
|
+
|
|
144
|
+
// terrain_height(x, z, base_y, amplitude):
|
|
145
|
+
// Generates a terrain height using 3-octave fbm.
|
|
146
|
+
// x, z: block coordinates (integers, NOT fixed-point)
|
|
147
|
+
// base_y: baseline height in blocks
|
|
148
|
+
// amplitude: max height variation in blocks
|
|
149
|
+
fn terrain_height(x: int, z: int, base_y: int, amplitude: int): int {
|
|
150
|
+
// Scale x,z by ×10000 for fixed-point, divide by 4 for wider features
|
|
151
|
+
let noise: int = fbm_2d(x * 2500, z * 2500, 3, 5000);
|
|
152
|
+
return base_y + noise * amplitude / 10000;
|
|
153
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// physics.mcrs — Simple physics simulation for Minecraft datapacks.
|
|
2
|
+
//
|
|
3
|
+
// Fixed-point convention: positions/velocities ×100 (1 block = 100 units)
|
|
4
|
+
// Time unit: 1 tick = 1/20 second
|
|
5
|
+
// Gravity: MC default ≈ 0.08 blocks/tick² = 8 units/tick²
|
|
6
|
+
//
|
|
7
|
+
// All functions operate on components separately (x, y, z).
|
|
8
|
+
// No vector types — returns each axis independently for MC compatibility.
|
|
9
|
+
|
|
10
|
+
module library;
|
|
11
|
+
|
|
12
|
+
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
13
|
+
|
|
14
|
+
fn gravity_fx(): int { return 8; } // 0.08 blocks/tick² × 100
|
|
15
|
+
fn air_drag_fx(): int { return 9800; } // 0.98 drag factor × 10000 (per tick)
|
|
16
|
+
fn water_drag_fx(): int { return 8000; } // 0.80 drag (in water)
|
|
17
|
+
|
|
18
|
+
// ─── Projectile motion ────────────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
// projectile_pos(p0, v0, t): position after t ticks with initial velocity v0
|
|
21
|
+
// p0, v0: ×100 (blocks × 100), t: ticks
|
|
22
|
+
// No drag, constant gravity
|
|
23
|
+
fn projectile_y(p0: int, v0: int, t: int): int {
|
|
24
|
+
return p0 + v0 * t - gravity_fx() * t * t / 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
fn projectile_x(p0: int, v0: int, t: int): int {
|
|
28
|
+
return p0 + v0 * t;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// projectile_vy(v0, t): Y velocity after t ticks (with gravity)
|
|
32
|
+
fn projectile_vy(v0: int, t: int): int {
|
|
33
|
+
return v0 - gravity_fx() * t;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// projectile_land_t(v0y): approximate tick when Y returns to 0
|
|
37
|
+
// t = 2*v0y / gravity
|
|
38
|
+
fn projectile_land_t(v0y: int): int {
|
|
39
|
+
if (v0y <= 0) { return 0; }
|
|
40
|
+
return 2 * v0y / gravity_fx();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// projectile_max_height(v0y): maximum height reached ×100
|
|
44
|
+
// h = v0y² / (2*gravity)
|
|
45
|
+
fn projectile_max_height(v0y: int): int {
|
|
46
|
+
return v0y * v0y / (2 * gravity_fx());
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// ─── Velocity with drag ───────────────────────────────────────────────────────
|
|
50
|
+
|
|
51
|
+
// apply_drag(v_fx, drag_fx): apply drag to velocity
|
|
52
|
+
// v_fx: velocity ×100, drag_fx: drag factor ×10000
|
|
53
|
+
fn apply_drag(v_fx: int, drag_fx: int): int {
|
|
54
|
+
return v_fx * drag_fx / 10000;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// apply_gravity(vy_fx): apply one tick of gravity to Y velocity
|
|
58
|
+
fn apply_gravity(vy_fx: int): int {
|
|
59
|
+
return vy_fx - gravity_fx();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// update_pos(p_fx, v_fx): update position by one tick
|
|
63
|
+
fn update_pos(p_fx: int, v_fx: int): int {
|
|
64
|
+
return p_fx + v_fx;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ─── Collision / bounce ───────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
// bounce_v(v_fx, restitution_fx): reflect velocity with energy loss
|
|
70
|
+
// restitution_fx ×10000: 10000=elastic, 5000=half energy, 0=inelastic
|
|
71
|
+
fn bounce_v(v_fx: int, restitution_fx: int): int {
|
|
72
|
+
let neg: int = 0 - v_fx;
|
|
73
|
+
return neg * restitution_fx / 10000;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// clamp_velocity(v_fx, max_fx): clamp speed to max
|
|
77
|
+
fn clamp_velocity(v_fx: int, max_fx: int): int {
|
|
78
|
+
if (v_fx > max_fx) { return max_fx; }
|
|
79
|
+
if (v_fx < 0 - max_fx) { return 0 - max_fx; }
|
|
80
|
+
return v_fx;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// ─── Spring physics ───────────────────────────────────────────────────────────
|
|
84
|
+
|
|
85
|
+
// spring_force(pos_fx, target_fx, k_fx): Hooke's law F = -k(x - target)
|
|
86
|
+
// k_fx: spring constant ×10000
|
|
87
|
+
fn spring_force(pos_fx: int, target_fx: int, k_fx: int): int {
|
|
88
|
+
return (target_fx - pos_fx) * k_fx / 10000;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// spring_update_v(v_fx, pos_fx, target_fx, k_fx, damping_fx):
|
|
92
|
+
// update velocity with spring force and damping
|
|
93
|
+
fn spring_update_v(v_fx: int, pos_fx: int, target_fx: int, k_fx: int, damping_fx: int): int {
|
|
94
|
+
let force: int = spring_force(pos_fx, target_fx, k_fx);
|
|
95
|
+
let damped: int = v_fx * damping_fx / 10000;
|
|
96
|
+
return damped + force;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// ─── Circular motion ─────────────────────────────────────────────────────────
|
|
100
|
+
|
|
101
|
+
// circular_x(cx, r, angle_deg): X position on circle
|
|
102
|
+
// cx: center X ×100, r: radius ×100, angle_deg: degrees (NOT ×10000)
|
|
103
|
+
fn circular_x(cx: int, r: int, angle_deg: int): int {
|
|
104
|
+
return cx + r * cos_fixed(angle_deg) / 1000;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
fn circular_z(cz: int, r: int, angle_deg: int): int {
|
|
108
|
+
return cz + r * sin_fixed(angle_deg) / 1000;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ─── Friction ────────────────────────────────────────────────────────────────
|
|
112
|
+
|
|
113
|
+
// friction_decel(v_fx, friction_fx): reduce velocity toward zero by friction
|
|
114
|
+
// friction_fx ×100: amount subtracted per tick (absolute)
|
|
115
|
+
fn friction_decel(v_fx: int, friction_fx: int): int {
|
|
116
|
+
if (v_fx > friction_fx) { return v_fx - friction_fx; }
|
|
117
|
+
if (v_fx < 0 - friction_fx) { return v_fx + friction_fx; }
|
|
118
|
+
return 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// ─── Impact detection ────────────────────────────────────────────────────────
|
|
122
|
+
|
|
123
|
+
// is_grounded(y_fx, ground_y_fx): returns 1 if at or below ground
|
|
124
|
+
fn is_grounded(y_fx: int, ground_y_fx: int): int {
|
|
125
|
+
if (y_fx <= ground_y_fx) { return 1; }
|
|
126
|
+
return 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// impact_velocity(h_fx): velocity after falling from height h (blocks ×100)
|
|
130
|
+
// v = sqrt(2*g*h), approximated
|
|
131
|
+
fn impact_velocity(h_fx: int): int {
|
|
132
|
+
if (h_fx <= 0) { return 0; }
|
|
133
|
+
return isqrt(2 * gravity_fx() * h_fx / 100) * 10;
|
|
134
|
+
}
|