In your Item class, override addInformation and add whatever text you want to the List given in the method parameters.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean isHeld) {
list.add("Whatever you want");
}
Best to use translation strings with StatCollector.translateToLocal and a language file, though, as opposed to a literal String, so that people can add translations for your mod.
The Meaning of Life, the Universe, and Everything.
Location:
The Island of Koridai
Join Date:
8/7/2013
Posts:
78
Location:
Look behind you...
Minecraft:
RandomMcSomethin
Member Details
Oh, one more question: is there some special formatting that needs to be used in the string, or can you just type a string that you want to use as the lore?
Usually modders will use a language file, though, and StatCollector to translate strings like 'tooltip.yourmod.youritem', which would be the string you add to the lore, into actual understandable text.
The advantage of this is it lets other people add translations for your mod.
So your code would look like this:
I'm fairly new to modding, and I would like to add some lore text to my custom items. How would I do that?
Insert generic overused signature here
Best to use translation strings with StatCollector.translateToLocal and a language file, though, as opposed to a literal String, so that people can add translations for your mod.
Thanks!
Insert generic overused signature here
Oh, one more question: is there some special formatting that needs to be used in the string, or can you just type a string that you want to use as the lore?
Insert generic overused signature here
It's just a string. You can use EnumChatFormatting to change the font text/style.
The advantage of this is it lets other people add translations for your mod.
So your code would look like this: