How can i make a UI that shows the enemies health above its head?

Started by RealACKtbt on

Topic category: Help with modding (Java Edition)

Last seen on 04:45, 22. Jan 2023
Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can i make a UI that shows the enemies health above its head?

Hello. I am trying to make an all around mod to improve minecraft, and one thing i am not very skilled at is making procedures. I guess I am asking for someones guidance on how i can make something relatively similar to a health bar that appears on top of the enemy that shows the health, name, etc. I would appreciate anyone who takes their time to help. 

Last seen on 19:36, 28. Mar 2024
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dont think it is possible…
Mon, 01/09/2023 - 22:18

Dont think it is possible without coding, and even that would be very difficult. Sadly there is no easy way to do this.

Last seen on 10:27, 25. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can actually do…
Sun, 01/22/2023 - 12:28

You can actually do something like this and work with that, note that has too much number after coma, so you have to create some variables in order to let it a bit more clean. This event is trigger by when you attack so naturaly the enemies wont have this showing up above their heads. Good lucky !

Last seen on 10:27, 25. Jan 2023
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just done the code above…
Sun, 01/22/2023 - 12:51

I just done the code above so I thought I'd give it a go, here it is for you, working fine !! You wont need any variable