Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
736ec2a3d1 | ||
|
|
da075b60b8 |
@@ -1,26 +1,22 @@
|
|||||||
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 완전히 종료된후 시작해주세요.","color":"red","msg":""}
|
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 완전히 종료된후 시작해주세요.","color":"red","msg":""}
|
||||||
|
|
||||||
# ---- 외부 모드 설치 검증 ----
|
# ---- 외부 모드 설치 검증 ----
|
||||||
# 두 모드는 성격이 달라서 검증 방식이 다름:
|
# mq_video_mod (mc_video_player_mod) 만 게이트. 영상 렌더링은 클라 모드가
|
||||||
#
|
# 필수라 없으면 게임이 의미가 없음. same objective 안에 holder 두 종류:
|
||||||
# * mq_chat_mod : mc_chat_answer_mod = 서버 전용 모드 (채팅 가로채기는
|
|
||||||
# 서버에서 일어남, 클라 설치 불필요). 따라서 fake player `#server`
|
|
||||||
# 점수를 모드가 매 server tick 마다 1 로 set. 서버에 모드가 없으면
|
|
||||||
# 이 점수가 갱신되지 않음.
|
|
||||||
#
|
|
||||||
# * mq_video_mod : mc_video_player_mod = 클라이언트 측 렌더링 + 서버 측
|
|
||||||
# 컴포넌트. 같은 objective 안에 holder 두 종류 사용:
|
|
||||||
# - `#server mq_video_mod` : 서버 컴포넌트가 매 tick 1 로 갱신 (server
|
# - `#server mq_video_mod` : 서버 컴포넌트가 매 tick 1 로 갱신 (server
|
||||||
# presence). 없으면 0 → 서버에 모드 미설치.
|
# presence). 없으면 0 → 서버에 모드 미설치.
|
||||||
# - `<player> mq_video_mod` : 클라 join 시 payload 가 서버로 오면 서버
|
# - `<player> mq_video_mod` : 클라 join 시 payload 가 서버로 오면 서버
|
||||||
# 컴포넌트가 해당 플레이어 점수를 1 로 set (client presence). 클라
|
# 컴포넌트가 해당 플레이어 점수를 1 로 set (client presence). 클라
|
||||||
# 미설치면 0 유지.
|
# 미설치면 0 유지.
|
||||||
# 이렇게 분리해야 "서버 미설치"와 "특정 플레이어 클라 미설치"가 안내에서
|
|
||||||
# 구분된다.
|
|
||||||
#
|
#
|
||||||
# 1) 서버 측 모드 부재 — 전원 차단, 단일 안내. 서버 부재는 클라 검사보다
|
# mq_chat_mod (mc_chat_answer_mod) 는 게이트하지 않음 — 채팅 모드는 입력을
|
||||||
# 우선해야 — 클라가 다 설치되어 있어도 서버가 없으면 동작 안 한다.
|
# "편하게" 만들어주는 옵션일 뿐이고, 모드 없는 환경에서도 `/trigger input`
|
||||||
execute unless score #server mq_chat_mod matches 1 run return run function mq:tellraw {"text":"채팅정답 모드가 서버에 미설치 — 서버 관리자에게 문의해주세요.","color":"red","msg":""}
|
# dialog 경로로 정답 제출이 가능. 과거에 게이트해 두면 모드 presence pulse
|
||||||
|
# 가 호스트 환경 (banner/mohist 같은 fabric-bukkit 하이브리드) 에서 안
|
||||||
|
# 들어오거나, 사용자 모드 버전이 presence tick 이전 (v1.3.4 이하) 일 때
|
||||||
|
# false negative 로 시작이 막혔음.
|
||||||
|
#
|
||||||
|
# 1) 서버 측 영상 모드 부재 — 전원 차단, 단일 안내.
|
||||||
execute unless score #server mq_video_mod matches 1 run return run function mq:tellraw {"text":"영상재생 모드가 서버에 미설치 — 서버 관리자에게 문의해주세요.","color":"red","msg":""}
|
execute unless score #server mq_video_mod matches 1 run return run function mq:tellraw {"text":"영상재생 모드가 서버에 미설치 — 서버 관리자에게 문의해주세요.","color":"red","msg":""}
|
||||||
|
|
||||||
# 2) 클라이언트 측 모드 (mc_video_player_mod) 부재 — 본인 누락 안내 + 차단.
|
# 2) 클라이언트 측 모드 (mc_video_player_mod) 부재 — 본인 누락 안내 + 차단.
|
||||||
|
|||||||
@@ -22,21 +22,23 @@ scoreboard objectives add answer dummy
|
|||||||
scoreboard objectives add leave_game custom:leave_game
|
scoreboard objectives add leave_game custom:leave_game
|
||||||
|
|
||||||
# 외부 모드 존재 확인용 점수.
|
# 외부 모드 존재 확인용 점수.
|
||||||
# mq_chat_mod : 서버 전용 모드(mc_chat_answer_mod). 모드가 매 server tick
|
|
||||||
# 마다 fake player `#server` 점수를 1 로 set. 모드가 서버에 없으면 0 유지.
|
|
||||||
# mq_video_mod : 클라이언트 모드(mc_video_player_mod). 클라 join 시 서버로
|
# mq_video_mod : 클라이언트 모드(mc_video_player_mod). 클라 join 시 서버로
|
||||||
# handshake payload 전송 → 서버 측 모드가 해당 플레이어 점수를 1 로 set.
|
# handshake payload 전송 → 서버 측 모드가 해당 플레이어 점수를 1 로 set.
|
||||||
# 클라에 모드가 없으면 0 유지. (login.mcfunction 에서 플레이어별 0 초기화.)
|
# 클라에 모드가 없으면 0 유지. (login.mcfunction 에서 플레이어별 0 초기화.)
|
||||||
|
# same objective 안에 holder 두 종류 — `#server` 는 서버 컴포넌트 존재
|
||||||
|
# (서버 측 모드가 매 tick 1 로 갱신), `<player>` 는 클라 측 존재 (payload
|
||||||
|
# 수신 시 1 로 갱신).
|
||||||
|
#
|
||||||
|
# mq_chat_mod (mc_chat_answer_mod) 는 더 이상 게이트하지 않음 — 모드 없는
|
||||||
|
# 환경에서도 `/trigger input` dialog 경로로 정답 제출 가능. presence pulse
|
||||||
|
# 가 호스트 환경에 따라 안 들어오거나 사용자 모드 버전이 옛날일 때 false
|
||||||
|
# negative 로 시작이 막히던 문제 회피. (모드 측은 여전히 매 tick objective
|
||||||
|
# 존재시 1 로 set 시도하지만, objective 가 없으면 silent skip 하므로 무해.)
|
||||||
scoreboard objectives remove mq_chat_mod
|
scoreboard objectives remove mq_chat_mod
|
||||||
scoreboard objectives remove mq_video_mod
|
scoreboard objectives remove mq_video_mod
|
||||||
scoreboard objectives add mq_chat_mod dummy
|
|
||||||
scoreboard objectives add mq_video_mod dummy
|
scoreboard objectives add mq_video_mod dummy
|
||||||
# /reload 후 모드가 한 tick 도 돌기 전에 start 가 호출될 수 있으니
|
# /reload 후 모드가 한 tick 도 돌기 전에 start 가 호출될 수 있으니
|
||||||
# #server 점수도 0 으로 materialize. 모드가 살아 있으면 다음 tick 에 1 로 갱신.
|
# #server 점수도 0 으로 materialize. 모드가 살아 있으면 다음 tick 에 1 로 갱신.
|
||||||
# mq_video_mod 도 같은 objective 안에서 holder 만 다르게 — `#server` 는 서버
|
|
||||||
# 컴포넌트 존재 (서버 측 모드가 매 tick 1 로 갱신), `<player>` 는 클라 측
|
|
||||||
# 존재 (payload 수신 시 1 로 갱신).
|
|
||||||
scoreboard players set #server mq_chat_mod 0
|
|
||||||
scoreboard players set #server mq_video_mod 0
|
scoreboard players set #server mq_video_mod 0
|
||||||
|
|
||||||
scoreboard players set two func.temp 2
|
scoreboard players set two func.temp 2
|
||||||
|
|||||||
@@ -26,6 +26,16 @@
|
|||||||
# 인접: 중심 0.375 / 0.5 / 0.625, 각 폭 0.125 → 합 [0.3125, 0.6875]).
|
# 인접: 중심 0.375 / 0.5 / 0.625, 각 폭 0.125 → 합 [0.3125, 0.6875]).
|
||||||
# interaction Y 는 hitbox 바닥 → 소환 y = block y + 0.375, height = 0.25.
|
# interaction Y 는 hitbox 바닥 → 소환 y = block y + 0.375, height = 0.25.
|
||||||
#
|
#
|
||||||
|
# ---- 깊이축: 블록 면 바로 바깥 (이중 트리거 방지) ----
|
||||||
|
# interaction 박스가 stone_button hitbox 와 겹치면 한 번 클릭에 interaction
|
||||||
|
# 도 발화하고 stone_button 도 vanilla 클릭으로 인식되어 powered=true 애니
|
||||||
|
# 메이션이 같이 일어남. → interaction 박스를 버튼 면 바깥쪽으로 한 두께
|
||||||
|
# (0.125) 만큼 빼 ray 가 stone_button 에 닿기 전에 interaction 에서 멈추게.
|
||||||
|
# south : 깊이 z 중심 = -0.0625 (interaction z ∈ [-0.125, 0], 버튼 z ∈ [0, 0.125])
|
||||||
|
# north : 깊이 z 중심 = 1.0625 (interaction z ∈ [1, 1.125], 버튼 z ∈ [0.875, 1])
|
||||||
|
# east : 깊이 x 중심 = -0.0625
|
||||||
|
# west : 깊이 x 중심 = 1.0625
|
||||||
|
#
|
||||||
# ---- positioned 의 .5 보정 회피 ----
|
# ---- positioned 의 .5 보정 회피 ----
|
||||||
# MC 의 vec3 인자는 정수만 쓰면 자동으로 +0.5 보정됨 (블록 중심으로 잡힘).
|
# MC 의 vec3 인자는 정수만 쓰면 자동으로 +0.5 보정됨 (블록 중심으로 잡힘).
|
||||||
# positioned 2773 86 5968 → 실제로는 (2773.5, 86, 5968.5). 거기서 ~ 오프셋
|
# positioned 2773 86 5968 → 실제로는 (2773.5, 86, 5968.5). 거기서 ~ 오프셋
|
||||||
@@ -55,29 +65,29 @@ $execute if score $(n) buttons matches -1 run setblock $(x) $(y) $(z) minecraft:
|
|||||||
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:interaction,tag=mq,tag=$(n)]
|
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:interaction,tag=mq,tag=$(n)]
|
||||||
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:text_display,tag=mq,tag=$(n)]
|
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:text_display,tag=mq,tag=$(n)]
|
||||||
|
|
||||||
# south: 깊이축=z(+0.0625), 가로축=x, 3 타일 + 라벨
|
# south: 깊이축=z(-0.0625, 블록 면 바깥), 가로축=x, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~-0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~-0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~-0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.01 {Tags:["mq","$(n)"],Rotation:[0f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.01 {Tags:["mq","$(n)"],Rotation:[0f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
# north: 깊이축=z(+0.9375), 가로축=x, 3 타일 + 라벨
|
# north: 깊이축=z(+1.0625, 블록 면 바깥), 가로축=x, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~0.9375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~1.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~0.9375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~1.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~0.9375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~1.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.99 {Tags:["mq","$(n)"],Rotation:[180f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.99 {Tags:["mq","$(n)"],Rotation:[180f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
# east: 깊이축=x(+0.0625), 가로축=z, 3 타일 + 라벨
|
# east: 깊이축=x(-0.0625, 블록 면 바깥), 가로축=z, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.0625 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~-0.0625 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.0625 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~-0.0625 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.0625 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~-0.0625 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.01 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[-90f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.01 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[-90f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
# west: 깊이축=x(+0.9375), 가로축=z, 3 타일 + 라벨
|
# west: 깊이축=x(+1.0625, 블록 면 바깥), 가로축=z, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.9375 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~1.0625 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.9375 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~1.0625 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.9375 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~1.0625 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.99 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[90f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.99 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[90f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
$execute if score $(n) buttons matches -1 run scoreboard players set $(n) buttons 0
|
$execute if score $(n) buttons matches -1 run scoreboard players set $(n) buttons 0
|
||||||
|
|
||||||
|
|||||||
@@ -1,67 +1,63 @@
|
|||||||
# v1.0.18 → v1.0.20 부분 적용 가이드
|
# v1.0.21 → v1.0.22 부분 적용 가이드
|
||||||
|
|
||||||
전체 datapack 을 교체하지 않고, 이 폴더의 두 파일만 덮어쓰면 v1.0.20 과 동일한 상태가 됩니다.
|
전체 datapack 을 교체하지 않고, 이 폴더의 파일만 덮어쓰면 v1.0.22 와 동일한 상태가 됩니다.
|
||||||
|
|
||||||
## 무엇이 바뀌었나 (진짜 원인)
|
## 무엇이 바뀌었나 (v1.0.22 신규)
|
||||||
|
|
||||||
### 1. `repeat/buttons/btn.mcfunction` — interaction 박스가 버튼에서 0.5 칸 어긋나던 문제
|
### `commands/start.mcfunction` + `load.mcfunction` — "채팅정답 모드 미설치" false negative 제거
|
||||||
|
|
||||||
마인크래프트 명령의 vec3 좌표 인자는 **정수만 적으면 자동으로 +0.5 보정** 됩니다
|
모드를 설치했는데도 `/start` 가 "채팅정답 모드가 서버에 미설치" 로 차단되던 문제.
|
||||||
(블록 중심으로 잡힘). 즉
|
|
||||||
|
|
||||||
```
|
원인: 검증은 모드가 매 server tick `#server mq_chat_mod` 점수를 1 로 set
|
||||||
positioned 2773 86 5968
|
하는지 보는 방식인데, 다음 케이스에서 score 가 1 로 안 올라가 false negative:
|
||||||
```
|
- 사용자가 옛 모드 버전 (v1.3.4 이하, presence tick 추가 전) 을 쓰고 있을 때
|
||||||
|
- banner/mohist 같은 fabric-bukkit 하이브리드 호스트에서 ServerTickEvents 가
|
||||||
|
안 들어올 때
|
||||||
|
|
||||||
는 실제로 `(2773.5, 86, 5968.5)` 가 됩니다. 그래서 거기서 `~0.375 ~0.375 ~0.0625`
|
근본 수정: 채팅정답 모드는 입력을 편하게 만들어 주는 **선택적 편의 기능**일
|
||||||
를 더해 interaction 을 소환하면 박스 전체가 블록 중앙 쪽으로 0.5 칸 밀려서
|
뿐, 모드 없이도 `/trigger input` dialog 경로로 정답 제출 가능. 그래서 채팅
|
||||||
버튼과 어긋나 보입니다 (사용자가 보내준 사진의 정확히 그 증상).
|
모드 게이트 자체를 제거. 영상재생 모드 (mc_video_player_mod) 게이트는 진짜
|
||||||
|
필수이므로 유지.
|
||||||
|
|
||||||
수정: `positioned $(x) $(y) $(z)` → `positioned $(x).0 $(y).0 $(z).0`.
|
## 이전 버전 fix 도 같이 포함 (v1.0.20, v1.0.21)
|
||||||
매크로 expand 결과가 `positioned 2773.0 86.0 5968.0` 처럼 decimal 형태가
|
|
||||||
되어 .5 보정이 발생하지 않고 블록의 minimal corner 가 정확히 origin 으로
|
|
||||||
잡힙니다.
|
|
||||||
|
|
||||||
### 2. `repeat/buttons/btn_prep.mcfunction` — `btn.label <--[HERE]` 파싱 에러
|
### `repeat/buttons/btn.mcfunction`
|
||||||
|
- (v1.0.20) `positioned $(x) $(y) $(z)` → `$(x).0 $(y).0 $(z).0`.
|
||||||
|
MC vec3 정수 인자의 +0.5 보정 (블록 중심) 으로 interaction 박스가 0.5 칸
|
||||||
|
어긋나던 문제 회피.
|
||||||
|
- (v1.0.21) interaction 깊이축을 stone_button hitbox 바깥쪽으로 한 두께만큼
|
||||||
|
이동. 한 번 클릭에 stone_button 도 같이 눌리던 (powered=true) 문제 회피.
|
||||||
|
- (v1.0.21) `text_display.text` 를 String JSON 에서 직접 TextComponent
|
||||||
|
compound 로. MC 1.20.5+ 부터 라벨이 `{"text":"게임시작",...}` 코드 그대로
|
||||||
|
렌더되던 문제 회피.
|
||||||
|
|
||||||
이전 구현은
|
### `repeat/buttons/btn_prep.mcfunction`
|
||||||
|
- (v1.0.20) `execute unless data storage mq:tmp btn.label ...` 가 MC 26.1.2
|
||||||
```
|
파서에 거부되던 문제. defaults + `data modify ... merge from` 방식으로
|
||||||
execute unless data storage mq:tmp btn.label run data modify storage mq:tmp btn.label set value ""
|
재작성.
|
||||||
```
|
|
||||||
|
|
||||||
같은 식이었는데 MC 26.1.2 의 명령 파서가 이 라인을 거부했습니다. 문제 난
|
|
||||||
`execute unless data storage ... <path>` 구문 자체를 제거하고, defaults
|
|
||||||
컴파운드 위에 entry 를 merge 하는 방식으로 다시 작성했습니다.
|
|
||||||
|
|
||||||
```
|
|
||||||
data modify storage mq:tmp btn_default set value {label:"",label_color:"black",label_font:"minecraft:default",label_scale:"1.0"}
|
|
||||||
data modify storage mq:tmp btn_default merge from storage mq:tmp btn
|
|
||||||
data modify storage mq:tmp btn set from storage mq:tmp btn_default
|
|
||||||
```
|
|
||||||
|
|
||||||
`data modify ... merge from` 은 source 의 키로 target 을 덮어쓰므로,
|
|
||||||
entry 에 있는 값은 보존되고 entry 에 없는 키만 default 값으로 채워집니다.
|
|
||||||
기능적으로는 이전과 같지만 문제 난 라인 자체가 없어졌습니다.
|
|
||||||
|
|
||||||
## 적용 방법
|
## 적용 방법
|
||||||
|
|
||||||
이 폴더의 `data/` 트리는 datapack 의 `data/` 트리와 같은 구조입니다.
|
서버의 datapack 폴더 (예: `world/datapacks/music_quiz/`) 기준으로 이 폴더의
|
||||||
서버의 datapack 폴더 (예: `world/datapacks/music_quiz/`) 기준으로 두 파일을
|
파일을 **같은 경로에 덮어쓰세요**.
|
||||||
**반드시 덮어쓰세요**.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
temp/data/mq/function/repeat/buttons/btn_prep.mcfunction
|
temp/data/mq/function/commands/start.mcfunction
|
||||||
-> <datapack>/data/mq/function/repeat/buttons/btn_prep.mcfunction (덮어쓰기)
|
-> <datapack>/data/mq/function/commands/start.mcfunction
|
||||||
|
|
||||||
|
temp/data/mq/function/load.mcfunction
|
||||||
|
-> <datapack>/data/mq/function/load.mcfunction
|
||||||
|
|
||||||
temp/data/mq/function/repeat/buttons/btn.mcfunction
|
temp/data/mq/function/repeat/buttons/btn.mcfunction
|
||||||
-> <datapack>/data/mq/function/repeat/buttons/btn.mcfunction (덮어쓰기)
|
-> <datapack>/data/mq/function/repeat/buttons/btn.mcfunction
|
||||||
|
|
||||||
|
temp/data/mq/function/repeat/buttons/btn_prep.mcfunction
|
||||||
|
-> <datapack>/data/mq/function/repeat/buttons/btn_prep.mcfunction
|
||||||
```
|
```
|
||||||
|
|
||||||
`btn_prep.mcfunction` 은 v1.0.17 이후에 추가된 파일이라, v1.0.16 이하에서
|
이미 v1.0.21 을 적용한 상태라면 위 두 `repeat/buttons/*` 파일은 동일하므로
|
||||||
바로 v1.0.20 으로 점프한다면 새로 생성되는 것입니다. v1.0.17 / v1.0.18 /
|
사실상 `start.mcfunction` 과 `load.mcfunction` 두 개만 새로 바뀝니다.
|
||||||
v1.0.19 이미 설치된 환경이라면 기존 파일을 반드시 덮어써야 합니다 (남아 있는
|
그래도 4 개 모두 덮어쓰는 게 안전합니다 (idempotent).
|
||||||
구버전 파일이 reload 시 같은 파싱 에러를 일으킵니다).
|
|
||||||
|
|
||||||
복사 후 게임 안에서:
|
복사 후 게임 안에서:
|
||||||
|
|
||||||
@@ -71,8 +67,8 @@ v1.0.19 이미 설치된 환경이라면 기존 파일을 반드시 덮어써야
|
|||||||
|
|
||||||
## 확인
|
## 확인
|
||||||
|
|
||||||
- `/reload` 시 콘솔에 `Failed to load function mq:repeat/buttons/btn_prep`
|
- 채팅정답 모드가 설치되어 있든 아니든 `/start` 가 "채팅정답 모드 미설치"
|
||||||
같은 파싱 에러가 더 이상 뜨지 않아야 합니다.
|
메시지로 차단되지 않아야 합니다. (영상재생 모드는 여전히 필수.)
|
||||||
- 버튼 위치에 interaction 박스가 정확히 버튼 머리를 감싸야 합니다
|
- 버튼 클릭 시 stone_button 의 powered 애니메이션 없음.
|
||||||
(이전처럼 옆으로 0.5 칸 어긋나지 않아야 합니다).
|
- 라벨이 `게임시작` 등으로 정상 표시 (JSON 코드 노출 없음).
|
||||||
- 버튼을 클릭했을 때 정상적으로 동작하면 적용 성공입니다.
|
- 콘솔에 파싱 에러 없음.
|
||||||
|
|||||||
37
temp/data/mq/function/commands/start.mcfunction
Normal file
37
temp/data/mq/function/commands/start.mcfunction
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
execute if score init main matches 10 run return run function mq:tellraw {"text":"퀴즈가 완전히 종료된후 시작해주세요.","color":"red","msg":""}
|
||||||
|
|
||||||
|
# ---- 외부 모드 설치 검증 ----
|
||||||
|
# mq_video_mod (mc_video_player_mod) 만 게이트. 영상 렌더링은 클라 모드가
|
||||||
|
# 필수라 없으면 게임이 의미가 없음. same objective 안에 holder 두 종류:
|
||||||
|
# - `#server mq_video_mod` : 서버 컴포넌트가 매 tick 1 로 갱신 (server
|
||||||
|
# presence). 없으면 0 → 서버에 모드 미설치.
|
||||||
|
# - `<player> mq_video_mod` : 클라 join 시 payload 가 서버로 오면 서버
|
||||||
|
# 컴포넌트가 해당 플레이어 점수를 1 로 set (client presence). 클라
|
||||||
|
# 미설치면 0 유지.
|
||||||
|
#
|
||||||
|
# mq_chat_mod (mc_chat_answer_mod) 는 게이트하지 않음 — 채팅 모드는 입력을
|
||||||
|
# "편하게" 만들어주는 옵션일 뿐이고, 모드 없는 환경에서도 `/trigger input`
|
||||||
|
# dialog 경로로 정답 제출이 가능. 과거에 게이트해 두면 모드 presence pulse
|
||||||
|
# 가 호스트 환경 (banner/mohist 같은 fabric-bukkit 하이브리드) 에서 안
|
||||||
|
# 들어오거나, 사용자 모드 버전이 presence tick 이전 (v1.3.4 이하) 일 때
|
||||||
|
# false negative 로 시작이 막혔음.
|
||||||
|
#
|
||||||
|
# 1) 서버 측 영상 모드 부재 — 전원 차단, 단일 안내.
|
||||||
|
execute unless score #server mq_video_mod matches 1 run return run function mq:tellraw {"text":"영상재생 모드가 서버에 미설치 — 서버 관리자에게 문의해주세요.","color":"red","msg":""}
|
||||||
|
|
||||||
|
# 2) 클라이언트 측 모드 (mc_video_player_mod) 부재 — 본인 누락 안내 + 차단.
|
||||||
|
# selector `scores={X=..0}` 는 점수 미존재를 매치하지 않으므로 직전에
|
||||||
|
# `add @a ... 0` 으로 materialize. 개인 안내는 tellraw @s 직접 (mq:tellraw
|
||||||
|
# 는 내부 @a broadcast 라 부적합).
|
||||||
|
scoreboard players add @a mq_video_mod 0
|
||||||
|
execute as @a[scores={mq_video_mod=..0}] run tellraw @s ["",{"text":"영상재생 모드 미설치 — 모드 적용 후 다시 입장해주세요.","color":"red"}]
|
||||||
|
execute if entity @a[scores={mq_video_mod=..0}] run return run function mq:tellraw {"text":"필수 모드 미설치 플레이어가 있어 시작할 수 없습니다.","color":"red","msg":""}
|
||||||
|
|
||||||
|
setblock ~ ~ ~ minecraft:air
|
||||||
|
|
||||||
|
function mq:quiz/stop_sound
|
||||||
|
|
||||||
|
$scoreboard players set max_index main $(max_index)
|
||||||
|
scoreboard players set init main 1
|
||||||
|
|
||||||
|
dialog show @a mq:page1
|
||||||
49
temp/data/mq/function/load.mcfunction
Normal file
49
temp/data/mq/function/load.mcfunction
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
data modify storage mq:main answer set value {title:"", author:"", alias:[]}
|
||||||
|
data merge storage func:temp {}
|
||||||
|
data merge storage mq:tmp {}
|
||||||
|
|
||||||
|
function mq:init/config
|
||||||
|
function mq:init/songs
|
||||||
|
function mq:init/buttons
|
||||||
|
function mq:init/triggers
|
||||||
|
|
||||||
|
function mq:tellraw {"text":"서버 리로드 성공!","color":"white","msg":'""'}
|
||||||
|
|
||||||
|
scoreboard objectives remove func.temp
|
||||||
|
scoreboard objectives remove main
|
||||||
|
scoreboard objectives remove buttons
|
||||||
|
scoreboard objectives remove answer
|
||||||
|
scoreboard objectives remove leave_game
|
||||||
|
|
||||||
|
scoreboard objectives add func.temp dummy
|
||||||
|
scoreboard objectives add main dummy
|
||||||
|
scoreboard objectives add buttons dummy
|
||||||
|
scoreboard objectives add answer dummy
|
||||||
|
scoreboard objectives add leave_game custom:leave_game
|
||||||
|
|
||||||
|
# 외부 모드 존재 확인용 점수.
|
||||||
|
# mq_video_mod : 클라이언트 모드(mc_video_player_mod). 클라 join 시 서버로
|
||||||
|
# handshake payload 전송 → 서버 측 모드가 해당 플레이어 점수를 1 로 set.
|
||||||
|
# 클라에 모드가 없으면 0 유지. (login.mcfunction 에서 플레이어별 0 초기화.)
|
||||||
|
# same objective 안에 holder 두 종류 — `#server` 는 서버 컴포넌트 존재
|
||||||
|
# (서버 측 모드가 매 tick 1 로 갱신), `<player>` 는 클라 측 존재 (payload
|
||||||
|
# 수신 시 1 로 갱신).
|
||||||
|
#
|
||||||
|
# mq_chat_mod (mc_chat_answer_mod) 는 더 이상 게이트하지 않음 — 모드 없는
|
||||||
|
# 환경에서도 `/trigger input` dialog 경로로 정답 제출 가능. presence pulse
|
||||||
|
# 가 호스트 환경에 따라 안 들어오거나 사용자 모드 버전이 옛날일 때 false
|
||||||
|
# negative 로 시작이 막히던 문제 회피. (모드 측은 여전히 매 tick objective
|
||||||
|
# 존재시 1 로 set 시도하지만, objective 가 없으면 silent skip 하므로 무해.)
|
||||||
|
scoreboard objectives remove mq_chat_mod
|
||||||
|
scoreboard objectives remove mq_video_mod
|
||||||
|
scoreboard objectives add mq_video_mod dummy
|
||||||
|
# /reload 후 모드가 한 tick 도 돌기 전에 start 가 호출될 수 있으니
|
||||||
|
# #server 점수도 0 으로 materialize. 모드가 살아 있으면 다음 tick 에 1 로 갱신.
|
||||||
|
scoreboard players set #server mq_video_mod 0
|
||||||
|
|
||||||
|
scoreboard players set two func.temp 2
|
||||||
|
|
||||||
|
bossbar add mq:process [{"text":"진행도: ","color": "yellow","bold": true},{"text":"0","color": "yellow","bold": true},{"text":"/","color": "yellow","bold": true},{"text":"0","color": "yellow","bold": true}]
|
||||||
|
|
||||||
|
function mq:commands/stop with storage mq:main
|
||||||
|
function mq:players/login with storage mq:main spawn
|
||||||
@@ -26,6 +26,16 @@
|
|||||||
# 인접: 중심 0.375 / 0.5 / 0.625, 각 폭 0.125 → 합 [0.3125, 0.6875]).
|
# 인접: 중심 0.375 / 0.5 / 0.625, 각 폭 0.125 → 합 [0.3125, 0.6875]).
|
||||||
# interaction Y 는 hitbox 바닥 → 소환 y = block y + 0.375, height = 0.25.
|
# interaction Y 는 hitbox 바닥 → 소환 y = block y + 0.375, height = 0.25.
|
||||||
#
|
#
|
||||||
|
# ---- 깊이축: 블록 면 바로 바깥 (이중 트리거 방지) ----
|
||||||
|
# interaction 박스가 stone_button hitbox 와 겹치면 한 번 클릭에 interaction
|
||||||
|
# 도 발화하고 stone_button 도 vanilla 클릭으로 인식되어 powered=true 애니
|
||||||
|
# 메이션이 같이 일어남. → interaction 박스를 버튼 면 바깥쪽으로 한 두께
|
||||||
|
# (0.125) 만큼 빼 ray 가 stone_button 에 닿기 전에 interaction 에서 멈추게.
|
||||||
|
# south : 깊이 z 중심 = -0.0625 (interaction z ∈ [-0.125, 0], 버튼 z ∈ [0, 0.125])
|
||||||
|
# north : 깊이 z 중심 = 1.0625 (interaction z ∈ [1, 1.125], 버튼 z ∈ [0.875, 1])
|
||||||
|
# east : 깊이 x 중심 = -0.0625
|
||||||
|
# west : 깊이 x 중심 = 1.0625
|
||||||
|
#
|
||||||
# ---- positioned 의 .5 보정 회피 ----
|
# ---- positioned 의 .5 보정 회피 ----
|
||||||
# MC 의 vec3 인자는 정수만 쓰면 자동으로 +0.5 보정됨 (블록 중심으로 잡힘).
|
# MC 의 vec3 인자는 정수만 쓰면 자동으로 +0.5 보정됨 (블록 중심으로 잡힘).
|
||||||
# positioned 2773 86 5968 → 실제로는 (2773.5, 86, 5968.5). 거기서 ~ 오프셋
|
# positioned 2773 86 5968 → 실제로는 (2773.5, 86, 5968.5). 거기서 ~ 오프셋
|
||||||
@@ -55,29 +65,29 @@ $execute if score $(n) buttons matches -1 run setblock $(x) $(y) $(z) minecraft:
|
|||||||
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:interaction,tag=mq,tag=$(n)]
|
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:interaction,tag=mq,tag=$(n)]
|
||||||
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:text_display,tag=mq,tag=$(n)]
|
$execute if score $(n) buttons matches -1 run kill @e[type=minecraft:text_display,tag=mq,tag=$(n)]
|
||||||
|
|
||||||
# south: 깊이축=z(+0.0625), 가로축=x, 3 타일 + 라벨
|
# south: 깊이축=z(-0.0625, 블록 면 바깥), 가로축=x, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~-0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~-0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~-0.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.01 {Tags:["mq","$(n)"],Rotation:[0f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"south"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.01 {Tags:["mq","$(n)"],Rotation:[0f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
# north: 깊이축=z(+0.9375), 가로축=x, 3 타일 + 라벨
|
# north: 깊이축=z(+1.0625, 블록 면 바깥), 가로축=x, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~0.9375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.375 ~0.375 ~1.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~0.9375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.5 ~0.375 ~1.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~0.9375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.625 ~0.375 ~1.0625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.99 {Tags:["mq","$(n)"],Rotation:[180f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"north"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.5 ~-1 ~0.99 {Tags:["mq","$(n)"],Rotation:[180f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
# east: 깊이축=x(+0.0625), 가로축=z, 3 타일 + 라벨
|
# east: 깊이축=x(-0.0625, 블록 면 바깥), 가로축=z, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.0625 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~-0.0625 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.0625 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~-0.0625 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.0625 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~-0.0625 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.01 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[-90f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"east"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.01 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[-90f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
# west: 깊이축=x(+0.9375), 가로축=z, 3 타일 + 라벨
|
# west: 깊이축=x(+1.0625, 블록 면 바깥), 가로축=z, 3 타일 + 라벨
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.9375 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~1.0625 ~0.375 ~0.375 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.9375 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~1.0625 ~0.375 ~0.5 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~0.9375 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
$execute if score $(n) buttons matches -1 if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:interaction ~1.0625 ~0.375 ~0.625 {Tags:["mq","$(n)"],width:0.125f,height:0.25f,response:0b}
|
||||||
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.99 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[90f,0f],background:0,text:'{"text":"$(label)","color":"$(label_color)","font":"$(label_font)"}',transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
$execute if score $(n) buttons matches -1 unless data storage mq:tmp btn{label:""} if data storage mq:tmp btn{f:"west"} positioned $(x).0 $(y).0 $(z).0 run summon minecraft:text_display ~0.99 ~-1 ~0.5 {Tags:["mq","$(n)"],Rotation:[90f,0f],background:0,text:{text:"$(label)",color:"$(label_color)",font:"$(label_font)"},transformation:{scale:[$(label_scale)f,$(label_scale)f,$(label_scale)f],translation:[0f,0f,0f],left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f]}}
|
||||||
|
|
||||||
$execute if score $(n) buttons matches -1 run scoreboard players set $(n) buttons 0
|
$execute if score $(n) buttons matches -1 run scoreboard players set $(n) buttons 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user