player_lose_heart.mcfunction 710 B

12345678910111213141516
  1. # 玩家失败时由玩家自己触发
  2. tellraw @a ["",{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_holding]","color":"gold"}," 爆炸了!"]
  3. # 增加tag
  4. tag @a[tag=pm_holding] add pm_explode_last
  5. # 特效
  6. execute at @a[tag=pm_holding] run summon minecraft:creeper ~ ~-1 ~ {ignited:1,ExplosionRadius:1,Fuse:0,Invulnerable:1}
  7. execute at @a[tag=pm_holding] run particle minecraft:explosion ~ ~1 ~ 0.4 0.4 0.4 0 5
  8. # 减少生命
  9. execute as @a[tag=pm_holding] run function mini:main/player_lose_heart
  10. # 玩家失去土豆
  11. execute as @a[tag=pm_holding] run function mini:hotpm/game/pm_lost
  12. # 强制观战
  13. # execute at @s as @a[gamemode=spectator,distance=..0.1] run spectate @p[tag=pm_holding]