영상 모드 명령을 전부 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>
This commit is contained in:
Claude (owner)
2026-06-05 02:45:55 +09:00
parent f98dd9952b
commit d0e11e12ce
21 changed files with 88 additions and 79 deletions

View File

@@ -38,8 +38,8 @@ function mq:quiz/stop_sound
$scoreboard players set max_index main $(max_index)
scoreboard players set init main 1
# 시작 시 1..preload 번 영상 캐시 미리받기. schedule 로 다음 tick(서버 소스)
# 실행해 videoCache add 권한 보장 + max_index 설정 이후 동작 보장.
# 시작 시 1..preload 번 영상 캐시 미리받기(큐 적재). schedule 로 다음 tick
# 실행해 max_index 설정 이후 동작 보장. 실제 다운로드는 drain 이 tick 마다 처리.
schedule function mq:videos/cache/preload 1t
dialog show @a mq:page1