Minenash / CustomHUD

A highly customizable variable-based text HUD for Minecraft
MIT License
80 stars 23 forks source link

new math feature? #54

Closed kiven7e closed 1 day ago

kiven7e commented 2 years ago

it would be nice if you could have user set variables and math so you can make things like

{{[hour24*60+minute] > 1112 | [hour24*60+minute] < 360 , "go to bed"}}

here the math bit is separated by the square brackets [] this just converts the hour and minutes to just minutes and tells you when you can sleep and if you could set custom variables it can even be easier to read

==Section:Variables==
TimeToMin=hour24*60+minute]
==Section:TopLeft== 
{{TimeToMin > 1112 | TimeToMin < 360 , "go to bed"}}
Minenash commented 2 years ago

A feature like this was/is planned, I just hadn't gotten around to it yet

JayGuerette commented 1 year ago

Alternatively, display the time and have it change colors approaching and after bed time: {{time > 12000, "&{99FFFF00}"}}{{time > 12540,"&{FFFF0000}"}}{hour12}:{minute} {am_pm -sc}

Minenash commented 1 year ago

Yeah, in v3.1 {time} was added, which can do what OP wants in this case But definitely still a feature I want to add at some point

Minenash commented 10 months ago

Coming in the next update. (If anyone wants it before the release is ready, there's some betas in my discord with it, finding bugs before release is always appreciated)

Minenash commented 1 day ago

Since the v4 betas are now on Modrinth and Curseforge, I can officially close this!