마인크래프트/명령어 응용

minecraft 타이머

dasd1568 2020. 12. 27. 19:19
반응형

제한 시간 타이머가 작동하는 모습

총 4가지의 회로를 요구합니다.

 

1. 기본 scoreboard 설정 (왼쪽)

 : scoreboard objectives add Timer dummy

 : scoreboard objectives add Sec dummy

 : scoreboard objectives add Min dummy

- Hor, Day 등을 추가하여 더 긴 시간을 설정할 수 있습니다.

 

2. CountDown 초기 지점 설정 (중간)

 본 회로는 분, 초의 타이머이고, 5분 30초의 타이머를 만들 때

 : scoreboard players set <대상> Min 5

 : scoreboard players set <대상> Sec 30

 : setblock <특정 위치> minecraft:redstone_block

 

특정 위치에 설치된 레드스톤 블록에 의해 타이머가 작동하게 됩니다.

 

3. 타이머 (오른쪽 아래)

 3-1. 카운트 다운

 : (repeat) scoreboard players add <대상> Timer 1

 : execute at <대상>[scores={Timer=20..}] run scoreboard players remove <대상> Sec 1

 : execute at <대상>[scores={Timer=20..}] run scoreboard players reset <대상> Timer

 : execute at <대상>[scores={Min=0,Sec=-1}] run setblock <특정 위치> air

 : execute at <대상>[scores={Min=0,Sec=-1}] run setblock <특정 위치 2> minecraft:redstone_block

 : execute at <대상>[scores={Sec=-1}] run scoreboard players set <대상> Sec 59

 : (Conditional) scoreboard players remove <대상> Min 1

 

 3-2. 시간 표기

 : title <대상> actionbar ["".{"text":"제한 시간 : "},{"score":{"name":"<대상>","objective":"Min"}},{"text":"분 "},{"score":{"name":"<대상>","objective":"Sec"}},{"text":"초"}]

 

각 문단에 "bold":"true/false" 또는 "color":"~~"를 추가할 수 있습니다.

 

4. 타이머 종료 (오른쪽 위)

 : title <대상> actionbar [{"text":"종료"}]

 : setblock <특정 위치 2> air

반응형
  • 현재글minecraft 타이머