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

Which event do I need to handle rendering with Tooltips? Its for something a little similar to Thaumcraft's Aspect display above the tooltip.

ItemTooltipEvent? Gives you (last) chance to modify rendering.

1.7.10 is no longer supported by forge, you are on your own.

  • Author

ItemTooltipEvent? Gives you (last) chance to modify rendering.

 

That allows me to add to a tooltip (I am using that event) but it does not allow me to render additional information - such as what Thaumcraft does with its aspects.

  • Author

I found a workaround, in the event that I cannot find a proper method: I used

GuiScreenEvent#DrawScreenEvent

and recreated

GuiUtils#drawHoveringText

, removing all the rendering code (this gets me the X and Y of the tooltip, as well as its size). Its a bit messy, but it works for my purposes.

Okay, I forgot - it's not designed to help (event).

 

You can: (in event)

ScaledResolution scaledresolution = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);

int x = Mouse.getEventX() / scaledresolution.getScaleFactor();
int y = (mc.displayHeight - Mouse.getEventY()) / scaledresolution.getScaleFactor();

 

Then using that you can render (image i guess, or really anything) using one of Gui.class methods (or other ones).

 

Big note: image will try to render in zLevel = 0, which is not desired since it will just not work (in that event).

At least, that is what I remember from some past problems (maybe changed).

 

In that case you can use: GL11.glTranslate(0.0F, 0.0F, zLevel);

1.7.10 is no longer supported by forge, you are on your own.

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.