state_enter.mcfunction 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # 在系统进入状态时触发
  2. scoreboard players set $state mem 0
  3. # HUD
  4. scoreboard objectives setdisplay belowName
  5. scoreboard objectives setdisplay sidebar
  6. scoreboard objectives setdisplay list
  7. # 区域
  8. forceload remove all
  9. forceload add 0 0
  10. forceload add 31 -17 -31 -80
  11. # 规则
  12. function ltw:init/gamerule
  13. gamerule naturalRegeneration true
  14. # 队伍
  15. team remove hub_watch
  16. team add hub_watch "旁观"
  17. team modify hub_watch collisionRule never
  18. team modify hub_watch prefix {"text":" ◇ ","color":"white"}
  19. team modify hub_watch suffix " "
  20. team remove hub_play
  21. team add hub_play "准备"
  22. team modify hub_play collisionRule never
  23. team modify hub_play prefix {"text":" ◆ ","color":"green"}
  24. team modify hub_play suffix " "
  25. # 实体
  26. function ltw:init/entity
  27. function ltw:state/0/sp/refresh_entity
  28. # 玩家
  29. execute as @a[team=!debug] run function ltw:state/0/player_enter
  30. # ——————————————————————————————————————————————
  31. # 重置开始倒计时
  32. scoreboard players set $start_countdown mem 9999999
  33. # TODO: 未完成的重构
  34. # 启用节奏跑酷
  35. #scoreboard players set $tempo_enable mem 1
  36. #function ltw:state/0/parkour/tempo_block/marker_spawn
  37. # bossbar
  38. #scoreboard players set $bossbar_type mem 0
  39. #function lib:bossbar/show