tick2.mcfunction 1.1 KB

1234567891011121314151617181920212223242526272829
  1. # 每 2 Tick 执行一次
  2. schedule function ltw:clock/tick2 2t replace
  3. # 调用其他模块
  4. execute if score $state mem matches 0 run function ltw:state/0/tick2
  5. # execute if score $state mem matches 3 run function ltw:state/3/tick2
  6. # execute if score $state mem matches 4 run function ltw:state/4/tick2
  7. # execute if score $state mem matches 5 run function ltw:state/5/tick2
  8. # execute if score $state mem matches 6 run function ltw:state/6/tick2
  9. # execute if score $state mem matches 7 run function ltw:state/7/tick2
  10. # function lib:bossbar/tick2
  11. # 物品模块必须最后调用,以清理弹出的临时物品
  12. function item:tick2
  13. # TODO: 未完成的重构
  14. # # 死亡触发
  15. # execute as @a[x=-12,y=7,z=-102,distance=..5] at @s run function ltw:main/player_death
  16. # execute as @a[x=-12,y=7,z=-102,distance=..5] run tp @s -13 9 -42
  17. # # 特殊方块给予效果
  18. # function lib:effect/floating
  19. # # 调用粒子模块
  20. # function item:particle/show_particle
  21. # # 全局倒计时
  22. # execute if score $countdown_fast mem matches 1.. run scoreboard players remove $countdown_fast mem 1
  23. # scoreboard players remove @e[scores={countdown_fast=1..}] countdown_fast 1