Posted July 3, 201411 yr 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.
July 3, 201411 yr 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: 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.
July 3, 201411 yr 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; } };
July 3, 201411 yr 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?
July 3, 201411 yr 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.