8 Commits

Author SHA1 Message Date
Claude (owner)
6604078273 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>
2026-06-14 03:02:40 +09:00
Claude (owner)
9e6d8ea2ee Merge remote-tracking branch 'origin/main' into codex/owner/mc_datapack 2026-06-14 02:41:22 +09:00
Claude (owner)
2b2b9e0b00 videos: 정답 actionbar 항상 출력 — video "" / 미지정이면 빈 출력
if data 게이트를 제거하고 init6 에서 매 tick answer.video 를 무조건 actionbar 로
보낸다. video 가 "" 이거나 필드가 없으면 빈 문자열이 출력돼 아무것도 안 보이고,
빈 actionbar 가 매 tick 덮어쓰므로 잔상도 자연히 사라진다. 상태 전환/정지 시의
빈 actionbar 클리어는 그대로 유지.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:26:40 +09:00
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
Claude (owner)
cd4d56e621 songs: 곡별 video URL 추가 — 정답 공개 시 actionbar 흰색 표시
곡 포맷에 선택 필드 video(영상 URL)를 추가. 정답 공개 상태(init=6) 동안
repeat/timers/init6 에서 매 tick answer.video 를 actionbar 에 흰색으로 재전송해
유지한다. video 필드가 없는 곡은 표시하지 않는다(if data 로 게이트).
answer 는 setanswer 가 곡 객체로 통째로 교체하므로 곡별 video 가 그대로 반영되고
미지정 곡에서는 잔상이 남지 않는다. songs.mcfunction 포맷 주석/예시도 갱신.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:21:24 +09:00
Claude (owner)
e7a84dc4ae buttons: 종료 상태(init 10/11)에서 정지 버튼이 먹지 않던 버그 수정
퀴즈 종료 후(quiz/end → init=10, init10 타이머의 "종료를 눌러주세요" 안내)
정지 버튼을 눌러도 종료/재시작이 안 됐다. 정지 버튼 클릭은 init!=0 이면 투표
경로(trigger stop)로 가는데, 투표 집계(repeat/triggers/trigger)는 init==5 에서만
수행돼 종료 상태에서는 무시됐기 때문.

종료 상태는 단일 클릭 재시작이 의도이므로(init==0 설정단계와 동일), init>=10 에서
정지 버튼을 투표 없이 commands/stop 으로 직접 실행하도록 분기 추가. commands/stop 이
init 을 0 으로 만들어 같은 tick 의 투표 줄은 자동으로 건너뛴다(중복 실행 없음).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:15:41 +09:00
Claude (owner)
c85bc58039 images: 커버 summon NBT에 Pos 추가 — block_pos 거리검사 통과시켜 로그 실제 제거
직전 커밋(657db78)의 block_pos 만으로는 부족했다. /summon 은 Entity.load() →
readAdditionalSaveData() 에서 block_pos 의 16블록 거리검사를 수행한 뒤에야 명령
좌표로 이동하므로, 검사 시점엔 엔티티가 기본 위치라 검사를 실패해 로그가
"invalid position: 2782,88,5979" 형태로 계속 남는다. NBT에 Pos:[xd,yd,zd] 를
함께 넣으면 load 단계에서 위치가 먼저 설정돼 거리검사를 통과한다.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:07:10 +09:00
Claude (owner)
657db783f1 images: 커버 summon에 block_pos 명시 — "invalid position: null" 로그 제거
페인팅을 /summon 으로 소환하면 부착 블록 좌표가 비어(null) 있어
"Block-attached entity at invalid position: null" 로그가 소환 시·주기 검사마다
반복 출력된다(MC-252934). 1.20.5+ 의 block_pos:[I; x,y,z] 정수배열을 페인팅
자신의 좌표와 동일하게 명시해 null 구간을 없앤다. 렌더링 위치/동작은 동일.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 02:03:50 +09:00
6 changed files with 31 additions and 1 deletions

View File

@@ -51,6 +51,8 @@ scoreboard objectives add score dummy {"text":"점수","bold":true}
scoreboard objectives setdisplay sidebar score
dialog clear @a
# 정답 video URL actionbar 잔상 제거 (전체 리셋의 일부)
title @a actionbar {"text":""}
bossbar set mq:process name [{"text":"진행도: ","color": "yellow","bold": true},{"score":{"name":"index","objective": "main"},"color": "yellow","bold": true},{"text":"/","color": "yellow","bold": true},{"score":{"name":"max_index","objective": "main"},"color": "yellow","bold": true}]
$bossbar set mq:process max $(max_index)

View File

@@ -1 +1,7 @@
$summon minecraft:painting $(x) $(y) $(z) {variant:"$(namespace):$(cover)",facing:$(facing)b,Tags:["mq","mq_cover"]}
# "Block-attached entity at invalid position" 로그 제거(MC-252934).
# /summon 은 NBT 를 먼저 읽어(Entity.load → readAdditionalSaveData 가 block_pos 검사)
# 그 다음에 명령 좌표로 엔티티를 이동시킨다. 따라서 block_pos 만 주면 검사 시점에
# 엔티티가 기본 위치라 16블록 거리 검사를 실패해 로그가 계속 남는다.
# Pos 를 함께 넣으면 load 단계에서 위치가 먼저 설정돼 block_pos 검사를 통과한다.
# (1.20.5+ block_pos:[I; x,y,z] 정수배열 = 페인팅 자신의 블록 좌표)
$summon minecraft:painting $(x) $(y) $(z) {Pos:[$(x)d,$(y)d,$(z)d],variant:"$(namespace):$(cover)",facing:$(facing)b,block_pos:[I;$(x),$(y),$(z)],Tags:["mq","mq_cover"]}

View File

@@ -2,6 +2,8 @@
# 필수 — title, author, alias, description
# 선택 — volume (이 곡만의 /playsound 음량. 미지정시 init/config.mcfunction
# 의 audio.volume 사용)
# video (정답 공개 시 actionbar 에 흰색으로 표시되는 영상 URL. 미지정시
# 표시 안 함)
# 곡 순서가 리소스팩의 track_NN / cover_NN 인덱스와 1:1 매칭된다.
# 예) {volume:0.5, title:"Quiet Song", author:"...", alias:[...], description:"...", video:"..."}
data modify storage mq:main songs set value []

View File

@@ -104,6 +104,7 @@ $execute if score $(n) buttons matches -1 run scoreboard players set $(n) button
# ---- 상시: interaction 클릭/타격 → playsound + 명령/투표 실행 ----
# init main = 0 (퀴즈 시작 전 설정 단계) : 명령 직접 실행
# init main >= 10 (종료 상태) + 정지 버튼 : 명령 직접 실행 (재시작용, 투표 없음)
# 그 외 : trigger 투표 경로
# 한 버튼에 interaction 3개지만 `on target` 은 클릭된 1개만 통과
# (나머지는 target 부재로 체인 중단). limit=1 을 두면 MC 가 임의로 1개를
@@ -111,6 +112,11 @@ $execute if score $(n) buttons matches -1 run scoreboard players set $(n) button
$execute as @e[distance=0..,tag=mq,tag=$(n),type=minecraft:interaction] on target as @s positioned $(x).0 $(y).0 $(z).0 run playsound minecraft:block.stone_button.click_on block @s ~ ~ ~ 1 1
$execute as @e[distance=0..,tag=mq,tag=$(n),type=minecraft:interaction] on target if data storage mq:tmp btn{n:"test"} run $(c)
$execute as @e[distance=0..,tag=mq,tag=$(n),type=minecraft:interaction] on target unless data storage mq:tmp btn{n:"test"} as @s positioned $(x).0 $(y).0 $(z).0 if score init main matches 0 run $(c)
# 종료 상태(init 10/11)에서 정지 버튼 단일 클릭 → 즉시 commands/stop 으로 재시작 대기(init 0).
# 투표 집계는 repeat/triggers/trigger 가 init==5 에서만 하므로, 이 분기 없이는 종료 안내문
# ("종료를 눌러주세요")대로 눌러도 종료가 안 된다. commands/stop 이 init 을 0 으로 만들어
# 아래 투표 줄(unless init==0)은 같은 tick 에 자동으로 건너뛰어진다(중복 실행 없음).
$execute as @e[distance=0..,tag=mq,tag=$(n),type=minecraft:interaction] on target if data storage mq:tmp btn{n:"stop"} as @s positioned $(x).0 $(y).0 $(z).0 if score init main matches 10.. run $(c)
$execute as @e[distance=0..,tag=mq,tag=$(n),type=minecraft:interaction] on target unless data storage mq:tmp btn{n:"test"} as @s positioned $(x).0 $(y).0 $(z).0 unless score init main matches 0 run trigger $(n)
# ---- 처리 후 attack/interaction NBT 클리어 (다음 tick 중복 발화 방지) ----

View File

@@ -1,4 +1,14 @@
# 정답 공개 동안(init=6) 곡 video URL 을 actionbar 에 흰색 평문으로 계속 표시.
# nbt 소스 컴포넌트는 이 버전에서 문자열을 SNBT(초록 따옴표, color 무시)로 렌더하므로
# macro(mq:videos/actionbar)로 URL 을 리터럴 text 에 넣어 흰색 평문으로 출력한다.
# 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":""}
# 다음 상태로 넘어가기 전 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

View File

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