#Health Bar Disappearing On Command 1.21.3 (For Battery)

60 messages ยท Page 1 of 1 (latest)

river verge
#

Hiya! I'm recreating Grian's "Wild Life" series, but i don't have any modding experience. (If you haven't seen Wild Life, I am essentially activating this in the middle of an smp without anyone knowing what's going to happen, so i can't do it using a server resource pack [It doesn't have to be server side or anything, i'll just give them a renamed version of the file lol])
1.21.3

what i wrote down verbatim was "You no longer have a health or hunger bar, but you have a battery life. You can charge this battery through the methods listed below, or get short bursts of energy using golden foods. Battery will naturally tick down 1% every 2 minutes, but every point of damage is equivalent to 1% battery lost. Different power sources include redstone, eating coal, standing in flowing water)"

I can make the battery mechanic itself with a datapack and the action bar, but i just need everyone's health and hunger bars to visibly disappear through a command or function, i don't need them to stop working. I tried to use a server resource pack but i couldn't make them disappear or reload on command.

covert flare
#

You will have to use a mixin to the class in charge of rendering the player's GUI and then, using a packet, make it stop rendering what you are looking for.

real elbow
#

So you want a mod that permanently disables the rendering of health and hunger?

river verge
#

able to be toggled on and off but yes

#

both are replaced with the battery datapack that ive made

real elbow
#

Command per player?

#

Or as a whole

river verge
#

either work, as i can put both into the datapack but preferably as a whole

real elbow
#

Hmm. I'll take a look tomorrow. Should be too hard. Any other mods doing anything with the hud I need to worry about conflicts with?

river verge
#

nothing to my knowledge

real elbow
#

Preferred licence?

river verge
#

what do you mean by that

real elbow
#

Is there a licence you would prefer to receive my work under, or should I just use my default licence? (MIT)

#

I wouldn't guarantee what you ask for lol, but figured I'd ask, depending on what you needed

river verge
#

what does the license affect

#

i dont think it matters for me but i could be wrong

real elbow
#

How you can distribute/share/publish it, and how you are required to credit me ๐Ÿ™‚

#

MIT is pretty lax

#

If you don't know, it should work

river verge
#

that seems perfectly fine

#

how would you like to be credited

real elbow
#

MIT ๐Ÿ™‚

#

You just need to leave the licence file in the jar I give you ๐Ÿ™‚

river verge
#

oh

#

perfect

#

if it makes it into a video would you like to be credited there too?

real elbow
#

Of course, you're free to do more if you wish, but I don't care either way as long as my name goes with the actual software ๐Ÿ™‚

river verge
#

okay that sounds good

real elbow
#

Oh

#

Small last thing

#

Fapi dependency okay? I can do without, but it will probably be more robust with

river verge
#

yeah thats fine

real elbow
#

Perfect. It's midnight here, so I should be able to get it to you tomorrow

river verge
#

sounds good

real elbow
river verge
#

i don't but i can make one

real elbow
#

if the source isn't important to you, you don't need to, but probably best so you can see the code yourself

river verge
#

i'll just do it just in case

real elbow
river verge
#

Yes

real elbow
#

feel free to tell me if I messed something up ๐Ÿ™‚

river verge
#

alrighty i'll check in just a minute

#

thanks so much!

river verge
#

it works great but the bars are hidden by default instead of being shown by default

#

but tbh thats fine

#

yeah nvm its fine as long as i turn the bars on before everyone joins lol mb

real elbow
#

it's a config option

#

and it saves

#

so as long as you turn them on once it will stay on until you turn them off

#

and it syncs the server value to the clients

#

if you need a build thats on by default, i can do that though

#

just lmk

#

I suppose I should clearify though

#

the value the command sets it persistent across reloads

#

and synced to every client on join