lily — 1/5/2024, 11:44:59 AM

reminding myself later about this post (look on phone)

↩ repost
gilbert189 — 1/5/2024, 7:34:21 AM
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)
)
♥ 6 ↩ 1 💬 1 comment
♥ 1 ↩ 0 💬 0 comments

comments

no comments