tick20.mcfunction 1.1 KB

1234567891011121314151617181920212223242526
  1. # 每秒执行一次
  2. schedule function ltw:clock/tick20 20t replace
  3. # 调用其他模块
  4. function item:tick20
  5. function lib:bossbar/tick20
  6. execute if score $state mem matches 0 run function ltw:state/0/tick20
  7. execute if score $state mem matches 3 run function ltw:state/3/tick20
  8. execute if score $state mem matches 4 run function ltw:state/4/tick20
  9. execute if score $state mem matches 5 run function ltw:state/5/tick20
  10. execute if score $state mem matches 6 run function ltw:state/6/tick20
  11. execute if score $state mem matches 7 run function ltw:state/7/tick20
  12. # 全局倒计时
  13. execute if score $countdown mem matches 1.. run scoreboard players remove $countdown mem 1
  14. scoreboard players remove @e[scores={countdown=1..}] countdown 1
  15. # 两秒一次
  16. scoreboard players add $twice mem 1
  17. execute if score $twice mem matches 2.. run scoreboard players set $twice mem 0
  18. # 掐死原版 BGM
  19. stopsound @a music music.game
  20. stopsound @a music music.creative
  21. # 特殊方块给予效果
  22. execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 1 true