#solid block? invalid move
execute unless block ~ ~ ~ #bd:can_move run scoreboard players set global validMove 0

#pushable block? recursion forward
execute if block ~ ~ ~ #bd:pushable positioned ~ ~1 ~ run function bd:movement/check_move/y_positive_push
execute if block ~ ~ ~ #bd:pushable_one_only positioned ~ ~1 ~ run function bd:movement/check_move/y_positive_no_recursion

#z-axis linked blocks must travel together
execute if block ~ ~ ~ #bd:z_axis_linked if block ~ ~ ~-1 #bd:z_axis_linked positioned ~ ~1 ~-1 run function bd:movement/check_move/y_positive_push
execute if block ~ ~ ~ #bd:z_axis_linked if block ~ ~ ~1 #bd:z_axis_linked positioned ~ ~1 ~1 run function bd:movement/check_move/y_positive_push

#x-axis linked blocks must travel together
execute if block ~ ~ ~ #bd:x_axis_linked if block ~ ~ ~-1 #bd:x_axis_linked positioned ~-1 ~1 ~ run function bd:movement/check_move/y_positive_push
execute if block ~ ~ ~ #bd:x_axis_linked if block ~ ~ ~1 #bd:x_axis_linked positioned ~1 ~1 ~ run function bd:movement/check_move/y_positive_push