package totemic_commons.pokefenn.misc;

import java.util.List;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import totemic_commons.pokefenn.ModBlocks;
import totemic_commons.pokefenn.lib.Strings;

public class CreativeTabTotemic extends CreativeTabs
{
    public CreativeTabTotemic(int id, String name)
    {
        super(id, name);
    }

    @SideOnly(Side.CLIENT)
    @Override
    public Item getTabIconItem()
    {
        return Item.getItemFromBlock(ModBlocks.tipi);
    }

    @SideOnly(Side.CLIENT)
    @Override
    public void displayAllRelevantItems(List<ItemStack> list)
    {
        super.displayAllRelevantItems(list);

        list.add(getEgg("totemic." + Strings.BUFFALO_NAME));
        list.add(getEgg("totemic." + Strings.BAYKOK_NAME));
    }

    public static ItemStack getEgg(String entityName)
    {
        ItemStack stack = new ItemStack(Items.spawn_egg);
        NBTTagCompound eggTag = new NBTTagCompound();
        eggTag.setString("entity_name", entityName);
        stack.setTagCompound(eggTag);
        return stack;
    }
}

@@ -388,16 +388,57 @@
 Blocks;%0A
+import totemic_commons.pokefenn.Totemic;%0A
 import t
@@ -474,16 +474,16 @@
 trings;%0A
-
 %0Apublic 
@@ -935,33 +935,43 @@
 .add(getEgg(
-%22t
+T
 otemic.
+MOD_ID + %22.
 %22 + Strings.
@@ -1014,17 +1014,27 @@
 Egg(
-%22t
+T
 otemic.
+MOD_ID + %22.
 %22 + 
@@ -1177,24 +1177,128 @@
 spawn_egg);%0A
+        NBTTagCompound entityTag = new NBTTagCompound();%0A        entityTag.setString(%22id%22, entityName);%0A
         NBTT
@@ -1361,27 +1361,22 @@
 .set
-String(%22e
+Tag(%22E
 ntity
-_name
+Tag
 %22, e
@@ -1372,36 +1372,35 @@
 tityTag%22, entity
-Name
+Tag
 );%0A        stack

Fix spawn eggs in creative tab