Compare commits
8 Commits
4f9d31d634
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6604078273 | ||
|
|
9e6d8ea2ee | ||
|
|
2b2b9e0b00 | ||
|
|
b7c284facb | ||
|
|
cd4d56e621 | ||
|
|
e7a84dc4ae | ||
|
|
c85bc58039 | ||
|
|
657db783f1 |
@@ -51,6 +51,8 @@ scoreboard objectives add score dummy {"text":"점수","bold":true}
|
|||||||
scoreboard objectives setdisplay sidebar score
|
scoreboard objectives setdisplay sidebar score
|
||||||
|
|
||||||
dialog clear @a
|
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 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)
|
$bossbar set mq:process max $(max_index)
|
||||||
|
|||||||
@@ -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"]}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
# 필수 — title, author, alias, description
|
# 필수 — title, author, alias, description
|
||||||
# 선택 — volume (이 곡만의 /playsound 음량. 미지정시 init/config.mcfunction
|
# 선택 — volume (이 곡만의 /playsound 음량. 미지정시 init/config.mcfunction
|
||||||
# 의 audio.volume 사용)
|
# 의 audio.volume 사용)
|
||||||
|
# video (정답 공개 시 actionbar 에 흰색으로 표시되는 영상 URL. 미지정시
|
||||||
|
# 표시 안 함)
|
||||||
# 곡 순서가 리소스팩의 track_NN / cover_NN 인덱스와 1:1 매칭된다.
|
# 곡 순서가 리소스팩의 track_NN / cover_NN 인덱스와 1:1 매칭된다.
|
||||||
# 예) {volume:0.5, title:"Quiet Song", author:"...", alias:[...], description:"...", video:"..."}
|
# 예) {volume:0.5, title:"Quiet Song", author:"...", alias:[...], description:"...", video:"..."}
|
||||||
data modify storage mq:main songs set value []
|
data modify storage mq:main songs set value []
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ $execute if score $(n) buttons matches -1 run scoreboard players set $(n) button
|
|||||||
|
|
||||||
# ---- 상시: interaction 클릭/타격 → playsound + 명령/투표 실행 ----
|
# ---- 상시: interaction 클릭/타격 → playsound + 명령/투표 실행 ----
|
||||||
# init main = 0 (퀴즈 시작 전 설정 단계) : 명령 직접 실행
|
# init main = 0 (퀴즈 시작 전 설정 단계) : 명령 직접 실행
|
||||||
|
# init main >= 10 (종료 상태) + 정지 버튼 : 명령 직접 실행 (재시작용, 투표 없음)
|
||||||
# 그 외 : trigger 투표 경로
|
# 그 외 : trigger 투표 경로
|
||||||
# 한 버튼에 interaction 3개지만 `on target` 은 클릭된 1개만 통과
|
# 한 버튼에 interaction 3개지만 `on target` 은 클릭된 1개만 통과
|
||||||
# (나머지는 target 부재로 체인 중단). limit=1 을 두면 MC 가 임의로 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 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 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)
|
$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)
|
$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 중복 발화 방지) ----
|
# ---- 처리 후 attack/interaction NBT 클리어 (다음 tick 중복 발화 방지) ----
|
||||||
|
|||||||
@@ -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":""}
|
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
|
# 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:images/clear
|
||||||
execute if score timer main matches 290 run function mq:videos/clear
|
execute if score timer main matches 290 run function mq:videos/clear
|
||||||
|
|||||||
4
music_quiz/data/mq/function/videos/actionbar.mcfunction
Normal file
4
music_quiz/data/mq/function/videos/actionbar.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# video URL 을 actionbar 에 흰색 평문으로 출력 (macro).
|
||||||
|
# nbt 소스 컴포넌트는 이 버전에서 문자열을 SNBT(초록 따옴표, color 무시)로 렌더하므로,
|
||||||
|
# URL 을 리터럴 text 에 넣어 흰색으로 출력한다. video 가 "" 이면 빈 문자열이 출력됨.
|
||||||
|
$title @a actionbar {"text":"$(video)","color":"white"}
|
||||||
Reference in New Issue
Block a user