Posted June 24, 201312 yr Hi guys! I want to add some tooltips to my new blocks. I already did this on the Items with this method: @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { list.add("Some Information"); } The same method doesn't work for the blocks, of course. I searched the Block.java for similar methods, but I ended up with nothing. I know that adding tooltips to blocks IS possible, see Factorization. Now, how can I do this? Thanks in advance ~bl4ckscor3 http://i.imgur.com/kPfhwnJ.png[/img] ↑↑↑↑↑↑↑↑↑↑ Click it please? :3 ↑↑↑↑↑↑↑↑↑↑
June 24, 201312 yr What List class did you import? Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
June 24, 201312 yr Author I imported java.util.List for the items. http://i.imgur.com/kPfhwnJ.png[/img] ↑↑↑↑↑↑↑↑↑↑ Click it please? :3 ↑↑↑↑↑↑↑↑↑↑
June 24, 201312 yr Hey! I had a similar issue a few weeks ago, but discovered that if you register your block as if it had metadata, then in your ItemBlock.java you can add the item lore. To register your block: GameRegistry.registerBlock(BlockCustom, ItemBlockCustom.class, "YourMod.BlockCustom"; In your ItemBlockCustom.java file: @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { list.add("Some Information"); } I wrote this code from memory, so it may not be correct. It should point you on the right track though Hope this helped! Luis
June 24, 201312 yr Author Hey! I had a similar issue a few weeks ago, but discovered that if you register your block as if it had metadata, then in your ItemBlock.java you can add the item lore. To register your block: GameRegistry.registerBlock(BlockCustom, ItemBlockCustom.class, "YourMod.BlockCustom"; In your ItemBlockCustom.java file: @Override public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean par4) { list.add("Some Information"); } I wrote this code from memory, so it may not be correct. It should point you on the right track though Hope this helped! Luis Thanks, that was exactly right! (I don't really feel like making new classes only for Information but oh, well....) http://i.imgur.com/kPfhwnJ.png[/img] ↑↑↑↑↑↑↑↑↑↑ Click it please? :3 ↑↑↑↑↑↑↑↑↑↑
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.