Przeglądaj źródła

背景音乐系统

LTCatt 6 lat temu
rodzic
commit
4d47e8cc2d

+ 1 - 1
data/lib/functions/sounds/hit.mcfunction

@@ -1 +1 @@
-playsound minecraft:entity.arrow.hit_player ambient @s
+playsound minecraft:entity.arrow.hit_player player @s

+ 1 - 1
data/lib/functions/sounds/hit2.mcfunction

@@ -1 +1 @@
-playsound minecraft:entity.arrow.hit_player ambient @s ~ ~ ~ 1 0.5
+playsound minecraft:entity.arrow.hit_player player @s ~ ~ ~ 1 0.5

+ 1 - 1
data/lib/functions/sounds/hurt.mcfunction

@@ -1 +1 @@
-playsound minecraft:entity.player.hurt ambient @s
+playsound minecraft:entity.player.hurt player @s

+ 4 - 0
data/lib/functions/sounds/music/hub.mcfunction

@@ -0,0 +1,4 @@
+# 播放主大厅 BGM
+
+function lib:sounds/music/stop
+playsound minecraft:music_disc.stal music @s 0 1000000 0 1000000

+ 4 - 0
data/lib/functions/sounds/music/mini_fast.mcfunction

@@ -0,0 +1,4 @@
+# 播放小游戏 BGM(快节奏)
+
+function lib:sounds/music/stop
+playsound minecraft:music_disc.pigstep music @s 0 1000000 0 1000000

+ 4 - 0
data/lib/functions/sounds/music/mini_slow.mcfunction

@@ -0,0 +1,4 @@
+# 播放小游戏 BGM(慢节奏)
+
+function lib:sounds/music/stop
+playsound minecraft:music_disc.mellohi music @s 0 1000000 0 1000000

+ 4 - 0
data/lib/functions/sounds/music/rest.mcfunction

@@ -0,0 +1,4 @@
+# 播放等待 BGM
+
+function lib:sounds/music/stop
+playsound minecraft:music_disc.mall music @s 0 1000000 0 1000000

+ 3 - 0
data/lib/functions/sounds/music/stop.mcfunction

@@ -0,0 +1,3 @@
+# 停止 BGM
+
+stopsound @s music

+ 1 - 1
data/lib/functions/sounds/teleport.mcfunction

@@ -1 +1 @@
-playsound minecraft:entity.enderman.teleport block @s
+playsound minecraft:entity.enderman.teleport block @s 0 1000000 0 1000000

+ 1 - 1
data/lib/functions/sounds/theend.mcfunction

@@ -1 +1 @@
-playsound minecraft:ui.toast.challenge_complete ambient @s ~ ~ ~ 0.5 0.9
+playsound minecraft:ui.toast.challenge_complete block @s ~ ~ ~ 0.7 0.9

+ 1 - 1
data/lib/functions/sounds/travel.mcfunction

@@ -1 +1 @@
-playsound minecraft:block.portal.travel ambient @s ~ ~ ~ 0.2 2
+playsound minecraft:block.portal.travel block @s ~ ~ ~ 0.3 2

+ 3 - 0
data/ltw/functions/clock/tick20.mcfunction

@@ -8,3 +8,6 @@ execute if score $state mem matches 6 run function ltw:state/6/tick20
 
 # 全局倒计时
 execute if score $countdown mem matches 1.. run scoreboard players remove $countdown mem 1
+
+# 掐死原版 BGM
+stopsound @a music music.game

+ 1 - 0
data/ltw/functions/state/0/player_enter.mcfunction

@@ -1,4 +1,5 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
+function lib:sounds/music/hub
 title @s clear
 title @s actionbar ""
 

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

@@ -1,4 +1,5 @@
 # 对单个玩家的处理(如果玩家中途加入就会执行此函数)
+function lib:sounds/music/rest
 title @s clear
 title @s actionbar ""
 

+ 1 - 0
data/mini/functions/colormatch/player_enter.mcfunction

@@ -1,4 +1,5 @@
 # 单个玩家开始小游戏时执行
+function lib:sounds/music/mini_fast
 title @s clear
 title @s actionbar ""
 

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

@@ -1,4 +1,5 @@
 # 单个玩家开始小游戏时执行
+function lib:sounds/music/mini_fast
 title @s clear
 title @s actionbar ""
 

+ 1 - 0
data/mini/functions/hotpm/tick5.mcfunction

@@ -1,5 +1,6 @@
 # 传送
 execute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ minecraft:barrier run tp ~ ~17.5 ~
+execute as @a[gamemode=!spectator] at @s if block ~ ~-1 ~ minecraft:barrier run function lib:sounds/teleport
 
 # 给持有者播放音效
 execute as @a[tag=pm_hoding] at @s run function lib:sounds/creeper

+ 1 - 0
data/mini/functions/parkour/player_enter.mcfunction

@@ -1,4 +1,5 @@
 # 单个玩家开始小游戏时执行
+function lib:sounds/music/mini_fast
 title @s clear
 title @s actionbar ""
 

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

@@ -1,4 +1,5 @@
 # 单个玩家开始小游戏时执行
+function lib:sounds/music/mini_fast
 title @s clear
 title @s actionbar ""