MinecraftForge/MinecraftForge — pull request #213 by briman0094 (2012-10-16 20:25:15+00:00)
Title: Add feature: mods can register custom Creative mode tabs

This commit allows modders to create custom instances of CreativeTabs and add them to the creative menu. The main change required here was changes to the creative mode GUI:

- Search and Survival inventories are now at top left so that they don't get caught in the middle of other tabs
- The GUI resizes to accommodate more tabs. It tries to make the amount of tabs on the top and the bottom the same, but there can be one more tab on the top.
+ If there are more than 14 tabs, the inventory will stretch horizontally. The actual inventory itself will stay in the middle but there will be an empty buffer so that the tabs stay on the GUI screen.

This code will generate 20 new tabs and add them to the menu:

```java
for (int i = 0; i < 20; i++)
{
CreativeTabs tempTab = new CreativeTabs(i + 12, "tab" + (i + 1)).setIconItemIndex(i + 256);
LanguageRegistry.addName(tempTab, "Random Tab " + (i + 1));
}
```

Some screenshots:
http://imgur.com/a/BwbHU#0