The Meaning of Life, the Universe, and Everything.
Join Date:
4/23/2017
Posts:
60
Member Details
I am trying to add Information, or lore, to items. I tried to use the same string from 1.8, but whenever I check the item, there is no description. How do I add information now?
Here is the old code.
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean show){
list.add("MESSAGE");
}
I am trying to add Information, or lore, to items. I tried to use the same string from 1.8, but whenever I check the item, there is no description. How do I add information now?
Here is the old code.
Are you Overriding that method?
It looks like addInformation has changed too.
As seen in net.mincraft.item#Item.Class
It errors when I override it.
Where do I put the information in that one? When I tried, I got an error.
@SideOnly(Side.CLIENT)@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) { list.add("It Looks Very Delicious"); }
I tinkered around with addInformation and, this is what I got to work:
I got this idea from looking at the Item#ItemEnchantedBook.class
Thank you! That works. Turns out I already had that, but imported the wrong List... It works now!
That's great! Glad I could help
Dont forget to amend this post as [Solved], or [Resolved].