Просмотр исходного кода

在hotpm以及tntrun中调用game start模块

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

+ 1 - 1
data/mini/functions/colormatch/start_new_round.mcfunction

@@ -6,7 +6,7 @@ execute positioned 1001 10 4000 run clone ~ ~ ~ ~24 ~ ~24 1050 15 4000
 # 设置倒计时
 scoreboard players add $color_match_round mem 1
 execute if score $color_match_round mem matches 2 if score $color_match_time mem matches 4.. run scoreboard players remove $color_match_time mem 1
-execute if score $color_match_round mem matches 2 run tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"地板消失速度提升!","color":"white","bold": false}]
+execute if score $color_match_round mem matches 2 if score $color_match_time mem matches 4.. run tellraw @a [{"text":">> ","color":"gold","bold": true},{"text":"地板消失速度提升!","color":"white","bold": false}]
 
 execute if score $color_match_round mem matches 2 run scoreboard players set $color_match_round mem 0
 scoreboard players operation $countdown mem = $color_match_time mem

+ 2 - 0
data/mini/functions/hotpm/game_start.mcfunction

@@ -0,0 +1,2 @@
+# 3秒后给予土豆
+schedule function mini:hotpm/pm_init_first 3s replace

+ 0 - 3
data/mini/functions/hotpm/player_enter.mcfunction

@@ -25,9 +25,6 @@ gamemode adventure @s[tag=!watcher,tag=!rejoining]
 # 设置玩家生命数量
 scoreboard players set @s[tag=!watcher,tag=!rejoining] mini_heart 2
 function mini:main/player_max_health
-
-# 3秒后给予土豆
-execute if entity @s[tag=!watcher,tag=!rejoining] run schedule function mini:hotpm/pm_init_first 3s replace
 # TODO 灭火无效
 
 # 重新加入处理

+ 2 - 0
data/mini/functions/main/game_start.mcfunction

@@ -1,2 +1,4 @@
 # 调用其他模块
+execute if score $mini_type mem matches 2 run function mini:tntrun/game_start
+execute if score $mini_type mem matches 3 run function mini:hotpm/game_start
 execute if score $mini_type mem matches 4 run function mini:colormatch/game_start

+ 5 - 0
data/mini/functions/tntrun/game_start.mcfunction

@@ -0,0 +1,5 @@
+# 延迟1tick玩家tp
+schedule function mini:tntrun/player_enter2 1t replace
+
+# 两秒后才开始 TNT 掉落
+schedule function mini:tntrun/player_enter3 2s replace

+ 0 - 2
data/mini/functions/tntrun/player_enter.mcfunction

@@ -11,12 +11,10 @@ effect give @s resistance 1000000 4 true
 
 # 传送玩家
 spreadplayers 1011.5 2011.5 7 7 false @s[tag=!watcher,tag=!rejoining]
-execute if entity @s[tag=!watcher,tag=!rejoining] run schedule function mini:tntrun/player_enter2 1t replace
 # schedule: tp @a ~ ~-3 ~
 
 # 两秒后才开始 TNT 掉落
 tag @s remove tntrun_pc
-execute if entity @s[tag=!watcher,tag=!rejoining] run schedule function mini:tntrun/player_enter3 2s replace
 # schedule: tag @a add tntrun_pc
 
 # 调整模式