Files
mc_datapack/music_quiz/data/mq/function/answer/iter_aliases.mcfunction
Claude (owner) 7adcda68de music_quiz: dialog 기반 정답 입력 + 큐 기반 first-submit-wins 추가
정답 입력 UI 를 dialog 로 제공 (mq:dialog/answer), #minecraft:quick_actions 태그
등록으로 빠른행동키에서 바로 열 수 있게 함. 동시 제출 시 먼저 제출한 사람이 정답으로
인정되도록 mq:answer/ 에 submit_seq 기반 FIFO 큐 + 매크로 기반 제출자 lookup 으로
처리. tick/stop/setanswer 도 새 큐 흐름에 맞춰 업데이트.
2026-05-13 22:20:58 +09:00

11 lines
480 B
MCFunction

# aliases 배열 첫 원소와 비교 → 매치 시 즉시 종료, 아니면 pop 후 재귀
execute store result score alen func.temp run data get storage mq:tmp aliases
execute if score alen func.temp matches 0 run return 0
data modify storage mq:tmp judge.answer set from storage mq:tmp aliases[0]
function mq:answer/macro/match with storage mq:tmp judge
data remove storage mq:tmp aliases[0]
execute if score @s answer matches 1 run return 0
function mq:answer/iter_aliases