@@ -7,6 +7,7 @@ clear @s #item:bonus{"bonus_new":1b}
# 通知玩家物品被拾取
tellraw @a ["",{"text": ">> ","color":"aqua","bold": true},{"selector": "@s","color":"aqua"}," 获得了 ",{"nbt": "RecordItem.tag.item_name","block": "0 0 0","interpret": true}]
+function lib:sounds/hit
# 如果有 return 标签则退回物品(最先执行)
execute if data block 0 0 0 RecordItem.tag{"bonus_return":1b} run function item:bonus_item/return_item
@@ -16,3 +17,6 @@ execute if data block 0 0 0 RecordItem.tag.bonus_add_score run function item:bon
# 如果有 give_items 标签则给与物品
execute if data block 0 0 0 RecordItem.tag.bonus_give_items[0] run function item:bonus_item/give_items
+
+# 执行特定函数
+execute if score $state mem matches 8 run function ltw:state/8/pickup
@@ -21,3 +21,7 @@ execute unless entity @a[tag=selecting] if score $game_type mem matches 1 if sco
# 初始化倒计时
scoreboard players set $countdown mem 5
+# 播放音效
+execute as @a[tag=selecting] at @s run function lib:sounds/hit
+execute as @a[tag=!selecting] at @s run function lib:sounds/hit2
@@ -7,4 +7,4 @@ tag @s remove mini_rank4
gamemode adventure
-tellraw @s ["",{"text": ">> ","color":"green"},"轮到你选择奖励了!"]
+tellraw @s ["",{"text": ">> ","color":"green","bold": true},{"text":"轮到你选择奖励了!","color":"green"}]
@@ -0,0 +1,3 @@
+# 当玩家捡起物品时触发
+gamemode spectator
@@ -4,4 +4,4 @@ title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
title @a title ""
# 下一状态
-execute if score $countdown mem matches 0 run function ltw:state/8/next
+execute if score $countdown mem matches 1 run function ltw:state/8/next