Posted June 22, 201411 yr hi i was wondering if anyone here knew how to make an item show a description in grey text when hovered over in inventory or when shifted while hovering over the item if anyone could help i would be Grateful (Sorry if my english gets a bit terrible not my main language).
June 22, 201411 yr Author public void addInformation(ItemStack par1ItemStack, List par2List) { par2List.add("test"); } this is what i came up with put i get an error saying Void is an invalid type for the variable addinformation
June 23, 201411 yr @TotalyTaco The addInformation() method is defined in the Item class as: /** * allows items to add custom lines of information to the mouseover description */ @SideOnly(Side.CLIENT) public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {} So if you're going to override it you need to: a) also make it only loaded on client side with the @SideOnly annotation b) use exactly the same parameter list -- otherwise in Java you've defined a different method that won't be called. Note that this method is called automatically by the showToolTip() method in ItemStack class, and is appended to the display name for the item. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.