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

Eya!

I'm trying to do a overlay gui with images (only images, no strings), to do a health bar, like a typical MMORPG overlay gui, but I'm not finding any references on vanilla to do it, so, i would like to know what class to extend, or any vanilla code to check

  • Author

Mhh, I don't know how it really works, i'm trying with OverlayRegistry, ForgeIngameGui and Gui, but don't get it.

 

All I have is that:

https://ibb.co/VxhzPwy to create my overlay

https://ibb.co/P1FMVf9 and that's my GUI class with my gui delimited

 

I've tried to do something like this like ForgeIngameGui: https://ibb.co/HrpCWt8 but I can't create a new protected void render

  • Author
17 minutes ago, diesieben07 said:
  • Do not store the Minecraft instance in a field. Minecraft is already a singleton.

Done, tnxs

 

17 minutes ago, diesieben07 said:
  • You need to learn the basics of Java, specifically the difference between static and non-static members.

Ya, i know that it needs to be static, but i cant call "blit" method if it's static 

If it helps, I did something similar recently.

This is the overlay class, implementing IIngameOverlay:

https://github.com/Syrikal/alchemine/blob/main/src/main/java/syric/alchemine/client/VitaSlimeOverlay.java

Here's my overlay registry class, which triggers at the same time I register blocks and items and whatnot:

https://github.com/Syrikal/alchemine/blob/aae585ab7d23fd4be688a60642f200ab09a4fe38/src/main/java/syric/alchemine/setup/AlchemineOverlays.java

And here's where I turn the overlays on and off (it's triggered by RenderFogEvent because it happens concurrently with some fog stuff, but this is a little hacky.)

https://github.com/Syrikal/alchemine/blob/47d9d08a092d3e26441bace8fb5014db0c78c332/src/main/java/syric/alchemine/client/FogEffects.java

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.