@@ -0,0 +1,3315 @@
+package codechicken.lib.gui;%0A%0Aimport net.minecraft.creativetab.CreativeTabs;%0Aimport net.minecraft.init.Items;%0Aimport net.minecraft.item.Item;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.util.ResourceLocation;%0Aimport net.minecraftforge.fml.common.FMLLog;%0Aimport net.minecraftforge.fml.common.registry.ForgeRegistries;%0A%0A/**%0A * Created by covers1624 on 7/11/2016.%0A * Provides a Simple way to create a CreativeTab%0A */%0Apublic class SimpleCreativeTab extends CreativeTabs %7B%0A%0A    private ItemStack tabIcon;%0A    private final String name;%0A    private final int meta;%0A%0A    /**%0A     * Create a SimpleCreativeTab!%0A     * The tab icon will be %22baked%22 when the icon is requested the first time.%0A     * If the item cannot be found it will throw a RuntimeException, This can be avoided by setting %22-Dccl.ignoreInvalidTabItem=true%22 in your command line args, this will default the tab to Redstone.%0A     *%0A     * @param tabLabel The label to be displayed, This WILL be localized by minecraft.%0A     * @param tabIcon  The item to find in the Item Registry e.g %22minecraft:redstone%22 or %22chickenchunks:chickenChunkLoader%22%0A     */%0A    public SimpleCreativeTab(String tabLabel, String tabIcon) %7B%0A        this(tabLabel, tabIcon, 0);%0A    %7D%0A%0A    /**%0A     * Create a SimpleCreativeTab!%0A     * The tab icon will be %22baked%22 when the icon is requested the first time.%0A     * If the item cannot be found it will throw a RuntimeException, This can be avoided by setting %22-Dccl.ignoreInvalidTabItem=true%22 in your command line args, this will default the tab to Redstone.%0A     *%0A     * @param tabLabel The label to be displayed, This WILL be localized by minecraft.%0A     * @param tabIcon  The item to find in the Item Registry e.g %22minecraft:redstone%22 or %22chickenchunks:chickenChunkLoader%22%0A     * @param meta     The metadata of the item.%0A     */%0A    public SimpleCreativeTab(String tabLabel, String tabIcon, int meta) %7B%0A        super(tabLabel);%0A        this.name = tabIcon;%0A        this.meta = meta;%0A    %7D%0A%0A    /**%0A     * %22Bakes%22 the SimpleCreativeTab when the icon is requested the first time.%0A     * If the item cannot be found it will throw a RuntimeException.%0A     * This can be avoided by setting %22-Dccl.ignoreInvalidTabItem=true%22 in your command line args.%0A     * This will default the tab to Redstone.%0A     */%0A    private void bakeTab() %7B%0A        ResourceLocation location = new ResourceLocation(name);%0A        Item item = ForgeRegistries.ITEMS.getValue(location);%0A        if (item == null) %7B%0A            if (Boolean.parseBoolean(System.getProperty(%22ccl.ignoreInvalidTabItem%22, %22false%22))) %7B%0A                FMLLog.warning(%22Unable to find %5B%25s%5D in the Item Registry. Please ensure the name for the item is correct. Unable to craft SimpleCreativeTab icon.%22);%0A                tabIcon = new ItemStack(Items.REDSTONE);%0A            %7D else %7B%0A                throw new RuntimeException(%22Unable to find %5B%25s%5D in the Item Registry. Please ensure the name for the item is correct. Unable to craft SimpleCreativeTab icon!%22);%0A            %7D%0A        %7D%0A        tabIcon = new ItemStack(item, 1, meta);%0A    %7D%0A%0A    @Override%0A    public Item getTabIconItem() %7B%0A        return Items.REDSTONE;%0A    %7D%0A%0A    @Override%0A    public ItemStack getIconItemStack() %7B%0A        if (tabIcon == null) %7B%0A            bakeTab();%0A        %7D%0A        return tabIcon;%0A    %7D%0A%7D%0A

Move SimpleCreativeTab form Covers1624lib