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

添加人数不够的提示音效

LTCatt 6 лет назад
Родитель
Сommit
b980da2add

+ 1 - 0
data/lib/functions/sounds/error.mcfunction

@@ -0,0 +1 @@
+playsound minecraft:block.note_block.didgeridoo block @s ~ ~ ~ 1 1

+ 2 - 0
data/ltw/functions/state/0/try_start_gameparty.mcfunction

@@ -4,7 +4,9 @@
 execute store result score $count mem if entity @a[tag=hub_gameparty]
 execute store result score $count mem if entity @a[tag=hub_gameparty]
 
 
 # 根据玩家数量判定
 # 根据玩家数量判定
+execute if score $count mem matches ..2 as @a at @s run function lib:sounds/error
 execute if score $count mem matches ..2 run tellraw @a [{"text": "需要至少 3 人以开始小游戏模式, 当前仅有 ","color":"red"},{"score": { "name": "$count","objective": "mem"}}, " 人!"]
 execute if score $count mem matches ..2 run tellraw @a [{"text": "需要至少 3 人以开始小游戏模式, 当前仅有 ","color":"red"},{"score": { "name": "$count","objective": "mem"}}, " 人!"]
+execute if score $count mem matches 9.. as @a at @s run function lib:sounds/error
 execute if score $count mem matches 9.. run tellraw @a [{"text": "小游戏模式最多支持 8 人, 当前已有 ","color":"red"},{"score": { "name": "$count","objective": "mem"}}, " 人!"]
 execute if score $count mem matches 9.. run tellraw @a [{"text": "小游戏模式最多支持 8 人, 当前已有 ","color":"red"},{"score": { "name": "$count","objective": "mem"}}, " 人!"]
 
 
 # 判断旁观
 # 判断旁观