Files
TCT-Datapack/data/tctrail/functions/tick.mcfunction

6 lines
661 B
MCFunction

scoreboard players remove @e[type=minecart,scores={boostLength=0..}] boostLength 1
execute as @e[type=minecart,scores={boostLength=-1}] run function tctrail:stop
execute at @e[type=minecart,tag=boost_east,scores={boostLength=0..}] run tp @e[type=minecart,limit=1,sort=nearest] ~3.0 ~ ~
execute at @e[type=minecart,tag=boost_west,scores={boostLength=0..}] run tp @e[type=minecart,limit=1,sort=nearest] ~-3.0 ~ ~
execute at @e[type=minecart,tag=boost_north,scores={boostLength=0..}] run tp @e[type=minecart,limit=1,sort=nearest] ~ ~ ~-3.0
execute at @e[type=minecart,tag=boost_south,scores={boostLength=0..}] run tp @e[type=minecart,limit=1,sort=nearest] ~ ~ ~3.0