tick5.mcfunction 865 B

1234567891011121314
  1. # 判断玩家是否处于准备状态
  2. # tag @a remove lobby_ready
  3. # tag @a remove lobby_watch
  4. # tag @a[x=-24,y=8,z=-32,dx=5,dy=5,dz=5] add lobby_ready
  5. # tag @a[tag=!lobby_ready] add lobby_watch
  6. execute as @a[tag=!lobby_ready,tag=!lobby_watch] run function item:lobby_state/join_watch
  7. # 给予进度
  8. execute as @a at @s if entity @s[x=-1,y=22,z=-29,dx=5,dy=3,dz=3] run advancement grant @s only ltw:parkour/explore_1
  9. execute as @a at @s if entity @s[x=6,y=48,z=-32,dx=4,dy=3,dz=9] run advancement grant @s only ltw:parkour/explore_2
  10. # 隐藏名片
  11. execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s if entity @a[distance=..5] run data modify entity @s CustomNameVisible set value true
  12. execute as @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] at @s unless entity @a[distance=..5] run data modify entity @s CustomNameVisible set value false