new_item.mcfunction 1.3 KB

123456789101112131415161718192021
  1. title @a subtitle {"text":"❇ 奖励物资已在空中部署 ❇","color":"aqua"}
  2. title @a times 1 60 3
  3. title @a title ""
  4. playsound minecraft:entity.player.levelup player @a 0 1000000 0 1000000 2
  5. scoreboard players set $new_item_cd mem 0
  6. # 随机选择生成组
  7. scoreboard players set $random_min mem 0
  8. scoreboard players set $random_max mem 3
  9. function lib:random
  10. # 生成物资
  11. execute if score $random mem matches 0 positioned 1023.5 21 7009.5 run function item:bonus_item/gameparty/auto/low
  12. execute if score $random mem matches 0 positioned 1008.5 21 7024.5 run function item:bonus_item/gameparty/auto/low
  13. execute if score $random mem matches 1 positioned 1008.5 21 7009.5 run function item:bonus_item/gameparty/auto/low
  14. execute if score $random mem matches 1 positioned 1023.5 21 7024.5 run function item:bonus_item/gameparty/auto/low
  15. execute if score $random mem matches 2 positioned 1007.0 21 7016.5 run function item:bonus_item/gameparty/auto/low
  16. execute if score $random mem matches 2 positioned 1025.0 21 7017.5 run function item:bonus_item/gameparty/auto/low
  17. execute if score $random mem matches 3 positioned 1016.5 21 7026.0 run function item:bonus_item/gameparty/auto/low
  18. execute if score $random mem matches 3 positioned 1015.5 21 7008.0 run function item:bonus_item/gameparty/auto/low
  19. execute as @e[tag=bonus_item] run data modify entity @s NoGravity set value 0b