Jump to content

[1.7] How does vanilla minecraft render and use the health/armor/hunger bars.


Recommended Posts

Posted

I know how to code a solid bar GUI to represent a value, but how do i use multiple textures like the vanilla health and armor bars? Is it just a lot of this?

 

if (value > number && value1 < number {
               render one image
         else if (value > number && value1 < number {
               render one image next to other image 

Posted

Pretty much yeah, I remember having fun with editing it without events pre-1.6 (I actually overriden whole GuiIngame that time) and rendering was a loop of drawTexturedModalRect methods that were set by player's health and food etc.

1.7.10 is no longer supported by forge, you are on your own.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.