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

I was thinking about setting up a Forge event at the end of GuiInGame.renderGameOverlay

This would allow mods to add HUD elements that would behave like the built in one (darken, hide, appear behind everything else, etc.)

 

 

Due to how fast and often this fires, would it have a negative effect on the event bus?

  • 1 month later...

If you know how to use tick handlers you can add stuff to the HUD. It's really easy to do with tick handlers, just need to know how.

  • Author

I have my HUD in the tick handler now, but I need to stop drawing it when other interfaces are open due to my HUD elements appearing top level (setting the z level has no effect)

 

What I had in mind was more visually pleasing but not worth performance loss, thus my question about it having a negative effect on the event bus.

If you don't want it to draw when there's another gui open, run a check for

FMLClientHandler.instance().getClient().inGameHasFocus

If it returns false, don't render. :D

  • Author

Currently not drawing with gui's open,  but would prefer to have it working like the default one. (Always drawn, darkened when gui's are open, covered up by other gui's elements instead of being on top)

 

The only two ways I can think to do that are:

1 - forge hook after the ingame gui is drawn, before any guiscreen gets drawn

2 - tell minecraft to use an EntityRenderer I create instead of the original (not something I'd do for just a hud though)

this is the same request I had here http://www.minecraftforge.net/forum/index.php/topic,2009.msg15922.html#msg15922

 

If I ever feel like getting to know the internals of an API so I can submit a pull request for a sensible addition I'll go for it.  I'm just a modder though.

 

Anyway, glad to see that someone else has the same request :)  But currently there is no way to do it without some sever kludges, as detailed in my post. 

 

 

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.