Commit Graph

24 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 채널 그대로 유지.
v1.0.13
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행 부근 파싱이 멈추던 문제 해결.
v1.0.12
2026-05-16 23:36:03 +09:00
claude
f0a2e4fb6b music_quiz: [정답 입력] 채팅 메시지 제거 + 외부 모드 설치 검증 가드 추가
- quiz/setanswer.mcfunction: 클릭형 tellraw 제거. dialog/`/trigger input` 인프라는 유지하여 모드 없는 환경 fallback.
- 외부 모드 검증 (load/login/start):
  - mq_chat_mod: 서버 전용 모드 (mc_chat_answer_mod) — `#server mq_chat_mod` fake holder 로 서버 presence 검증.
  - mq_video_mod: 클라이언트 렌더링 모드 (mc_video_player_mod) — 같은 objective 안에 `#server` (서버 컴포넌트 매 tick 갱신) + `<player>` (클라 payload 수신 시 갱신) 두 holder 로 server/client 부재 안내 분리.
  - start.mcfunction: server presence 우선 검사 → per-player client presence 검사. unset 매치 안 되는 selector 이슈는 `add @a ... 0` 으로 materialize.
  - login.mcfunction: 플레이어 join 시 `mq_video_mod=0` 초기화 (stale 1 방지).
- docs/mc_video_player_mod_integration.md: video mod 측 구현 사양 (서버 컴포넌트 매 tick presence pulse + client payload handshake, 주기 재전송 필수 명시).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v1.0.11
2026-05-16 22:29:13 +09:00
Claude (owner)
2f6dc17092 music_quiz: interaction hitbox 를 stone_button 면 크기에 정합
interaction entity 의 위치/크기를 facing 별 오프셋 + 버튼 hitbox
치수 (6/16 × 4/16) 에 맞춰 분리.

- button_defs 각 항목에 ox/oy/oz/w/h 추가. facing 별 보정값으로
  interaction 의 "튀어나온 쪽 면 = 버튼 visible face" 가 되게 함.
  반대편은 벽 블록 속으로 들어가 invisible.
- width=0.375f, height=0.25f → 가로/세로 버튼 face 와 정합.
  horizontal hitbox 가 square 강제라 두께는 0.375 까지 가지만,
  벽 쪽 0.25 가 wall 블록 안에 묻혀 시각적으로는 버튼 두께 0.125 만 튀어나옴.
- btn.mcfunction 의 summon 라인이 매크로 변수 (~$(ox)/$(oy)/$(oz)) 와
  $(w)f / $(h)f 사용으로 변경됨.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v1.0.10
2026-05-16 21:23:30 +09:00
Claude (owner)
c39a0516bc music_quiz: interaction 엔티티 소환을 데이터팩 내부로 흡수
월드 cmd block 의존 (redstone_block/red_wool 펄스) 을 제거하고
btn.mcfunction 이 직접 summon 하도록 변경.

- buttons=-1 초기화 단계에서 기존 mq/<버튼명> interaction 을 모두
  kill 후 정확히 1개를 (x+0.5, y, z+0.5) 에 1f×1f 로 재소환.
  /reload 마다 dup 누적 없이 "버튼당 1개, 올바른 좌표" 로 수렴.
- /reload → load → commands/stop 이 buttons 점수를 -1 로 재설정 →
  다음 tick 에 ensure 로직 실행. /kill @e 후에도 /reload 한 번으로 복구.
- stone_button 직접 감지 fallback 및 잉여 state machine (1→2→0)
  제거. 클릭 경로는 interaction 단일화 → trigger 투표 흐름 보존.
- README 의 버튼 본체 설명을 새 구조로 갱신.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v1.0.9
2026-05-16 21:07:31 +09:00
Claude (owner)
cce5469dc2 music_quiz: answer 정규화 도입 (대소문자/공백 무시)
- mq:answer/normalize: storage 의 norm.in 을 한 글자씩 떼어내
  소문자화 + 공백 제거 후 norm.acc 에 누적. char 단위 반복은
  'data modify ... set string from ... <start> <end>' (1.20+) 로,
  결합은 매크로 ($(acc)$(c)) 로 수행하는 pure-datapack 구현.

- process: 큐의 text 를 정규화한 결과를 judge.input 으로 사용
- judge: answer.title 정규화 후 judge.answer 로 사용
- iter_aliases: alias 각 항목 정규화 후 비교

원본 songs.mcfunction 의 title/alias 표기는 그대로 유지 (display
및 정규화 입력으로 모두 사용됨). 입력이 'Lose My Mind' / 'lose my mind'
/ 'LOSEMYMIND' / 'losemymind' 어떤 형태든 동일한 정규형으로 떨어져 매치.
v1.0.8
2026-05-15 00:23:42 +09:00
Claude (owner)
8c30f4de5e temp: 애니메이션 painting 텍스처 검증용 sample 파일 추가
리소스팩 1번 방식 (.png 세로 스트립 + .png.mcmeta) 이
painting_variant 에서 동작하는지 검증하기 위한 샘플.

사용 위치: musicquiz 리소스팩의
  assets/musicquiz/textures/painting/gif.png
  assets/musicquiz/textures/painting/gif.png.mcmeta

데이터팩 v1.0.6 의 mq:gif painting_variant 와 짝.
2026-05-14 23:58:07 +09:00
Claude (owner)
ae434c3a07 music_quiz: answer/macro/match — NBT path compound matcher 공백 제거
execute if data <source> <path> 의 path 토큰은 공백을 허용하지 않음.
'judge {input:...}' → 'judge{input:...}' 로 붙여써야 compound predicate 가
정상 적용됨.
v1.0.7
2026-05-14 23:50:28 +09:00
Claude (owner)
663891c966 music_quiz: 애니메이션 텍스처 테스트용 painting_variant gif 추가
리소스팩 musicquiz:gif 텍스처가 .png.mcmeta 애니메이션을 따르는지
검증하기 위한 1×1 painting_variant. 텍스처 자체는 리소스팩에 별도 배치.
v1.0.6
2026-05-14 23:39:20 +09:00
Claude (owner)
c2dcf0c44f music_quiz: painting_variant 를 mq 네임스페이스로 통합
- data/musicquiz/painting_variant/* → data/mq/painting_variant/* 로 이동
  변종 ID = mq:cover_NN, 텍스처 asset_id = musicquiz:cover_NN (리소스팩)
- title/author 필드 제거 (기본값 사용)
- init/config.mcfunction 의 image.namespace 기본값을 "mq" 로 변경
v1.0.5
2026-05-14 23:23:29 +09:00
Claude (owner)
f71bd95de5 music_quiz: pack.mcmeta 에 min_format / max_format 명시 (26.1.2 = format 75)
25w31a 이후 pack metadata 에서 min_format / max_format 가 권장 필드로
추가됨. 없으면 게임 시작 시 PackRepository.reload 단계에서
"missing mandatory fields min_format and max_format" WARN 로그가
fallback 으로 처리되며, 향후 버전에서 hard fail 로 바뀔 가능성이
있어 명시. 단일 버전(26.1.2) 만 지원하므로 75/75 로 고정.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
v1.0.4
2026-05-14 23:04:43 +09:00
Claude (owner)
b19f37969a music_quiz: add painting_variant definitions (cover_01 ~ cover_50)
리소스팩의 assets/musicquiz/textures/painting/cover_NN.png 를 게임에서
painting entity 로 띄우려면 데이터팩 쪽에 painting_variant 정의가
있어야 한다. 곡 수(50)에 맞춰 data/musicquiz/painting_variant/cover_NN.json
50개를 추가. asset_id 의 musicquiz:cover_NN 이 자동으로
assets/musicquiz/textures/painting/cover_NN.png 를 가져다 쓴다.
width/height = 1×1 (정사각 한 블록).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 22:57:49 +09:00
Claude (owner)
416eaee14a music_quiz: chat_answer 모드 활성 알림 — race-free 함수 호출 방식으로 전환
기존: storage chat_answer:status active 1b/0b 플래그를 모드가 set,
데이터팩이 mq:load 에서 0b 로 reset 하는 구조였는데,
통합 서버에서 mq:load 가 player join 이후에 도는 케이스가 발견되어
모드가 써놓은 1b 를 데이터팩이 직후에 0b 로 덮어쓰는 race 발생.

수정: storage 플래그를 완전히 제거. 모드가 직접 PlayerLoggedInEvent
핸들러에서 mq:players/mod_active_notice 함수를 해당 플레이어로 호출.
데이터팩이 없으면 함수가 없어 silent fail → race 없음.

- mq:load: chat_answer:status 0b 초기화 라인 삭제
- mq:players/login: 조건부 tellraw 제거 (모드가 직접 호출하므로)
- mq:players/mod_active_notice: 새 함수, 그냥 tellraw 만 수행
v1.0.3
2026-05-14 03:14:55 +09:00
Claude (owner)
de6e040623 music_quiz: add pack.png icon 2026-05-14 02:28:52 +09:00
Claude (owner)
141bc5eaa5 music_quiz: fix invalid dialog type — simple_input_form → notice
mq/dialog/answer.json 이 'minecraft:simple_input_form' 타입을 쓰는데
1.21.6 dialog registry 에 그 타입이 없어서 데이터팩 로드 자체가 실패
"세계를 불러올 수 없습니다" 오류. 유효한 타입 중 단일 버튼 + inputs 를
지원하는 minecraft:notice 로 교체, action 을 button(label+inner action)
구조로 감싼다. dynamic/run_command 템플릿은 그대로 — $(text) 매크로 치환.
v1.0.1
2026-05-13 23:36:29 +09:00
Claude (owner)
083297bf50 music_quiz: songs 의 volume 을 필수 기본 정보로 승격 (전 곡 기본 1.0)
기존엔 volume 이 선택 필드여서 미지정 시 config.audio.volume 으로 fallback 되었는데,
곡마다 음량 조절을 자주 하기 위해 모든 곡 엔트리에 volume 을 명시 (모두 1.0). 런타임
quiz/play_sound 흐름은 그대로 — songs[i].volume 을 그대로 사용.
v1.0.0
2026-05-13 22:27:17 +09:00
Claude (owner)
cfe6a41888 music_quiz: chat_answer 모드 활성화 시 로그인 메세지 표시
mq:load 가 storage chat_answer:status active 를 0b 로 초기화. chat_answer 모드의
PlayerLoggedInEvent / ServerPlayConnectionEvents.JOIN 핸들러가 첫 로그인 직후
1b 로 set 하므로, mq:players/login 에서 1b 인 경우 "[채팅정답] 모드가 활성화되어
있습니다. 정답 입력 시 채팅으로 바로 제출할 수 있습니다." tellraw.
2026-05-13 22:21:17 +09:00
Claude (owner)
7adcda68de music_quiz: dialog 기반 정답 입력 + 큐 기반 first-submit-wins 추가
정답 입력 UI 를 dialog 로 제공 (mq:dialog/answer), #minecraft:quick_actions 태그
등록으로 빠른행동키에서 바로 열 수 있게 함. 동시 제출 시 먼저 제출한 사람이 정답으로
인정되도록 mq:answer/ 에 submit_seq 기반 FIFO 큐 + 매크로 기반 제출자 lookup 으로
처리. tick/stop/setanswer 도 새 큐 흐름에 맞춰 업데이트.
2026-05-13 22:20:58 +09:00
Claude (owner)
cea3d29c7d 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
2026-05-13 16:25:05 +09:00
Claude (owner)
b2361187b9 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>
2026-05-13 16:02:27 +09:00
Claude (owner)
2b61af28a8 music_quiz: 무대 의존 제거 + 정적 데이터 스토리지화 + 매 틱 게이팅
- 무대 한정 코드 제거: repeat/map/ (트리/조명), images/image_custom (파이브가이즈),
  load.mcfunction의 map 스코어보드·fill·counter 초기화
- 매 틱 디스패치를 init 상태로 게이팅:
  · timer는 init>=2, check_answer는 init in {5,6}에서만 호출
  · idle(init=0) 틱의 함수 호출 8개 → 4개
- 곡 50개를 매크로 체인(250+ 명령/회) → 스토리지 리스트 O(1) 룩업으로 전환
  mq:init/songs가 mq:main.songs를 적재, setanswer는 index-1로 인덱스 룩업
- 버튼/트리거 정의를 mq:init/buttons / mq:init/triggers로 분리해
  mq:main.button_defs · trigger_defs 스토리지 리스트로 관리
- repeat/triggers/trigger.mcfunction: 투표 후처리 산술 블록 중 변하지 않는
  max_player·rest_player 재계산 제거, $(n)_player 갱신만 1라인
- 작가용 메모 수정.txt 제거
- README.md: 변경 사항·새 구조·스토리지 스키마 반영

566 lines -, 154 lines +.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 15:45:35 +09:00
Claude (owner)
b1babad05a music_quiz: 26.1.2 호환 + 정리 + README
- pack_format 69 → 75 (MC 26.1.2)
- 사문화된 # say / # stopsound 디버그 주석 7곳 제거
- btn.mcfunction: 매 틱 모든 버튼마다 평가되던 디버그 매크로 라인 제거
- 데이터팩 분석·사용법·좌표 의존성을 README.md 에 정리

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 15:22:55 +09:00
6841b7a4c0 이전퀴즈 데이터팩 2026-05-13 15:10:00 +09:00
Claude (owner)
13ea34ba82 Add README 2026-05-13 10:52:47 +09:00