Minecraft Java How to make a Minigame Clock
>> YOUR LINK HERE: ___ http://youtube.com/watch?v=JIUcjPN5jzU
(Datapack version for 1.21 and beyond coming soon!) • -All commands available in description- • This is a small, but tough, command system that you can use to make an in-game clock for your minigames and adventure maps. This is my first time creating a tutorial and I'd like to do more, so let me know what I can improve! • A. SETUP COMMANDS • A1. /scoreboard objectives add TimerScore dummy • A2. /scoreboard objectives add TimerMinutes dummy • A3. /scoreboard objectives add TimerSeconds dummy • A4. /bossbar add 1 { text : 0:0 } • A5. /bossbar set minecraft:1 players @a **This has a small error in the video. Correct version here** • A6. /bossbar set minecraft:1 max 300 • B. RESET FUNCTION • B0. /setblock ~1 ~ ~ air (Activator) • B1. /scoreboard players set #TimerEntity TimerScore 300 • B2. /scoreboard players set #TimerEntity TimerMinutes 5 • B3. /scoreboard players set #TimerEntity TimerSeconds 0 • B4. /bossbar set minecraft:1 name [ ,{ score :{ name : #TimerEntity , objective : TimerMinutes }},{ text : : },{ score :{ name : #TimerEntity , objective : TimerSeconds }}] • B5. /execute store result bossbar minecraft:1 value run scoreboard players remove #TimerEntity TimerScore 0 • C. TICK FUNCTION • C0. 4-4-2 Repeater Clock or Similar (Activator) • C1. /execute store result bossbar minecraft:1 value run scoreboard players remove #TimerEntity TimerScore 1 • C2. /scoreboard players remove #TimerEntity TimerSeconds 1 • C3. /execute if score #TimerEntity TimerSeconds matches ..-1 run scoreboard players remove #TimerEntity TimerMinutes 1 • C4. /execute if score #TimerEntity TimerSeconds matches ..-1 run scoreboard players set #TimerEntity TimerSeconds 59 • C5. /bossbar set minecraft:1 name [ ,{ score :{ name : #TimerEntity , objective : TimerMinutes }},{ text : : },{ score :{ name : #TimerEntity , objective : TimerSeconds }}] • C6. /execute if score #TimerEntity TimerScore matches ..-1 run setblock X Y Z minecraft:redstone_block **You need to replace [X Y Z] with the coordinates of your 'repeater choke' so it stops the clock successfully.** • Still struggling? Check out the demo world: https://drive.google.com/file/d/1D4P0... • Please do not repost this video, however feel free to share as much as you like! • Music: https://www.purple-planet.com • CHAPTERS • 0:00 Example Showoff • 1:20 Scoreboard Setup • 2:56 Reset Function • 5:10 Tick Down Function • 6:55 Outro
#############################
