421: Stopwatch. [Minecraft Map Making]

Subscribers:
3,860
Published on ● Video Link: https://www.youtube.com/watch?v=yNXUoiIOpMg



Duration: 0:00
210 views
15


Membership:
Ep421: Turning the carrot on a stick into a stopwatch.

00:00 Intro
01:25 Setup
04:04 Controller
17:05 Command Assembler Website
18:35 Testing the Command Egg

Version: 1.21

Commands by: GalSergey

Command block assembler: http://far.ddns.me/cba/

Commands, builds, hacks and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:

Join the CoppitCraft server that I play on and the Discord where I hang out.
Server IP: 51.81.246.145:25588
Discord: https://discord.gg/amU84KykEu

The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.

Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" and "less than" with the appropriate angled bracket.

Commands used:

Setup:
scoreboard objectives add used.coas used:carrot_on_a_stick
scoreboard objectives add ticks dummy
scoreboard objectives add seconds dummy
scoreboard objectives add minutes dummy
scoreboard objectives add const dummy
scoreboard players set 20 const 20
scoreboard players set 60 const 60
scoreboard players set 1200 const 1200

Controller:
execute as @a[scores={used.coas=1}] store result score @s seconds store result score @s minutes run scoreboard players add @s ticks 1
execute as @a[scores={used.coas=1}] run scoreboard players operation @s seconds /= 20 const
execute as @a[scores={used.coas=1}] run scoreboard players operation @s seconds %= 60 const
execute as @a[scores={used.coas=1}] run scoreboard players operation @s minutes /= 1200 const
execute as @a[scores={used.coas=1}] run scoreboard players operation @s minutes %= 60 const
title @a[scores={used.coas=1}] actionbar {"translate":"Stopwatch: %s:%s","with":[{"score":{"name":"*","objective":"minutes"}},{"score":{"name":"*","objective":"seconds"}}]}
tellraw @a[scores={used.coas=2}] {"translate":"Your time: %s:%s","with":[{"score":{"name":"*","objective":"minutes"}},{"score":{"name":"*","objective":"seconds"}}]}
scoreboard players reset @a[scores={used.coas=2..}] ticks
scoreboard players reset @a[scores={used.coas=2..}] used.coas