tick2.mcfunction 1.2 KB

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