HerobrineXia 6 лет назад
Родитель
Сommit
d74f0416aa

+ 5 - 4
data/mini/functions/hotpm/pm_boom.mcfunction

@@ -1,8 +1,9 @@
 #玩家失败
 function mini:hotpm/pm_lost
-
-#选新土豆
-execute if score $t_alive mem matches 3.. run function mini:hotpm/pm_init
-
+#记录位置
+execute at @s run summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["pm_boom"],Age: -2147483648, Duration: -1, WaitTime: -2147483648}
 #去除tag
 function mini:hotpm/player_failed
+#选新土豆
+execute if score $t_alive mem matches 2.. as @e[type=area_effect_cloud,tag=pm_boom] run function mini:hotpm/pm_init
+

+ 4 - 4
data/mini/functions/hotpm/pm_init.mcfunction

@@ -1,12 +1,12 @@
 # 将土豆刷新给离自己最远的人
 execute at @s as @a[sort=furthest,tag=mini_running,limit=1] run function mini:hotpm/pm_get
 
-# 旁观土豆持有者
-execute as @a[gamemode=spectator] run spectate @p[tag=pm_hoding]
-
 # 告知玩家
 tellraw @a [{"text":">> ","color":"gold","bold": true},{"selector":"@a[tag=pm_hoding]","color":"yellow","bold":false},{"text":" 获得了土豆!","color":"white","bold":false}]
 
 # 土豆爆炸时间 = 5 * (存活人数 + 1)
 scoreboard players set $countdown mem 5
-execute as @a[tag=mini_running] run scoreboard players add $countdown mem 5
+execute as @a[tag=mini_running] run scoreboard players add $countdown mem 5
+
+# 删除效果云
+kill @s