state_enter.mcfunction 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 friendlyFire false
  19. team modify hub_watch prefix {"text":" ◇ ","color":"white"}
  20. team modify hub_watch suffix " "
  21. team remove hub_play
  22. team add hub_play "准备"
  23. team modify hub_play collisionRule never
  24. team modify hub_play friendlyFire false
  25. team modify hub_play prefix {"text":" ◆ ","color":"green"}
  26. team modify hub_play suffix " "
  27. # 实体
  28. function ltw:init/entity
  29. function ltw:state/0/sp/refresh_entity
  30. # 玩家
  31. execute as @a[team=!debug] run function ltw:state/0/player_enter
  32. # ——————————————————————————————————————————————
  33. # TODO: 未完成的重构
  34. # 重置开始倒计时
  35. #scoreboard players set #start_countdown mem 9999999
  36. # 启用节奏跑酷
  37. #scoreboard players set $tempo_enable mem 1
  38. #function ltw:state/0/parkour/tempo_block/marker_spawn
  39. # bossbar
  40. #scoreboard players set $bossbar_type mem 0
  41. #function lib:bossbar/show