player_enter.mcfunction 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # 当玩家加入游戏时触发
  2. spawnpoint @s -12 7 -102
  3. # TODO: v0.3 升级函数
  4. execute if entity @s[tag=!v02upgrade,scores={stat_total=1..}] run function ltw:main/player_upgrade
  5. tag @s add v02upgrade
  6. advancement revoke @s only lib:damage_dealt
  7. advancement revoke @s only lib:damage_taken
  8. advancement revoke @s only item:container/place
  9. advancement revoke @s only item:special/consume_enchanted_apple
  10. advancement revoke @s only item:special/consume_golden_apple
  11. execute as @a at @s run function lib:sounds/hit
  12. # 存储UUID
  13. execute store result score @s UUID run data get entity @s UUID[0]
  14. # 如果是旁观者或局号不对头:开始旁观
  15. execute if entity @s[team=!playing] run function ltw:main/player_enter_watcher
  16. execute if entity @s[team=playing] unless score @s game_id = $ game_id run function ltw:main/player_enter_watcher
  17. # 如果不是旁观且局号正确:游戏中掉线
  18. execute if entity @s[team=playing] if score @s game_id = $ game_id run function ltw:main/player_enter_rejoin
  19. # 更新 Bossbar
  20. bossbar set ltw:notice players @a
  21. function lib:bossbar/show
  22. # 无指定人员
  23. # FIXME: 关掉 JourneyMap 的生物雷达
  24. # TODO: {TNTRun} 哭泣的黑曜石的光照更新导致了严重的卡顿
  25. # LTCat
  26. # FIXME: 尝试偷 3 分时只会偷到 0 分
  27. # FIXME: 继续尝试修改过场动画
  28. # HIM
  29. # TODO: {贸易} 让每条出售交易都有 30% 的概率打 7 折
  30. # 010
  31. # TODO: 升级 1.16.5(不过得先等 OptiFine 更新)
  32. # TODO: {幻翼} 制作幻翼的成品地图