#remember most recent movement
scoreboard players operation @s moveCommitPrev = @s moveCommit

execute if entity @s[scores={moveCommit=1}] run function bd:movement/object/commit_1
execute if entity @s[scores={moveCommit=3}] run function bd:movement/object/commit_3
execute if entity @s[scores={moveCommit=5}] run function bd:movement/object/commit_5
execute if entity @s[scores={moveCommit=7}] run function bd:movement/object/commit_7

execute if entity @s[scores={moveCommit=9,moveCommitTime=4}] at @s run playsound minecraft:ui.toast.in master @a ~ ~ ~ 5 1.3

execute if entity @s[scores={moveCommit=10}] run function bd:movement/object/commit_10
#commit 11 just tps down 1 block, handled in check_location
#commit 12 just tps up 1 block, handled in check_location

scoreboard players remove @s moveCommitTime 1
execute if entity @s[tag=!moving_block,scores={moveCommitTime=..0}] at @s run function bd:movement/object/check_location
execute if entity @s[tag=moving_block,scores={moveCommitTime=..0}] at @s positioned ~ ~1.5 ~ run function bd:movement/object/check_location
execute if entity @s[scores={moveCommitTime=..0}] run scoreboard players set @s moveCommit 0