package net.silentchaos512.gems.lib;

import net.minecraft.item.ItemStack;
import net.silentchaos512.gems.SilentGems;
import net.silentchaos512.gems.block.ModBlocks;
import net.silentchaos512.gems.item.ModItems;
import net.silentchaos512.lib.creativetab.CreativeTabSL;

public class GemsCreativeTabs {

  public static final CreativeTabSL blocks = makeTab("blocks", new ItemStack(ModBlocks.gemOre));
  public static final CreativeTabSL materials = makeTab("materials", new ItemStack(ModItems.gem));
  public static final CreativeTabSL tools = makeTab("tools", new ItemStack(ModItems.torchBandolier));
  public static final CreativeTabSL utility = makeTab("utility", new ItemStack(ModItems.drawingCompass));

  static CreativeTabSL makeTab(final String name, final ItemStack icon) {

    return new CreativeTabSL(SilentGems.MODID + ":" + name) {

      @Override
      public ItemStack getStack() {

        return icon;
      }
    };
  }
}

@@ -31,16 +31,82 @@
 s.lib;%0A%0A
+import net.minecraft.block.Block;%0Aimport net.minecraft.item.Item;%0A
 import n
@@ -130,24 +130,24 @@
 .ItemStack;%0A
-
 import net.s
@@ -362,16 +362,35 @@
 Tabs %7B%0A%0A
+  //@formatter:off%0A
   public
@@ -430,234 +430,390 @@
 s = 
-makeTab(%22blocks%22, new ItemStack(ModBlocks.gemOre));%0A  public static final CreativeTabSL materials = makeTab(%22materials%22, new ItemStack(ModItems.gem));%0A  public static final CreativeTabSL tools = makeTab(%22tools%22, new ItemStack(
+new CreativeTabSL(%0A      SilentGems.RESOURCE_PREFIX + %22blocks%22, ModBlocks.gemOre, SilentGems.random.nextInt(16));%0A  public static final CreativeTabSL materials = new CreativeTabSL(%0A      SilentGems.RESOURCE_PREFIX + %22materials%22, ModItems.gem, SilentGems.random.nextInt(32));%0A  public static final CreativeTabSL tools = new CreativeTabSL(%0A      SilentGems.RESOURCE_PREFIX + %22tools%22, 
 ModI
@@ -831,17 +831,19 @@
 andolier
-)
+, 0
 );%0A  pub
@@ -887,298 +887,118 @@
 y = 
-makeTab(%22utility%22, new ItemStack(ModItems.drawingCompass));%0A%0A  static CreativeTabSL makeTab(final String name, final ItemStack icon) %7B%0A%0A    return new CreativeTabSL(SilentGems.MODID + %22:%22 + name) %7B%0A%0A      @Override%0A      public ItemStack getStack() %7B%0A%0A        return icon;%0A      %7D%0A    %7D;%0A  %7D
+new CreativeTabSL(%0A      SilentGems.RESOURCE_PREFIX + %22utility%22, ModItems.drawingCompass, 0);%0A  //@formatter:on
 %0A%7D%0A

Fix creative tab crash (should have gone with #134 commit)