Jump to content

How to update gui screen


GodOfYeti

Recommended Posts

in the Draw method type this.drawTexturedModalRect() and fill in the parameters, dont forget to bind the texture before calling the method.

 

The logic I think you might be looking for is that that you increase the length or height of the displaying texture according to the amount of energy stored.

I require Java, both the coffee and the code :)

Link to comment
Share on other sites

you need to create the slot in your GUI.png then add another drawTexturedModalRect(params of the slot) and replace isBurning with your custom method example: isConsumingFuel(). you'll need to create new methods for your power consumption.

example snipplet (this is not the full method, just what you need to modify):

 

if (this.magFurnace.isBurning())
        {
            int i = this.magFurnace.getBurnTimeRemainingScaled(13);
            this.drawTexturedModalRect(k + 104, l + 33 + 12 - i, 176, 0, 14, i + 1);
            i = this.magFurnace.getCookProgressScaled(14);
            this.drawTexturedModalRect(k + 67, l + 33 + 12 - i, 176, 14, 14, i + 1);
        }

Link to comment
Share on other sites

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.