Tutorial 6: Creative Tabs

In this tutorial we will be making a creative tab!  Let's begin!

In com.yourname.yourmodid, create a new package called core.tab.  Inside there, create a new class called the name of your tab: e.g. ExampleTab

Next, you want to populate that class, like this: 
public class ExampleTab extends ItemGroup {

  public static final ItemGroup EXAMPLE_TAB = new ExampleTab(ItemGroup.GROUPS.length, "example_tab");

  public ExampleTab(int index, String label) {
    super(index, label);
  }

  @Override
  public ItemStack createIcon() {
    return new ItemStack(ItemInit.EXAMPLE_ITEM.get());
  }
}
We extend ItemGroup, which is the basic tab in minecraft.  We define the tab for reference with the length and the ID.  Then we have the constructor and the icon.  I am using my example item as my icon for my tab. 

You will also need to edit the lang file.  Just add "itemGroup.yourmodid.example_tab": "Example Tab"
Referencing the creative tab is also very easy! All you have to do is type: ExampleTab.EXAMPLE_TAB.

That's it for the creative tab!  Crafting Recipes in the next tutorial!