Posted January 27, 201510 yr 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
January 27, 201510 yr 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/
January 27, 201510 yr 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
January 27, 201510 yr 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
January 27, 201510 yr 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.