Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

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...

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.