Files
data
pack.mcmeta
Code
27 438
data/skybreaker/functions/ritual/tick.mcfunction
# ── Ritual Tick (runs for each player with sb_ritual >= 1) ───────────────────
# Increment timer
scoreboard players add @s sb_ritual 1
# Particle effects every 5 ticks
execute if score @s sb_ritual matches 1..1200 at @s run function skybreaker:ritual/particles
# Ambient sound every 40 ticks
execute if score @s sb_ritual matches 1 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 40 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 80 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 120 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 160 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 200 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 240 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 280 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 320 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 360 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 400 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 440 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 480 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 520 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 560 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 600 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 640 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 680 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 720 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 760 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 800 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 840 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 880 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 920 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 960 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 1000 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 1040 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 1080 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
execute if score @s sb_ritual matches 1120 run playsound minecraft:ambient.soul_sand_valley.mood master @s ~ ~ ~ 1 0.8
execute if score @s sb_ritual matches 1160 run playsound minecraft:block.portal.ambient master @s ~ ~ ~ 0.5 1.2
# Countdown titles at key moments
execute if score @s sb_ritual matches 600 run title @s actionbar {"text":"30 seconds remaining...","color":"yellow"}
execute if score @s sb_ritual matches 900 run title @s actionbar {"text":"15 seconds remaining...","color":"gold"}
execute if score @s sb_ritual matches 1080 run title @s actionbar {"text":"10 seconds remaining!","color":"red","bold":true}
execute if score @s sb_ritual matches 1140 run title @s actionbar {"text":"5...","color":"red","bold":true}
execute if score @s sb_ritual matches 1160 run title @s actionbar {"text":"4...","color":"red","bold":true}
execute if score @s sb_ritual matches 1180 run title @s actionbar {"text":"3...","color":"red","bold":true}
execute if score @s sb_ritual matches 1190 run title @s actionbar {"text":"2...","color":"red","bold":true}
execute if score @s sb_ritual matches 1195 run title @s actionbar {"text":"1...","color":"red","bold":true}
# Completion at 1200 ticks (60 seconds)
execute if score @s sb_ritual matches 1200.. run function skybreaker:ritual/complete
# Apply blindness/darkness during ritual for dramatic effect
effect give @s darkness 2 1 true