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

@@ -23,16 +23,16 @@
"conditions": { "conditions": {
"position": { "position": {
"x": { "x": {
"min": -2, "min": 25,
"max": 2 "max": 30
}, },
"y": { "y": {
"min": 72, "min": 60,
"max": 78 "max": 70
}, },
"z": { "z": {
"min": 78, "min": -30,
"max": 82 "max": -40
} }
} }
} }

View File

@@ -0,0 +1,26 @@
{
"display": {
"title": {
"text": "Whoosh!"
},
"description": {
"text": "Ride the High Speed Rail!"
},
"icon": {
"item": "minecraft:powered_rail"
},
"frame": "goal",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"meetingjoin": {
"trigger": "minecraft:impossible"
}
},
"rewards": {
"experience": 5
},
"parent": "craftytable:root"
}

View File

@@ -1 +1 @@
{"values": ["tctvote:load", "tctcoins:load"]} {"values": ["tctvote:load", "tctcoins:load", "tctrail:load"]}

View File

@@ -1 +1 @@
{"values": ["tctvote:tick"]} {"values": ["tctvote:tick", "tctrail:tick"]}

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

View File

@@ -1,6 +1,6 @@
{ {
"pack": { "pack": {
"pack_format": 6, "pack_format": 10,
"description": "Crafty Table Datapack\nMade by Juris_LLM" "description": "Crafty Table Datapack\nMade by Juris_LLM"
} }
} }