Pārlūkot izejas kodu

修改标题显示

LTCatt 6 gadi atpakaļ
vecāks
revīzija
2502bee32e

+ 5 - 0
data/ltw/functions/state/3/player_enter.mcfunction

@@ -2,6 +2,11 @@
 title @s clear
 title @s actionbar ""
 
+# 显示 Title
+title @s times 5 20 5
+execute if score $round mem matches ..5 run title @a title ["第 ",{"score": {"objective": "mem","name": "$round"}},"/6 轮"]
+execute if score $round mem matches 6 run title @a title {"text":"最终轮","color":"gold"}
+
 # 状态效果
 effect clear @s
 effect give @s saturation 1000000 0 true

+ 1 - 1
data/ltw/functions/state/3/state_enter.mcfunction

@@ -12,7 +12,7 @@ scoreboard players set $bossbar_type mem 0
 time set midnight
 
 # 初始化倒计时
-scoreboard players set $countdown mem 13
+scoreboard players set $countdown mem 3
 
 # 设置禁用tempo_block
 scoreboard players set $tempo_enable mem 0

+ 1 - 7
data/ltw/functions/state/3/tick20.mcfunction

@@ -1,8 +1,2 @@
-# 显示倒计时
-title @a times 3 14 2
-title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
-execute if score $round mem matches ..5 run title @a title ["第 ",{"score": {"objective": "mem","name": "$round"}},"/6 轮"]
-execute if score $round mem matches 6 run title @a title {"text":"最终轮","color":"gold"}
-
 # 退出状态
-execute if score $countdown mem matches 10 run function ltw:state/4/state_enter
+execute if score $countdown mem matches ..0 run function ltw:state/4/state_enter

+ 4 - 0
data/ltw/functions/state/6/player_enter.mcfunction

@@ -3,6 +3,10 @@ function lib:sounds/music/rest
 title @s clear
 title @s actionbar ""
 
+# 显示 Title
+title @s times 5 20 5
+title @s title "选择奖励"
+
 # 重置玩家血量上限
 attribute @s generic.max_health base set 20
 

+ 1 - 1
data/ltw/functions/state/6/state_enter.mcfunction

@@ -9,7 +9,7 @@ scoreboard objectives setdisplay list total_score_disp
 scoreboard players set $bossbar_type mem 0
 
 # 初始化倒计时
-scoreboard players set $countdown mem 10
+scoreboard players set $countdown mem 3
 
 # 初始化地图
 forceload add 0 1900 50 2000

+ 1 - 6
data/ltw/functions/state/6/tick20.mcfunction

@@ -1,7 +1,2 @@
-# 显示倒计时
-title @a times 3 14 2
-title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
-title @a title "准备选择奖励"
-
 # 退出状态
-execute if score $countdown mem matches ..7 run function ltw:state/7/state_enter
+execute if score $countdown mem matches ..0 run function ltw:state/7/state_enter

+ 1 - 1
data/mini/functions/parkour/game_start.mcfunction

@@ -8,5 +8,5 @@ execute if score $mini_type mem matches 1 run scoreboard objectives setdisplay s
 scoreboard players set $bossbar_color mem 4
 scoreboard players set $countdown_max mem 140
 scoreboard players set $bossbar_type mem 2
-bossbar set mini:blue name ""
+bossbar set mini:blue name "剩余时间"
 function lib:bossbar/show

+ 1 - 1
data/mini/functions/phantom/game_start.mcfunction

@@ -8,5 +8,5 @@ execute if score $mini_type mem matches 6 run scoreboard objectives setdisplay s
 scoreboard players set $bossbar_color mem 4
 scoreboard players set $countdown_max mem 110
 scoreboard players set $bossbar_type mem 2
-bossbar set mini:blue name ""
+bossbar set mini:blue name "剩余时间"
 function lib:bossbar/show

+ 1 - 1
data/mini/functions/slime/game_start.mcfunction

@@ -8,5 +8,5 @@ execute if score $mini_type mem matches 7 run scoreboard objectives setdisplay s
 scoreboard players set $bossbar_color mem 4
 scoreboard players set $countdown_max mem 100
 scoreboard players set $bossbar_type mem 2
-bossbar set mini:blue name ""
+bossbar set mini:blue name "剩余时间"
 function lib:bossbar/show