tick20.mcfunction 861 B

12345678910111213141516
  1. # 地狱门音效
  2. scoreboard players set $random_max mem 3
  3. scoreboard players set $random_min mem 1
  4. function lib:random
  5. execute if score $random mem matches 2 run playsound block.portal.ambient ambient @a 1014.5 22 1057.5
  6. # 显示倒计时
  7. execute if score $countdown mem matches ..15 run title @a times 3 14 2
  8. execute if score $countdown mem matches ..15 run title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
  9. execute if score $countdown mem matches ..15 run title @a title [""]
  10. execute if score $countdown mem matches ..15 as @a at @s run function lib:sounds/hit2
  11. # -15s:提示游戏结束
  12. execute if score $countdown mem matches 15 run tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"text": "遗迹即将关闭!","color":"aqua"}]
  13. # 0s:游戏结束
  14. execute if score $countdown mem matches 0 run function mini:main/game_end