Started by
superdiamondsky665
on
Topic category: Help with Minecraft modding (Java Edition)
hello
i would like to make something like a "sanity bar" displayed above hearts that decreases when you enter dark zones or hit by certain mobs. and when your sanity is too low you start hearing weird noises and see things that doesn't exist
i think it's possible using overlays, but i don't know how.
can someone help please ?
thank you
I don't think the bar is possible, maybe you can make it an invisible stat like saturation
the bar is possible but its very hard to make the easiest way is to do it with variable and then make an overlay that display that variable using text then make a procedure that checks the value of the sanity of the player then make it plays your noises and for things that doesnt exist you can make mobs that spawn near the player then after like 2 seconds they despawn
bump
It's definitely possible for you to make the bar, along with the whole illusions thing, but it is a bit complex. You would need to make multiple different variants of the bar, each with a different amount filled, along with the procedures to detect when you enter a dark zone, then choose how many ticks it would need for the bar to decrease by one.
The illusions are something i don't exactly know how to do, although I can say its possible. Mrlofe2003x brought a good idea for the illusions, but I think that there could be more to it. Maybe with some manipulations, you could end up making a mob that pathfinds its way to you, but doesn't attack you, and you couldn't attack it. I think that could be a way of doing things.