Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Item tooltip rendering hook


Recommended Posts

I'm making a mod that includes chemistry (among other things), and I have a test tube item. I'm using addInformation to add the amount and some other info, but Minecraft's built in font renderer doesn't support subscripts, which I want to use to draw the chemical formula. I don't want to modify GuiContainer, so a hook for item tooltip rendering would be really useful. This could be implemented by adding an interface "IItemTooltipRenderer", then doing a check in GuiContainer.drawScreen to see if the item is an instance of IItemTooltipRenderer and calling the item's rendering logic instead of the standard logic.


EDIT: Apparently Unicode subscript characters work, but this would still be useful to render icons representing element properties (radiation, acid, flammable, etc)

Link to comment
Share on other sites

Make a good hook in the style of other Forge hooks.

Then make it even more generic, the more generic the better.

Make sure it cannot be done with reflection.

Make sure it is well documented.


If all those are covered, then submit a pull request on GitHub for your hook.  :)

Link to comment
Share on other sites

  • 1 month later...

Is there any update on this? ellipsis, did you give it a try. This could also be quite useful for my own mod.


I have actually even given coding it a try (with success). Hopefully it is general enough, although might need a bit more documentation. How do I go about a pull request? And is will you be releasing any more Forge versions for the moment or just wait for a 1.3 release (which I know will be a while)





Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...

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.

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.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.