Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Ok Im making a gui that displays info but I need this info to update all the time just like thermal expansions power display does

The gui screen class should have both an updateScreen() and a drawScreen() method that are called every tick.  So if the information you want to display is in public fields on the client side then you can just check them and do what you want in response.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

  • Author

Ok and I seem to have a problem where I can display 1 gui background texture and thats all but I need to be able to draw a rectangle that represents pwoer

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 :)

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);
        }

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.