Browse Source

将声音整合到 sounds

LTCatt 6 years ago
parent
commit
928cea6f65

+ 0 - 3
data/lib/functions/damage_indicator/damage_dealt.mcfunction

@@ -1,8 +1,5 @@
 # 造成伤害加tag
 tag @s add damage_dealt
 
-# 播放攻击音效
-# playsound minecraft:entity.arrow.hit_player ambient @s ~ ~ ~ 1 1 1
-
 # 移除造成伤害advancement
 advancement revoke @s only lib:damage_dealt

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

@@ -0,0 +1 @@
+playsound minecraft:entity.creeper.primed ambient @s

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

@@ -0,0 +1 @@
+playsound minecraft:entity.arrow.hit_player block @s

+ 1 - 1
data/mini/functions/hotpm/game/damage_dealt2.mcfunction

@@ -1,7 +1,7 @@
 # 土豆持有者打到人时执行
 
 tag @s add pm_damage_dealt
-playsound minecraft:entity.arrow.hit_player ambient @s ~ ~ ~ 1 1 1
+function lib:sounds/ding
 
 # 转移土豆
 function mini:hotpm/game/pm_lost

+ 1 - 1
data/mini/functions/hotpm/tick20.mcfunction

@@ -2,7 +2,7 @@
 execute if score $countdown mem matches 1.. run title @a actionbar [{"text":"土豆爆炸: ","color":"red","bold": true},{"score": { "name": "$countdown","objective": "mem"}}]
 
 # 给持有者播放音效
-execute as @a[tag=pm_hoding] at @s run playsound minecraft:entity.creeper.primed player @s
+execute as @a[tag=pm_hoding] at @s run function lib:sounds/creeper
 
 # 爆炸
 execute if score $countdown mem matches 0 as @a[tag=pm_hoding] run function mini:hotpm/game/pm_boom