diff --git a/data/craftytable/advancements/root.json b/data/craftytable/advancements/root.json index 3c046bb..94084ae 100644 --- a/data/craftytable/advancements/root.json +++ b/data/craftytable/advancements/root.json @@ -23,16 +23,16 @@ "conditions": { "position": { "x": { - "min": -2, - "max": 2 + "min": 25, + "max": 30 }, "y": { - "min": 72, - "max": 78 + "min": 60, + "max": 70 }, "z": { - "min": 78, - "max": 82 + "min": -30, + "max": -40 } } } diff --git a/data/craftytable/advancements/whoosh.json b/data/craftytable/advancements/whoosh.json new file mode 100644 index 0000000..ce003fc --- /dev/null +++ b/data/craftytable/advancements/whoosh.json @@ -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" +} \ No newline at end of file diff --git a/data/minecraft/tags/functions/load.json b/data/minecraft/tags/functions/load.json index b614ef5..b54e36e 100644 --- a/data/minecraft/tags/functions/load.json +++ b/data/minecraft/tags/functions/load.json @@ -1 +1 @@ -{"values": ["tctvote:load", "tctcoins:load"]} \ No newline at end of file +{"values": ["tctvote:load", "tctcoins:load", "tctrail:load"]} \ No newline at end of file diff --git a/data/minecraft/tags/functions/tick.json b/data/minecraft/tags/functions/tick.json index 2f76e3e..ac3681d 100644 --- a/data/minecraft/tags/functions/tick.json +++ b/data/minecraft/tags/functions/tick.json @@ -1 +1 @@ -{"values": ["tctvote:tick"]} \ No newline at end of file +{"values": ["tctvote:tick", "tctrail:tick"]} \ No newline at end of file diff --git a/data/tctrail/functions/boost_east.mcfunction b/data/tctrail/functions/boost_east.mcfunction new file mode 100644 index 0000000..2d1cf70 --- /dev/null +++ b/data/tctrail/functions/boost_east.mcfunction @@ -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 \ No newline at end of file diff --git a/data/tctrail/functions/boost_north.mcfunction b/data/tctrail/functions/boost_north.mcfunction new file mode 100644 index 0000000..2aa5f0e --- /dev/null +++ b/data/tctrail/functions/boost_north.mcfunction @@ -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 \ No newline at end of file diff --git a/data/tctrail/functions/boost_south.mcfunction b/data/tctrail/functions/boost_south.mcfunction new file mode 100644 index 0000000..3b3f411 --- /dev/null +++ b/data/tctrail/functions/boost_south.mcfunction @@ -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 \ No newline at end of file diff --git a/data/tctrail/functions/boost_west.mcfunction b/data/tctrail/functions/boost_west.mcfunction new file mode 100644 index 0000000..9acc6b6 --- /dev/null +++ b/data/tctrail/functions/boost_west.mcfunction @@ -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 \ No newline at end of file diff --git a/data/tctrail/functions/load.mcfunction b/data/tctrail/functions/load.mcfunction new file mode 100644 index 0000000..f0a9a9c --- /dev/null +++ b/data/tctrail/functions/load.mcfunction @@ -0,0 +1 @@ +scoreboard objectives add boostLength dummy \ No newline at end of file diff --git a/data/tctrail/functions/stop.mcfunction b/data/tctrail/functions/stop.mcfunction new file mode 100644 index 0000000..1c0687c --- /dev/null +++ b/data/tctrail/functions/stop.mcfunction @@ -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}] \ No newline at end of file diff --git a/data/tctrail/functions/tick.mcfunction b/data/tctrail/functions/tick.mcfunction new file mode 100644 index 0000000..eb3f521 --- /dev/null +++ b/data/tctrail/functions/tick.mcfunction @@ -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 \ No newline at end of file diff --git a/pack.mcmeta b/pack.mcmeta index 8c6901a..1e4d90a 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -1,6 +1,6 @@ { "pack": { - "pack_format": 6, + "pack_format": 10, "description": "Crafty Table Datapack\nMade by Juris_LLM" } } \ No newline at end of file