videos: actionbar video URL 을 macro 평문 출력 — 따옴표/초록색 제거

nbt 소스 텍스트 컴포넌트는 1.21.5+ 에서 문자열을 SNBT(초록 따옴표, color 무시)로
렌더해 액션바에 "url" 형태로 초록색으로 나왔다. macro(mq:videos/actionbar)로
URL 을 리터럴 text 에 넣어 흰색 평문으로 출력한다. video 가 있으면(빈 "" 포함)
macro, 없으면 빈 actionbar 로 덮어써 always-output·잔상 방지 동작은 유지.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude (owner)
2026-06-14 03:02:40 +09:00
parent 9e6d8ea2ee
commit 6604078273
2 changed files with 10 additions and 4 deletions

View File

@@ -1,7 +1,9 @@
# 정답 공개 동안(init=6) 곡 video URL 을 actionbar 에 흰색으로 계속 표시. # 정답 공개 동안(init=6) 곡 video URL 을 actionbar 에 흰색 평문으로 계속 표시.
# 매 tick 항상 재전송한다. video 가 "" 이거나 없는 곡은 빈 문자열이 그대로 출력돼 # nbt 소스 컴포넌트는 이 버전에서 문자열을 SNBT(초록 따옴표, color 무시)로 렌더하므로
# 아무것도 안 보이고, 매 tick 빈 actionbar 로 덮어써 잔상도 남지 않는다. # macro(mq:videos/actionbar)로 URL 을 리터럴 text 에 넣어 흰색 평문으로 출력한다.
title @a actionbar [{"storage":"mq:main","nbt":"answer.video","color":"white"}] # video 가 있으면(빈 "" 포함) macro 호출, 없으면 빈 actionbar 로 덮어써 잔상 방지.
execute if data storage mq:main answer.video run function mq:videos/actionbar with storage mq:main answer
execute unless data storage mq:main answer.video run title @a actionbar {"text":""}
execute if score timer main matches 300 run title @a title {"text":""} execute if score timer main matches 300 run title @a title {"text":""}
# 다음 상태로 넘어가기 전 actionbar 비우기 — 안 비우면 마지막 URL 이 다음 곡(init=5) # 다음 상태로 넘어가기 전 actionbar 비우기 — 안 비우면 마지막 URL 이 다음 곡(init=5)

View File

@@ -0,0 +1,4 @@
# video URL 을 actionbar 에 흰색 평문으로 출력 (macro).
# nbt 소스 컴포넌트는 이 버전에서 문자열을 SNBT(초록 따옴표, color 무시)로 렌더하므로,
# URL 을 리터럴 text 에 넣어 흰색으로 출력한다. video 가 "" 이면 빈 문자열이 출력됨.
$title @a actionbar {"text":"$(video)","color":"white"}