tick2.mcfunction 924 B

12345678910111213
  1. # 给与玩家三叉戟
  2. execute as @a[tag=mini_running] unless data entity @s Inventory[{id:"minecraft:trident",tag:{GameItem:1b}}] unless score @s countdown matches 1.. run function mini:phantom/game/give_trident
  3. execute as @a[tag=mini_running] if score @s useTrident matches 1 run scoreboard players set @s countdown 2
  4. execute as @a[tag=mini_running] if score @s useTrident matches 1 run scoreboard players reset @s useTrident
  5. # 清理错位的三叉戟
  6. execute as @a[tag=mini_running] unless score @s countdown matches 1.. unless data entity @s Inventory[{id:"minecraft:trident",Slot:8b,tag:{GameItem:1b}}] if data entity @s Inventory[{id:"minecraft:trident",tag:{GameItem:1b}}] run function mini:phantom/game/give_trident
  7. # 更改对出的三叉戟的nbt
  8. execute as @e[type=trident,tag=!fixed_trident] run function mini:phantom/game/fix_trident
  9. # 删除掉在地上的三叉戟
  10. kill @e[type=trident,nbt={inGround:1b}]