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 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. # 重置开始倒计时
  34. #scoreboard players set #start_countdown mem 9999999
  35. # 启用节奏跑酷
  36. #scoreboard players set $tempo_enable mem 1
  37. #function ltw:state/0/parkour/tempo_block/marker_spawn
  38. # bossbar
  39. #scoreboard players set $bossbar_type mem 0
  40. #function lib:bossbar/show