Jump to content

Recommended Posts

Posted

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)

Posted

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

  • 1 month later...
Posted

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)

 

Thanks

 

nerd-boy

  • 2 weeks later...
Posted

I would love a hook like this myself. I'm currently using some creative reflection and such to render icons above the normal tooltip for some items, but would like a more generic way to do it.

47MdL.png

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

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.