music_quiz: 설정을 init/config.mcfunction 한 곳으로 모음

- 주제(title), 곡 개수(max_index), 스폰 위치, 음원 명령 블록 좌표/볼륨,
  이미지 표시 영역 좌표를 모두 init/config.mcfunction 에서 관리
- tellraw 접두사([ … ])가 storage 의 title 을 참조하도록 변경 — 주제
  변경 시 config 한 줄만 고치면 채팅 접두사까지 일관 적용
- load.mcfunction 의 인라인 data merge 블록을 제거하고 init/config 호출로
  대체 (스코어보드/보스바 같은 런타임 인프라는 load 본문에 유지)
- README 의 "곡 목록 수정" 절을 "설정 (한 곳에서 수정)" 으로 재작성

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude (owner)
2026-05-13 16:02:27 +09:00
parent 2b61af28a8
commit b2361187b9
4 changed files with 53 additions and 45 deletions

View File

@@ -0,0 +1,26 @@
# 음악퀴즈 주제 — tellraw 접두사([ 이름 ])와 사이드바 표시에 사용
data modify storage mq:main title set value "음악퀴즈"
# 곡 개수 — init/songs.mcfunction 의 곡 수와 일치시킬 것
data modify storage mq:main max_index set value 50
# 플레이어 접속 시 텔레포트 위치 (x y z, r=yaw, f=pitch)
data modify storage mq:main spawn set value {x: 144, y: 61, z: -219, r: 180, f: 0}
# 음원 재생용 명령 블록 위치 + 정답 이미지 표시 영역
# x,y,z — 명령 블록 좌표
# r — 명령 블록 정면 방향 (EAST | WEST | SOUTH | NORTH)
# volume — yp playall 명령에 넘기는 음량
# x1,y1,z1 — 이미지 표시 영역 한쪽 모서리
# x2,y2,z2 — 이미지 표시 영역 반대 모서리
data modify storage mq:main command_block set value { \
name: "", \
image: "", \
alias: [], \
index: 1, \
volume: 30, \
x: 144, y: 59, z: -219, \
r: "SOUTH", \
x1: 131, y1: 77, z1: -262, \
x2: 157, y2: 91, z2: -262 \
}

View File

@@ -1,41 +1,14 @@
function mq:tellraw {"text":"서버 리로드 성공!","color":"white","msg":'""'}
data merge storage mq:main { \
title: "", \
max_index: 50, \
answer: { author: "", title: "", alias: [] }, \
command_block: { \
name: "", \
image: "", \
alias: [], \
index: 1, \
volume: 30, \
x: 144, \
y: 59, \
z: -219, \
r: "SOUTH", \
x1: 131, \
y1: 77, \
z1: -262, \
x2: 157, \
y2: 91, \
z2: -262 \
}, \
spawn: { \
x: 144, \
y: 61, \
z: -219, \
r: 180, \
f: 0 \
} \
}
data modify storage mq:main answer set value {author: "", title: "", alias: []}
data merge storage func:temp {}
data merge storage mq:tmp {}
function mq:init/config
function mq:init/songs
function mq:init/buttons
function mq:init/triggers
function mq:tellraw {"text":"서버 리로드 성공!","color":"white","msg":'""'}
scoreboard objectives remove func.temp
scoreboard objectives remove status
scoreboard objectives remove main

View File

@@ -1 +1 @@
$tellraw @a ["",{"text":"[ ","bold":true,"color":"gray"},{"text":"음악퀴즈","bold":true,"color":"dark_green"},{"text":" ]","bold":true,"color":"gray"},{"text":" "},{"text":"$(text)","color":"$(color)"},$(msg)]
$tellraw @a ["",{"text":"[ ","bold":true,"color":"gray"},{"storage":"mq:main","nbt":"title","bold":true,"color":"dark_green"},{"text":" ]","bold":true,"color":"gray"},{"text":" "},{"text":"$(text)","color":"$(color)"},$(msg)]