Files
mc_datapack/music_quiz/data/mq/function/repeat/buttons/btn.mcfunction
Claude (owner) b1babad05a music_quiz: 26.1.2 호환 + 정리 + README
- pack_format 69 → 75 (MC 26.1.2)
- 사문화된 # say / # stopsound 디버그 주석 7곳 제거
- btn.mcfunction: 매 틱 모든 버튼마다 평가되던 디버그 매크로 라인 제거
- 데이터팩 분석·사용법·좌표 의존성을 README.md 에 정리

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 15:22:55 +09:00

29 lines
2.0 KiB
MCFunction

$execute if score $(n) buttons matches ..-2 run setblock $(x) $(y) $(z) minecraft:air
$execute if score $(n) buttons matches ..-2 run data modify entity @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] response set value 0b
$execute if score $(n) buttons matches ..-2 run return 0
$execute unless score $(n) buttons matches -1.. run scoreboard players set $(n) buttons -1
$execute if score $(n) buttons matches -1 run setblock $(x) $(y) $(z) minecraft:stone_button[face=wall,facing=$(f),powered=false]
$execute if score $(n) buttons matches -1 positioned $(x) $(y) $(z) run setblock ~ ~-3 ~ minecraft:redstone_block
$execute if score $(n) buttons matches -1 positioned $(x) $(y) $(z) run setblock ~ ~-3 ~ minecraft:red_wool
$execute if score $(n) buttons matches -1 run scoreboard players set $(n) buttons 0
$execute if block $(x) $(y) $(z) minecraft:stone_button[face=wall,facing=$(f),powered=true] \
if score $(n) buttons matches 0 \
run scoreboard players set $(n) buttons 1
$execute if score $(n) buttons matches 1 unless entity @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] positioned $(x) $(y) $(z) run $(c)
$execute if score $(n) buttons matches 1 \
run scoreboard players set $(n) buttons 2
$execute if block $(x) $(y) $(z) minecraft:stone_button[face=wall,facing=$(f),powered=false] \
if score $(n) buttons matches 1.. \
run scoreboard players set $(n) buttons 0
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) run playsound minecraft:block.stone_button.click_on block @s ~ ~ ~ 1 1
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) if score init main matches 0 run $(c)
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n),limit=1] on target as @s positioned $(x) $(y) $(z) unless score init main matches 0 run trigger $(n)
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n)] at @s run data remove entity @s attack
$execute as @e[type=minecraft:interaction,tag=mq,tag=$(n)] at @s run data remove entity @s interaction