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

I have no idea why but this doesn't work:

 

TAB:

public class RoATab extends CreativeTabs
{
Item icon;

public RoATab(String lable, Item icon)
{
	super(lable);
	this.icon = icon;
}

@Override
public Item getTabIconItem() 
{
	return icon;
}
}

InitTabs:

	RoATab TabWeapons = new RoATab("RoAWeapons", Items.iron_sword);

ITEM:

public class ItemCore extends Item
{
public ItemCore(String UN, CreativeTabs Tab)
{
	super();
	GameRegistry.registerItem(this, UN);
	setUnlocalizedName(UN);
	setTextureName(InitUtil.ModID + ":" + UN);
	this.setCreativeTab(Tab);
}
.......
...
.

InitItems:

	MyItem = 	new ItemCore("Steel", InitTabs.TabWeapons);

 

SAME code works with Blocks (I mean this tab and setCreativeTab() works with extended Block)

 

Any idea? Is Item tab declaration different?

 

Note: setCreativeTab(tab) doesn't work only if I place there my Tab name, vanilla ones work.

 

1.7.10 is no longer supported by forge, you are on your own.

  • Author

Bro, I wouldn't be here wihtout making sure it is not my mistake.

 

Alredy done step by step initialization. Tabs alredy exist when I declare items.

 

Fun fact: :)

mloyrk.jpg

 

Well, I think I'm just gonna cleanup workspace, maybe there is some troll code somewhere from .git

1.7.10 is no longer supported by forge, you are on your own.

I just made my tab like this inside my main class:

 

public static CreativeTabs tabName = new CreativeTabs("tabName") {

	@Override
	public Item getTabIconItem() {

		return Items.apple;

	}

};

Where are you registering your tab?

Also where are you set the ID of your tab?

You should make a class for your tab not just in your main class.

Can we see your posInit please?

That is literally it, nothing in my init methods. I think it just creates an ID depending on what isn't used. It works fine and I can easily set an item to appear in the tab.

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.