tick2.mcfunction 743 B

12345678910111213
  1. # 检查玩家是否移出了准备物品
  2. execute as @a[team=hub_watch] unless data entity @s Inventory[{Slot:0b,id:"minecraft:gray_dye",tag:{"lobby_item":1b}}] run function ltw:state/0/sp/join_play
  3. execute as @a[team=hub_play] unless data entity @s Inventory[{Slot:0b,id:"minecraft:lime_dye",tag:{"lobby_item":1b}}] run function ltw:state/0/sp/join_watch
  4. # TODO: 未完成的重构
  5. ## 清除互斥的准备物品
  6. #execute as @a[team=hub_watch] if data entity @s Inventory[{tag:{lobby_item:1b,lobby_ready:1b}}] run clear @s lime_dye{lobby_item:1b}
  7. #execute as @a[team=hub_play] if data entity @s Inventory[{tag:{lobby_item:1b,lobby_watch:1b}}] run clear @s gray_dye{lobby_item:1b}
  8. ## 清除临时物品
  9. #clear @a red_dye{LockTempItem:1b}