Files
mc_datapack/music_quiz/data/mq/function/repeat/timers/init6.mcfunction
Claude (owner) b7c284facb videos: 정답 video URL actionbar 잔상 제거
actionbar 는 재전송을 멈춰도 ~3초간 페이드로 남으므로, init6 의 video URL 이
다음 곡(init=5) 초반까지 잔상으로 보였다. 상태 전환(timer 300, select) 직전에
빈 actionbar 를 보내 깔끔히 지우고, 전체 리셋인 commands/stop 에도 동일하게
빈 actionbar 를 추가해 종료/리셋 시 잔상이 남지 않게 한다.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:25:04 +09:00

13 lines
921 B
MCFunction

# 정답 공개 동안(init=6) 곡의 video URL 을 actionbar 에 흰색으로 계속 표시.
# 매 tick 재전송해 유지. video 필드가 없는 곡은 표시하지 않음.
execute if data storage mq:main answer.video run title @a actionbar [{"storage":"mq:main","nbt":"answer.video","color":"white"}]
execute if score timer main matches 300 run title @a title {"text":""}
# 다음 상태로 넘어가기 전 actionbar 비우기 — 안 비우면 마지막 URL 이 다음 곡(init=5)
# 초반까지 ~3초 잔상으로 남는다. select 보다 먼저 실행되어 깔끔히 지워진다.
execute if score timer main matches 300 run title @a actionbar {"text":""}
# warn-off execute-group
execute if score timer main matches 290 run function mq:images/clear
execute if score timer main matches 290 run function mq:videos/clear
execute if score timer main matches 300.. run function mq:quiz/select with storage mq:main