Added support for high speed rail

This commit is contained in:
2025-06-22 21:54:16 +02:00
parent 9e1e85623b
commit 706d803411
12 changed files with 59 additions and 9 deletions

View File

@@ -0,0 +1,2 @@
tag @e[type=minecart,limit=1,sort=nearest] add boost_east
advancement grant @a[limit=1,sort=nearest] only craftytable:whoosh

View File

@@ -0,0 +1,2 @@
tag @e[type=minecart,limit=1,sort=nearest] add boost_north
advancement grant @a[limit=1,sort=nearest] only craftytable:whoosh

View File

@@ -0,0 +1,2 @@
tag @e[type=minecart,limit=1,sort=nearest] add boost_south
advancement grant @a[limit=1,sort=nearest] only craftytable:whoosh

View File

@@ -0,0 +1,2 @@
tag @e[type=minecart,limit=1,sort=nearest] add boost_west
advancement grant @a[limit=1,sort=nearest] only craftytable:whoosh

View File

@@ -0,0 +1 @@
scoreboard objectives add boostLength dummy

View File

@@ -0,0 +1,9 @@
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}]

View File

@@ -0,0 +1,6 @@
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