- 무대 한정 코드 제거: repeat/map/ (트리/조명), images/image_custom (파이브가이즈),
load.mcfunction의 map 스코어보드·fill·counter 초기화
- 매 틱 디스패치를 init 상태로 게이팅:
· timer는 init>=2, check_answer는 init in {5,6}에서만 호출
· idle(init=0) 틱의 함수 호출 8개 → 4개
- 곡 50개를 매크로 체인(250+ 명령/회) → 스토리지 리스트 O(1) 룩업으로 전환
mq:init/songs가 mq:main.songs를 적재, setanswer는 index-1로 인덱스 룩업
- 버튼/트리거 정의를 mq:init/buttons / mq:init/triggers로 분리해
mq:main.button_defs · trigger_defs 스토리지 리스트로 관리
- repeat/triggers/trigger.mcfunction: 투표 후처리 산술 블록 중 변하지 않는
max_player·rest_player 재계산 제거, $(n)_player 갱신만 1라인
- 작가용 메모 수정.txt 제거
- README.md: 변경 사항·새 구조·스토리지 스키마 반영
566 lines -, 154 lines +.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
64 lines
1.6 KiB
MCFunction
64 lines
1.6 KiB
MCFunction
function mq:tellraw {"text":"서버 리로드 성공!","color":"white","msg":'""'}
|
|
|
|
data merge storage mq:main { \
|
|
title: "음악퀴즈이름", \
|
|
max_index: 50, \
|
|
answer: { author: "", title: "", alias: [] }, \
|
|
command_block: { \
|
|
name: "", \
|
|
image: "", \
|
|
alias: [], \
|
|
index: 1, \
|
|
volume: 30, \
|
|
x: 144, \
|
|
y: 59, \
|
|
z: -219, \
|
|
r: "SOUTH", \
|
|
x1: 131, \
|
|
y1: 77, \
|
|
z1: -262, \
|
|
x2: 157, \
|
|
y2: 91, \
|
|
z2: -262 \
|
|
}, \
|
|
spawn: { \
|
|
x: 144, \
|
|
y: 61, \
|
|
z: -219, \
|
|
r: 180, \
|
|
f: 0 \
|
|
} \
|
|
}
|
|
data merge storage func:temp {}
|
|
data merge storage mq:tmp {}
|
|
|
|
function mq:init/songs
|
|
function mq:init/buttons
|
|
function mq:init/triggers
|
|
|
|
scoreboard objectives remove func.temp
|
|
scoreboard objectives remove status
|
|
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 status dummy
|
|
scoreboard objectives add main dummy
|
|
scoreboard objectives add buttons dummy
|
|
scoreboard objectives add answer dummy
|
|
scoreboard objectives add leave_game custom:leave_game
|
|
|
|
scoreboard players set timer status 0
|
|
scoreboard players set skript status 0
|
|
scoreboard players set yp status 0
|
|
scoreboard players set ts status 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
|