tick20.mcfunction 1.0 KB

12345678910111213141516171819202122232425262728
  1. # 每秒执行一次
  2. schedule function ltw:clock/tick20 20t replace
  3. # 恢复生命
  4. execute if score $state mem matches 0 run effect give @a instant_health 1 10 true
  5. # 调用其他模块
  6. function ltw:main/tick20
  7. function lib:music/tick20
  8. # TODO: 未完成的重构
  9. # function lib:bossbar/tick20
  10. # execute if score $state mem matches 3 run function ltw:state/3/tick20
  11. # execute if score $state mem matches 4 run function ltw:state/4/tick20
  12. # execute if score $state mem matches 5 run function ltw:state/5/tick20
  13. # execute if score $state mem matches 6 run function ltw:state/6/tick20
  14. # execute if score $state mem matches 7 run function ltw:state/7/tick20
  15. # # 特殊方块给予效果
  16. # function lib:effect/regen
  17. # # 全局倒计时
  18. # execute if score $countdown mem matches 1.. run scoreboard players remove $countdown mem 1
  19. # scoreboard players remove @e[scores={countdown=1..}] countdown 1
  20. # # 4 秒一次
  21. # scoreboard players add $foursec mem 1
  22. # execute if score $foursec mem matches 4.. run scoreboard players set $foursec mem 0