game_init2.mcfunction 1.8 KB

1234567891011121314151617181920212223242526272829
  1. # 清理残余实体
  2. kill @e[type=falling_block,tag=parkour_block]
  3. function mini:main/kill_entity
  4. # 生成节奏方块与物品刷新标记实体
  5. function mini:parkour/game/marker_spawn
  6. # 生成传送门实体
  7. summon minecraft:falling_block 1014 21 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
  8. summon minecraft:falling_block 1014 21 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
  9. summon minecraft:falling_block 1014 22 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
  10. summon minecraft:falling_block 1014 22 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
  11. summon minecraft:falling_block 1014 23 1057 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
  12. summon minecraft:falling_block 1014 23 1056 {Time:1,NoGravity:1b,BlockState:{Name:"nether_portal",Properties:{axis:z}},Tags:["parkour_block"]}
  13. # 生成奖励物品
  14. execute positioned 1014.50 19.50 1024.50 run function item:bonus_item/gameparty/auto/low
  15. execute positioned 1015.50 12.00 1019.50 run function item:bonus_item/gameparty/auto/low2
  16. execute positioned 1024.50 30.50 1038.50 run function item:bonus_item/gameparty/auto/low2
  17. execute positioned 1004.50 18.50 1043.50 run function item:bonus_item/gameparty/auto/low2
  18. # 生成秘密宝藏
  19. execute as @e[tag=treasure_secret] at @s run function item:bonus_item/gameparty/auto/low3
  20. # 生成随机宝藏(4 奖励物品,6 秘密宝藏,15 随机宝藏)
  21. scoreboard players set #item_count mem 25
  22. execute as @e[tag=bonus_item,x=1000,y=0,z=1000,dx=100,dy=100,dz=100] run scoreboard players remove #item_count mem 1
  23. execute if score #item_count mem matches 1.. run function mini:parkour/game/generate_loop