Jump to content

Is it possible to add information or description to an item?


ILuvYouCompanionCube

Recommended Posts

I have downloaded a mod and the items and blocks of the mod come with descriptions. Instead of just the name of the item, you can also read a short description about it in a darker shade of gray.

 

I think that's very useful. I was wondering if that's a feature of that mod in specific or if it's something we can do easily, like having our item/block implement an interface, or something related to the LanguageRegistry or maybe some other registry. Thanks.

Link to comment
Share on other sites

That method has no implementation. Just a pair of curly braces. How should I override it, so it would show the information for the item?

 

edit1: I searched the forums for addIndormation. Apparently, it's just a matter of adding what you want to the List object. I'll try.

edit2: The only way to do the same for a block is to make a class that inherits from ItemBlock and then overriding addInformation? There must be a better way.

Link to comment
Share on other sites

Block should have one fake version of addInformation. And then Forge would find any overrides of it in our code, and create a class extending ItemBlock at runtime. Then it should "copy-paste" (or "cut-paste") our override of the fake method in Block to this automatically made ItemBlock subclass.

 

Well if you believe that would be somehow easy to create and make it run efficient etc.

then by all means, create the system and do a pull request :P

 

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Easy compared to the rest of the Forge framework, yes. So, by the standards of the autors of Forge this is probably quite easy. Easy for me? No way. By my standards making a minecart stop is a big challenge.  :-\

 

A such a simple thing as a BlockBreak event is among the most requested features!

Even so it's not yet been implemented, why? Because to the standards of the forge authors there hasn't been made any suggestions on how to do this which would be efficient and good.

 

Making such system is easy, but making it work as neatly as it needs to, may be harder ;)

 

 

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

Block should have one fake version of addInformation. And then Forge would find any overrides of it in our code, and create a class extending ItemBlock at runtime. Then it should "copy-paste" (or "cut-paste") our override of the fake method in Block to this automatically made ItemBlock subclass.

Why ?

You never see blocks in the inventory. They are all ItemBlock by default, which is already made automatically for all blocks that don't have a subclass of ItemBlock.

Link to comment
Share on other sites

A such a simple thing as a BlockBreak event is among the most requested features!

Even so it's not yet been implemented, why? Because to the standards of the forge authors there hasn't been made any suggestions on how to do this which would be efficient and good.

or because people who really needs it use forge essential core or mine, which both does that exact features, were probably both just too lazy to actually implements it in forge

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

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.

×
×
  • Create New...

Important Information

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