package net.silentchaos512.lib.creativetab;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;


public abstract class CreativeTabSL extends CreativeTabs {

  public CreativeTabSL(String label) {

    super(label);
  }

  protected abstract ItemStack getStack();

  @Override
  public ItemStack getTabIconItem() {

    return getStack();
  }
}

@@ -38,16 +38,50 @@
 vetab;%0A%0A
+import net.minecraft.block.Block;%0A
 import n
@@ -119,16 +119,49 @@
 veTabs;%0A
+import net.minecraft.init.Items;%0A
 import n
@@ -225,175 +225,1431 @@
 ck;%0A
-%0A%0Apublic abstract class CreativeTabSL extends CreativeTabs %7B%0A%0A  public CreativeTabSL(String label) %7B%0A%0A    super(label);%0A  %7D%0A%0A  protected abstract ItemStack getStack();
+import net.silentchaos512.lib.util.StackHelper;%0A%0A/**%0A * CreativeTabs with cross compatibility support.%0A * %0A * @author SilentChaos512%0A * @since 2.0.0%0A */%0Apublic class CreativeTabSL extends CreativeTabs %7B%0A%0A  Block block = null;%0A  Item item = null;%0A  int meta;%0A%0A  public CreativeTabSL(String label) %7B%0A%0A    super(label);%0A  %7D%0A%0A  /**%0A   * Create the creative tab with a block for the icon. Note that meta is ignored in 1.10.%0A   * %0A   * @since 2.0.6%0A   */%0A  public CreativeTabSL(String label, Block block, int meta) %7B%0A%0A    super(label);%0A%0A    if (Item.getItemFromBlock(block) == null)%0A      throw new NullPointerException(%0A          %22Item is null! Make certain it has been initialized before constructing the creative tab!%22);%0A%0A    this.block = block;%0A    this.meta = meta;%0A  %7D%0A%0A  /**%0A   * Create the creative tab with an item for the icon. Note that meta is ignored in 1.10.%0A   * %0A   * @since 2.0.6%0A   */%0A  public CreativeTabSL(String label, Item item, int meta) %7B%0A%0A    super(label);%0A%0A    if (item == null)%0A      throw new NullPointerException(%0A          %22Item is null! Make certain it has been initialized before constructing the creative tab!%22);%0A%0A    this.item = item;%0A    this.meta = meta;%0A  %7D%0A%0A  protected ItemStack getStack() %7B%0A%0A    if (block != null)%0A      return new ItemStack(Item.getItemFromBlock(block), 1, meta & 0xF);%0A    else if (item != null)%0A      return new ItemStack(item, 1, meta);%0A    else%0A      return null;%0A  %7D
 %0A%0A  

Improve CreativeTabSL (cc SilentChaos512/SilentGems#134)