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

Started by RealACKtbt on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Dec 2020
Points:
632

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
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. 

Active 19 hours ago
Joined Jan 2021
Points:
754

User statistics:

  • Modifications: 2
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 198
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.

Active 2 years ago
Joined Jan 2023
Points:
368

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
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 !

Active 2 years ago
Joined Jan 2023
Points:
368

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
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

 

Active 11 months ago
Joined Jul 2024
Points:
102

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Is there a way I can add my…
Fri, 12/06/2024 - 19:03

Is there a way I can add my custom UI to the healthbar system?