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

Here is my code: http://pastebin.com/yegwWq2C

 

As for what it is supposed to be doing, it's job is to take variables from my main logic file and display a red square at the given point. I have be using chat statements to test and confirm that my math is correct and that the GUI file was handling them properly. Everything is set up correctly and always points to a valid location on screen. It even works if I replace everything with constants, what am I doing wrong?

You are missing a semicolon at line 5 in your pastebin, but I do not think this is your problem. Yesterday I had the same problem. I tried to render my own progress bar with raw opengl, but it did not affect the gui at all. Then I tried to use drawRect instead of opengl, but still it did not work. Funnily drawTexturedModalRect worked.

 

BTW: I am extending GuiContainer and not GuiScreen, but it should be the same problem.

 

One tip: Have you tried to debug minecraft with your IDE? Watch the variables, which are given to drawRect.

try {

...

}catch(Throwable t) {

    MagicAppErrorSolver.solveProblem(t, this);

}

//Programmers will lose work

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.