package net.machinemuse.numina.recipe;

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

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Author: MachineMuse (Claire Semple)
 * Created: 5:06 PM, 11/4/13
 */
public class ItemNameMappings {
    private static Map<String, ItemStack> itemMap;

    private static Map<String, ItemStack> getItemMap() {
        if (itemMap == null) {
            itemMap = new HashMap<String, ItemStack>();
            for (Object obj : Block.blockRegistry) {
                Block block = (Block)obj;
                if (block != null && block.getUnlocalizedName() != null) {
                    itemMap.put(block.getUnlocalizedName(), new ItemStack(block));
                }
            }
            for (Object obj : Item.itemRegistry) {
                Item item = (Item)obj;
                if (item != null) {
                    if(item.getHasSubtypes()) {
                        List<ItemStack> stacklist = new ArrayList<ItemStack>();
                        for(CreativeTabs tab : item.getCreativeTabs()) {
                            item.getSubItems(item, tab, stacklist);
                        }
                        for(ItemStack stack : stacklist) {
                            itemMap.put(stack.getUnlocalizedName(), stack.copy());
                        }
                    } else {
                        itemMap.put(item.getUnlocalizedName(), new ItemStack(item));
                    }
                }
            }
        }
        return itemMap;
    }

    public static ItemStack getItem(String name) {
        if (getItemMap().containsKey(name))
            return getItemMap().get(name);
        else
            return null;
    }
}

@@ -71,55 +71,8 @@
 ck;%0A
-import net.minecraft.creativetab.CreativeTabs;%0A
 impo
@@ -99,16 +99,16 @@
 m.Item;%0A
+
 import n
@@ -141,36 +141,8 @@
 k;%0A%0A
-import java.util.ArrayList;%0A
 impo
@@ -167,31 +167,8 @@
 ap;%0A
-import java.util.List;%0A
 impo
@@ -901,508 +901,49 @@
 null
-) %7B%0A                    if(item.getHasSubtypes()) %7B%0A                        List%3CItemStack%3E stacklist = new ArrayList%3CItemStack%3E();%0A                        for(CreativeTabs tab : item.getCreativeTabs()) %7B%0A                            item.getSubItems(item, tab, stacklist);%0A                        %7D%0A                        for(ItemStack stack : stacklist) %7B%0A                            itemMap.put(stack.getUnlocalizedName(), stack.copy());%0A                        %7D%0A                    %7D else %7B%0A    
+ && item.getUnlocalizedName() != null) %7B%0A
     
@@ -1023,30 +1023,8 @@
 ));%0A
-                    %7D%0A
     

Undo change that makes client-side issue. Will need another way to get sub-items