How To Add Custom Hearts/Heart Overlay

Started by VQuip on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How To Add Custom Hearts/Heart Overlay

I am making a mod with different types of toxins/poisons and I want to add custom heart textures/overlay to the player when the effect is applied but I do not know how to.

Thanks in Advance

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try putting hearts images in…
Sun, 08/07/2022 - 19:52

Try putting hearts images in an overlay in a way that will cover the Minecraft hearts.

Make each half heart appear and disappear based on the amount of hp you have.

Give it a condition if you have the effect you want, then it returns true and shows it to the players covering the hearts.

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Overlays dont seem to…
Tue, 08/09/2022 - 12:45

Overlays dont seem to respect the clients guy scale, they dont keep their relative position. I dont have any Idea to work around this

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Unless they make a new mod…
Fri, 08/12/2022 - 00:19

Unless they make a new mod element for new types of damage/hearts, I don't think its possible to create a new heart texture without using code. You would have to change the Minecraft health elements.

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's offsetted because there…
Fri, 08/12/2022 - 10:41

It's offsetted because there is a bug in Mcreator. Apparently, this only works if your GUI scale is the default zoomed in scale.

Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've tried the overlay thing…
Thu, 01/26/2023 - 22:18

I've tried the overlay thing but it seems that the heart bar is displayed with the highest priority always, even if the overlay is set to highest, idk if that's a bug

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Overlays don't change…
Mon, 08/12/2024 - 16:08

Overlays don't change relative position; I'm pretty sure the healthbar is dealt with separately, I haven't been able to override it, and any other attempts to modify it don't work with relative positioning, the scale of the GUI changes based on resolution. There may be a method though, I've seen it done with other mods. (Mostly fabric though. I'll look into it.)