Added support for high speed rail
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
26
data/craftytable/advancements/whoosh.json
Normal file
26
data/craftytable/advancements/whoosh.json
Normal 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"
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
{"values": ["tctvote:load", "tctcoins:load"]}
|
{"values": ["tctvote:load", "tctcoins:load", "tctrail:load"]}
|
||||||
@@ -1 +1 @@
|
|||||||
{"values": ["tctvote:tick"]}
|
{"values": ["tctvote:tick", "tctrail:tick"]}
|
||||||
2
data/tctrail/functions/boost_east.mcfunction
Normal file
2
data/tctrail/functions/boost_east.mcfunction
Normal 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
|
||||||
2
data/tctrail/functions/boost_north.mcfunction
Normal file
2
data/tctrail/functions/boost_north.mcfunction
Normal 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
|
||||||
2
data/tctrail/functions/boost_south.mcfunction
Normal file
2
data/tctrail/functions/boost_south.mcfunction
Normal 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
|
||||||
2
data/tctrail/functions/boost_west.mcfunction
Normal file
2
data/tctrail/functions/boost_west.mcfunction
Normal 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
|
||||||
1
data/tctrail/functions/load.mcfunction
Normal file
1
data/tctrail/functions/load.mcfunction
Normal file
@@ -0,0 +1 @@
|
|||||||
|
scoreboard objectives add boostLength dummy
|
||||||
9
data/tctrail/functions/stop.mcfunction
Normal file
9
data/tctrail/functions/stop.mcfunction
Normal 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}]
|
||||||
6
data/tctrail/functions/tick.mcfunction
Normal file
6
data/tctrail/functions/tick.mcfunction
Normal 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
|
||||||
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user