Started by
TKG112
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make a mod that hides the hunger bar, I found this post: https://mcreator.net/forum/94756/how-hide-hunger-bar-or-any-other-bar-health-ect-very-simple-1165. That worked, but, only if playing in singleplayer, when I tried to add the mod to my server, it throws this error: https://pastebin.com/h6CEsdu8. What can I do to prevent this? And yes, I'm in 2022.2
Edited by TKG112 on Tue, 02/13/2024 - 02:34
Couldn't follow the link, but I'm not even sure you need a mod for that. You can use a resource pack that makes the status bars invisible just by erasing and overriding their texture. (You could also do this in a mod- you would add a 'minecraft' folder in your workspace's src/main/resources/assets file, and from there just copy the resource pack file system.) As long as your mod resources are loaded above the vanilla resources, (which they are by default), it would replace the status bar textures with invisible textures. (You can probably find the texture here.)
This is the code:
And the error is basicly this:
It's likely the code is outdated. I don't think it's a good idea to hide the hunger bar by altering the render code. It really should be as easy as just removing the textures. (Making a resource pack, in which the 'icons' texture has the hunger bar removed.)
Yeah, it functions normally in singleplayer as I said, but when added to a server, it gives that error, I just wandered why, but thanks for the response, and to clarify, I'm using the 1.16.5 version of MCreator.