2 Commits

Author SHA1 Message Date
Claude (owner)
a8d09ece02 music_quiz: marker 엔티티 제거 + 노래 재생 채널을 player 로 변경
## marker 제거
모든 marker 소환 코드는 write-only — 어디에서도 @e[type=marker] / tag=default
selector 로 읽거나 죽이지 않았음. interaction 엔티티가 클릭 UI 를 대체한 이후
완전히 쓸모없는 잔존물.

- 삭제: quiz/macro/summon.mcfunction, quiz/macro/summon2.mcfunction (소비처 없음)
- commands/stop.mcfunction: marker_call 빌드 + macro 호출 제거.
  기존 월드에 누적된 legacy marker 청소를 위해 `kill @e[type=minecraft:marker,tag=mq]`
  한 줄 추가 (tag=mq 스코프라 외부 마커는 건드리지 않음).
- quiz/setanswer.mcfunction: 정답 marker 소환 블록 제거.
- init/config.mcfunction: marker 좌표 템플릿 (mq:main marker) 제거.

`answer.title="음악퀴즈"` 대기상태 sentinel 은 marker 외에 reader 가 없지만
다른 reset 의미를 가질 가능성을 고려해 보수적으로 유지.

## 노래 재생 채널을 player 로
init/config.mcfunction: mq:main audio.source 를 "weather" → "player".
play_sound / stop_sound 매크로 모두 동일 source 값을 읽으므로 한 곳 변경으로
모든 노래 재생/정지 채널이 player 채널로 이동. 음악/마스터/플레이어 슬라이더
중 "player" (음성) 슬라이더로 노래 음량 제어 가능.

타이머 비프 / UI 클릭음 등은 "노래 재생" 이 아니므로 weather 채널 그대로 유지.
2026-05-16 23:44:00 +09:00
Claude (owner)
b43d120e66 music_quiz: pack.mcmeta 를 min_format/max_format [101,1] 로 갱신 + normalize/step.mcfunction set string from 파싱 에러 수정
- pack.mcmeta: 25w31a 이후 도입된 min_format/max_format 배열 스펙으로 교체. min_format >= 82 이므로 pack_format 키는 생략.
- step.mcfunction L8, L45: `data modify ... set string from <source>` 는 잘못된 문법. 올바른 형태는 `set string <source> [start] [end]` (from 없음). 이로 인해 8행 부근 파싱이 멈추던 문제 해결.
2026-05-16 23:36:03 +09:00
7 changed files with 13 additions and 37 deletions

View File

@@ -5,7 +5,7 @@ execute store result score n.len func.temp run data get storage mq:tmp norm.in
execute if score n.len func.temp matches 0 run return 0 execute if score n.len func.temp matches 0 run return 0
# 머리글자 추출 → norm.c # 머리글자 추출 → norm.c
data modify storage mq:tmp norm.c set string from storage mq:tmp norm.in 0 1 data modify storage mq:tmp norm.c set string storage mq:tmp norm.in 0 1
# 공백 제거 (스킵) # 공백 제거 (스킵)
execute if data storage mq:tmp norm{c:" "} run data modify storage mq:tmp norm.c set value "" execute if data storage mq:tmp norm{c:" "} run data modify storage mq:tmp norm.c set value ""
@@ -42,6 +42,6 @@ execute if data storage mq:tmp norm{c:"Z"} run data modify storage mq:tmp norm.c
function mq:answer/normalize/append with storage mq:tmp norm function mq:answer/normalize/append with storage mq:tmp norm
# 나머지로 진행 # 나머지로 진행
data modify storage mq:tmp norm.in set string from storage mq:tmp norm.in 1 data modify storage mq:tmp norm.in set string storage mq:tmp norm.in 1
function mq:answer/normalize/step function mq:answer/normalize/step

View File

@@ -60,12 +60,11 @@ bossbar set mq:process visible false
bossbar set mq:process style notched_10 bossbar set mq:process style notched_10
bossbar set mq:process players @a bossbar set mq:process players @a
# 대기 상태 marker 1개만 소환 (answer.title="음악퀴즈" 가 sentinel) # 대기 상태로 answer 초기화
data modify storage mq:main answer set value {title:"음악퀴즈", alias:[]} 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 "음악퀴즈" # 이전 버전이 남긴 legacy marker 정리 (현재는 marker 사용 안 함)
data modify storage mq:tmp marker_call.alias set value [] kill @e[type=minecraft:marker,tag=mq]
function mq:quiz/macro/summon with storage mq:tmp marker_call
function mq:quiz/stop_sound function mq:quiz/stop_sound
function mq:images/clear function mq:images/clear

View File

@@ -6,10 +6,12 @@ data modify storage mq:main spawn set value {x: 144, y: 61, z: -219, r: 180, f:
# 음원 재생 — minecraft_launcher 리소스팩의 musicquiz:track_NN 사운드 이벤트 # 음원 재생 — minecraft_launcher 리소스팩의 musicquiz:track_NN 사운드 이벤트
# namespace — 리소스팩 네임스페이스 (기본 "musicquiz") # namespace — 리소스팩 네임스페이스 (기본 "musicquiz")
# source — /playsound 채널. stopsound 와 동일해야 함 (기본 "weather") # source — /playsound 채널. stopsound 와 동일해야 함. 노래는 "player" 채널로
# 재생 (음성/플레이어 채널 슬라이더로 음량 제어). 타이머/UI 비프는
# 별도로 weather 채널 사용.
# volume — 기본 음량. 곡별 override 는 init/songs.mcfunction 의 volume 필드 사용 # volume — 기본 음량. 곡별 override 는 init/songs.mcfunction 의 volume 필드 사용
# pitch — 1.0 = 원본 속도 # pitch — 1.0 = 원본 속도
data modify storage mq:main audio set value {namespace: "musicquiz", source: "weather", volume: 1.0, pitch: 1.0} data modify storage mq:main audio set value {namespace: "musicquiz", source: "player", volume: 1.0, pitch: 1.0}
# 정답 페인팅 — 데이터팩의 mq:cover_NN painting_variant (텍스처는 리소스팩 musicquiz:cover_NN) # 정답 페인팅 — 데이터팩의 mq:cover_NN painting_variant (텍스처는 리소스팩 musicquiz:cover_NN)
# namespace — painting_variant 네임스페이스 (기본 "mq") # namespace — painting_variant 네임스페이스 (기본 "mq")
@@ -17,7 +19,4 @@ data modify storage mq:main audio set value {namespace: "musicquiz", source: "we
# facing — 페인팅이 바라보는 방향: south=0 / west=1 / north=2 / east=3 # facing — 페인팅이 바라보는 방향: south=0 / west=1 / north=2 / east=3
data modify storage mq:main image set value {namespace: "mq", x: 144, y: 84, z: -261, facing: 0b} data modify storage mq:main image set value {namespace: "mq", x: 144, y: 84, z: -261, facing: 0b}
# 정답 입력용 marker entity 소환 좌표
data modify storage mq:main marker set value {x: 144, y: 59, z: -219}
# 곡 개수 max_index 는 init/songs.mcfunction 의 길이로 자동 계산됨 # 곡 개수 max_index 는 init/songs.mcfunction 의 길이로 자동 계산됨

View File

@@ -1,9 +0,0 @@
$execute unless data storage mq:main {answer:{title:"음악퀴즈"}} run summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"정답입력시작"}
$summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"$(name)"}
execute store result score length func.temp run data get storage mq:tmp marker_call.alias
execute if score length func.temp matches 1.. run data modify storage mq:tmp marker_call.name set from storage mq:tmp marker_call.alias[0]
execute if score length func.temp matches 1.. run data remove storage mq:tmp marker_call.alias[0]
execute if score length func.temp matches 1.. run function mq:quiz/macro/summon2 with storage mq:tmp marker_call
$execute unless data storage mq:main {answer:{title:"음악퀴즈"}} run summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"정답입력종료"}

View File

@@ -1,6 +0,0 @@
$summon minecraft:marker $(x) $(y) $(z) {Tags:["mq","default"],CustomName:"$(name)"}
execute store result score length func.temp run data get storage mq:tmp marker_call.alias
execute if score length func.temp matches 1.. run data modify storage mq:tmp marker_call.name set from storage mq:tmp marker_call.alias[0]
execute if score length func.temp matches 1.. run data remove storage mq:tmp marker_call.alias[0]
execute if score length func.temp matches 1.. run function mq:quiz/macro/summon2 with storage mq:tmp marker_call

View File

@@ -1,12 +1,6 @@
# songs[$(idx)] → answer 로 복사하고, 트랙/커버 id 부여 # songs[$(idx)] → answer 로 복사하고, 트랙/커버 id 부여
function mq:quiz/macro/setanswer with storage mq:tmp function mq:quiz/macro/setanswer with storage mq:tmp
# 정답 marker entity 소환 (좌표 + name/alias 합쳐서 macro 호출)
data modify storage mq:tmp marker_call set from storage mq:main marker
data modify storage mq:tmp marker_call.name set from storage mq:main answer.title
data modify storage mq:tmp marker_call.alias set from storage mq:main answer.alias
function mq:quiz/macro/summon with storage mq:tmp marker_call
scoreboard players set stop buttons -1 scoreboard players set stop buttons -1
scoreboard players set skip buttons -1 scoreboard players set skip buttons -1
scoreboard players set hint buttons -1 scoreboard players set hint buttons -1

View File

@@ -1,8 +1,7 @@
{ {
"pack": { "pack": {
"pack_format": 75, "description": "음악퀴즈용 데이터팩입니다.",
"min_format": 75, "min_format": [101, 1],
"max_format": 75, "max_format": [101, 1]
"description": "음악퀴즈용 데이터팩입니다."
} }
} }