music_quiz: YP/TS 플러그인 의존 제거, 바닐라 playsound + painting_variant 로 마이그레이션
minecraft_launcher 가 만드는 musicquiz 리소스팩 (track_NN / cover_NN) 과 한 쌍으로 동작한다. - 음원 재생: yp playall (명령 블록 + auto 토글) → /playsound musicquiz:track_NN - 정답 이미지: ts placeloc → /summon painting (musicquiz:cover_NN) + /kill @e[type=painting,tag=mq_cover] - stopsound 하드코딩(weather) 4곳을 mq:quiz/stop_sound 매크로 호출로 통일 - check/server, repeat/check_server, status 스코어보드(yp/ts/skript) 등 플러그인 hello 패킷 대기 로직 일괄 삭제 - 스토리지 재구성: command_block 컴파운드 폐기, audio/image/marker 분리 (init/config.mcfunction 한 곳에서 수정) - 곡 단위 volume override 지원 — songs[i].volume 으로 곡별 음량 지정 가능 (미지정 시 audio.volume fallback) - 트랙 번호 zero-pad 는 mq:tmp.pad 분기 + 매크로 문자열 조립으로 처리 - max_index 는 songs 배열 길이에서 자동 계산 - 호출 경로 단축: select → setanswer → macro/setanswer → macro/summon → play_sound
This commit is contained in:
@@ -5,5 +5,5 @@ execute if score init main matches 1..4 run return run function mq:tellraw {"tex
|
||||
execute if score init main matches 6.. run return run function mq:tellraw {"text":"아직 다음노래가 재생되지 않았습니다.","color":"red",msg:'""'}
|
||||
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 종료되었습니다.","color":"red",msg:'""'}
|
||||
|
||||
execute if score init main matches 5 run stopsound @a weather
|
||||
execute if score init main matches 5 run function mq:quiz/macro/command_block with storage mq:main command_block
|
||||
execute if score init main matches 5 run function mq:quiz/stop_sound
|
||||
execute if score init main matches 5 run function mq:quiz/play_sound
|
||||
|
||||
@@ -2,7 +2,7 @@ execute if score init main matches 10 run return run function mq:tellraw {"text"
|
||||
|
||||
setblock ~ ~ ~ minecraft:air
|
||||
|
||||
stopsound @a weather
|
||||
function mq:quiz/stop_sound
|
||||
|
||||
$scoreboard players set max_index main $(max_index)
|
||||
scoreboard players set init main 1
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
scoreboard players set timer status 0
|
||||
scoreboard players set skript status 0
|
||||
scoreboard players set yp status 0
|
||||
scoreboard players set ts status 0
|
||||
|
||||
scoreboard players set index main 0
|
||||
$scoreboard players set max_index main $(max_index)
|
||||
scoreboard players set score main 0
|
||||
@@ -43,8 +38,6 @@ scoreboard objectives remove score
|
||||
scoreboard objectives add score dummy {"text":"점수","bold":true}
|
||||
scoreboard objectives setdisplay sidebar score
|
||||
|
||||
data modify storage mq:main command_block.index set value 1
|
||||
|
||||
dialog clear @a
|
||||
|
||||
bossbar set mq:process name [{"text":"진행도: ","color": "yellow","bold": true},{"score":{"name":"index","objective": "main"},"color": "yellow","bold": true},{"text":"/","color": "yellow","bold": true},{"score":{"name":"max_index","objective": "main"},"color": "yellow","bold": true}]
|
||||
@@ -55,9 +48,12 @@ bossbar set mq:process visible false
|
||||
bossbar set mq:process style notched_10
|
||||
bossbar set mq:process players @a
|
||||
|
||||
data modify storage mq:main command_block.name set value "음악퀴즈"
|
||||
function mq:quiz/macro/summon with storage mq:main command_block
|
||||
# 대기 상태 marker 1개만 소환 (answer.title="음악퀴즈" 가 sentinel)
|
||||
data modify storage mq:main answer set value {title:"음악퀴즈", alias:[]}
|
||||
data modify storage mq:tmp marker_call set from storage mq:main marker
|
||||
data modify storage mq:tmp marker_call.name set value "음악퀴즈"
|
||||
data modify storage mq:tmp marker_call.alias set value []
|
||||
function mq:quiz/macro/summon with storage mq:tmp marker_call
|
||||
|
||||
stopsound @a weather
|
||||
|
||||
function mq:images/image_delete with storage mq:main command_block
|
||||
function mq:quiz/stop_sound
|
||||
function mq:images/clear
|
||||
|
||||
Reference in New Issue
Block a user