Posted March 28, 201312 yr For the moderators, I looked up about the error I will be mentioning in the upper-right hand search bar and got no results. For everyone else, the error is IconRegister cannot be resolved to a type The code is: import net.minecraft.item.Item; import net.minecraft.creativetab.CreativeTabs; public class Lactobacillus extends Item { public Lactobacillus(int id, String texture) { super(id); setCreativeTab(CreativeTabs.tabMisc); } @Override public void func_94581_a(IconRegister iconRegister) { iconIndex = iconRegister.func_94245_a("microcellExquisites:Lactobacillus"); } } I am using the latest RECOMMENDED forge build and Eclipse. The IconRegister colored in red is the IconRegister underlined by Eclipse. Please reply if you know a solution! I wonder why many mods do not have this problem... Have a nice rest of the day!
March 28, 201312 yr The problem is probably eclipse doesn't know about IconRegister. Try hovering your mouse over it to see quick fixes and select import blablabla. Else, find out which package that contains IconRegister and import it. If you guys dont get it.. then well ya.. try harder...
March 29, 201312 yr In addition to Mazetar's suggestion, I highly suggest that you download the javadocs. They will tell you what a huge chunk of the Forge methods do. Also, be aware that func_94581_a was renamed to updateIcon in the newer builds. You will need to change the method name once you update.
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.