Posted March 1, 20196 yr How can I add a ToolTip to an item and blocks I create? Edited March 1, 20196 yr by Puyodead1 Yeet
March 1, 20196 yr Override addInformation in your item class About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 1, 20196 yr Author 18 minutes ago, Cadiboo said: Override addInformation in your item class I am not sure what I'm doing wrong with that. I tried that but I get this error: "The method addInformation(ItemStack, EntityPlayer, List<String>, boolean) of type SiliconBlock must override or implement a supertype method" so I don't know where else I am suppose to put it Edited March 1, 20196 yr by Puyodead1 Yote
March 1, 20196 yr Author 2 minutes ago, diesieben07 said: Use your IDE to override methods. Don't do it manually. I use eclipse, it says Create 'addInformation()' in super type BlockBase or IHasModel, i assume it would be the BlockBase class? Edited March 1, 20196 yr by Puyodead1 Yeet
March 1, 20196 yr Author 5 minutes ago, diesieben07 said: No. Remove whatever addInformation method you already added. Now type "addInformation" in the body of your class and press ctrl-space. It will suggest to override the method for you. Okay, I did that, eclipse added the override method, but it still refuses to show any tooltip. @Override public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { // TODO Auto-generated method stub tooltip.add("test"); super.addInformation(stack, player, tooltip, advanced); }
March 1, 20196 yr Author 6 minutes ago, diesieben07 said: Post more of your code. Ideally a working Git repository. https://gist.github.com/Puyodead1/a572af9a26d3d2c47772bd08f3750fc5
March 1, 20196 yr Author 33 minutes ago, diesieben07 said: There is no addInformation in there anywhere. ?♂️sorry, added it, its SiliconBlock.java Edited March 1, 20196 yr by Puyodead1 Yote
March 2, 20196 yr Author I'm stupid and was looking at the wrong block at the end there ?♂️ Thank you for the help!
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.