execute at @e[type=minecart,scores={boostLength=-1},tag=boost_east] run data merge entity @e[type=minecart,sort=nearest,limit=1] {Motion:[1.0,0.0,0.0]} execute at @e[type=minecart,scores={boostLength=-1},tag=boost_west] run data merge entity @e[type=minecart,sort=nearest,limit=1] {Motion:[-1.0,0.0,0.0]} execute at @e[type=minecart,scores={boostLength=-1},tag=boost_north] run data merge entity @e[type=minecart,sort=nearest,limit=1] {Motion:[0.0,0.0,-1.0]} execute at @e[type=minecart,scores={boostLength=-1},tag=boost_south] run data merge entity @e[type=minecart,sort=nearest,limit=1] {Motion:[0.0,0.0,1.0]} tag @e[type=minecart,scores={boostLength=-1}] remove boost_east tag @e[type=minecart,scores={boostLength=-1}] remove boost_west tag @e[type=minecart,scores={boostLength=-1}] remove boost_north tag @e[type=minecart,scores={boostLength=-1}] remove boost_south scoreboard players reset @e[type=minecart,scores={boostLength=-1}]