Custom health bar with rainbow hearts and different ways of customization!
I have searched for a way to have each of the hearts above the hotbar a different color and didn't find any mod with that functionality. After a deeper search for custom health bar bods, I have come across "Simple Health Bar (Forge/Fabric)" by Lanfix8, which was the perfect starting point for what I had in mind. Just needed some tweaking to achieve what I had in mind.
You can find the mod that this is based on here: https://modrinth.com/mod/simple-health-bar
With consent by the creator of the original mod, I have modified the mod's code, which now adds rainbow hearts and more.
Rainbow health bar mode: Rainbow hearts with/without a speed-adjustable animation
Custom color mode: Set a default color for all of the hearts
Unchanged mode: There is no color applied to the hearts. It will just show the default texture for the hearts (which you could change via your own resource pack, more on that below)
Health Indicator Text: Text, which shows your current HP with custom color, positioning and alignment (left/right) options
Textures for Absorption hearts, poison hearts, wither hearts and frozen hearts
All of those settings can be adjusted in the mod's config file (in .minecraft > config > rainbow-health-bar.properties).
Here's a video, showing what the rainbow animation looks like: <iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/nzGW1NYw1Uo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
Information for people who want to modify the heart textures:
You can do that by changing the mod's file extension from .jar to .zip, which lets you be able to see the file structure you'll need for your texture pack (assets > rainbow-health-bar > textures > gui > healthbars). Then you just need your usual pack.mcdata file and your textures in the healthbars folder, named like the .png files in the mod.
Note: The rainbow coloration won't cover the hearts correctly if you change the hearts shape in your texture pack
Conversation