Files
mc_datapack/music_quiz/data/mq/function/tick.mcfunction
Claude (owner) d0e11e12ce 영상 모드 명령을 전부 command_block 큐로 우회 — 모드 없이도 게임 동작
videoCache add/remove/clear 까지 모든 모드 명령을 mcfunction 에서 직접
실행하지 않고 큐(mq:main video.cmdq)에 문자열로 적재한 뒤, 매 tick
videos/drain 이 공용 command_block 으로 하나씩 실행(auto 0→1, 1회 실행 후
off)한다. 데이터팩 로드 시 모드 명령을 파싱하지 않으므로 영상 모드 미설치
상태에서도 데이터팩이 정상 로드/플레이된다.

- preload/FIFO 축출 다건도 큐를 tick 당 1개씩 소진해 순서 보장
- cache 캐시 추적/dedup/src 결정(video_N vs 전체 URL)을 macro/cmd 로 통합
- 캐시 관련 파일 정리: add_one/preload_loop/evict_one/clear_run/
  macro/add_one/macro/evict_one/resolve_src 제거, fill/drain/drain_off 도입
  (videos 15→12 파일, cache/macro 폴더 제거)

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
2026-06-05 02:45:55 +09:00

15 lines
623 B
MCFunction

function mq:repeat/players
function mq:repeat/buttons/handler
function mq:repeat/triggers/handler
# 영상 모드 명령 큐를 매 tick 한 개씩 command_block 으로 실행
function mq:videos/drain
execute if score init main matches 2.. run function mq:repeat/timer
execute if score init main matches 5..6 run function mq:repeat/check_answer
# 정답 입력 다이얼로그: init=5 (곡 재생 중) 일 때만 열림 / 제출 처리
# warn-off execute-group
execute if score init main matches 5 as @a[scores={input=1..}] run function mq:answer/open
execute if score init main matches 5 run function mq:answer/process