Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.