gilbert189 @gilbert189
dummy $time $time_min $time_hour [* objectives *]
bossbar !progress^100

repeat (
	:time.ticks = /time query daytime [* stores into minecraft:time *]
	as @a (
		$time = :time.ticks * 0.06 [* ticks to Minecraft minutes *]
		$time_min = $time % 60
		$time_hour = ($time / 60) + 6 % 24
		if @s.Inventory[{Slot: -106b, id: "minecraft:clock"}] ( [* Only show digits when a clock is put offhand *]
			/title @s actionbar c"$($time_hour):$($time_min)"
			if $time_min < 10 /title @s actionbar c"$($time_hour):0$($time_min)"
		)
	)
)

function test (
	say "This is a function."
	say "The value is $(value)." [* Macro lines don't need to be prefixed with $ *]
	@s!progress = $(value)
)

function setMaximum (
	@s!progress^ = $(value)
)
Jan 5, 2024, 7:34 AM
1

comments

I only kinda understand this but have a like anyway.