package crazypants.enderio.machine.enchanter;

import java.util.ArrayList;
import java.util.List;

import crazypants.enderio.Log;
import net.minecraft.item.ItemStack;

public class EnchanterRecipeManager {

  private static EnchanterRecipeManager instance = new EnchanterRecipeManager();
  
  public static EnchanterRecipeManager getInstance() {
    return instance;
  }

  private final List<EnchanterRecipe> recipes = new ArrayList<EnchanterRecipe>();
    
  public void loadRecipesFromConfig() {
    List<EnchanterRecipe> res = EnchanterRecipeParser.loadRecipeConfig();
    if(res != null) {
      recipes.addAll(res);
    }
    Log.info("Loaded " + recipes.size() + " recipes for Enchanter");
  }

  public EnchanterRecipe getEnchantmentRecipeForInput(ItemStack itemStack) {
    if(itemStack.isEmpty()) {
      return null;
    }
    for(EnchanterRecipe recipe : recipes) {
      if(recipe.isInput(itemStack)) {
        return recipe;
      }
    }
    return null;
  }

  public void addCustomRecipes(String xml) {
    try {
      List<EnchanterRecipe> newRec = EnchanterRecipeParser.parse(xml);
      EnchanterRecipeParser.merge(recipes, newRec);
    } catch (Exception e) {
      Log.error("EnchanterRecipeManager: Error processing custom Enchanter recipes: " + e);
    }
  }

  public List<EnchanterRecipe> getRecipes() {
    return recipes;
  }

}

@@ -92,16 +92,50 @@
 .List;%0A%0A
+import javax.annotation.Nonnull;%0A%0A
 import c
@@ -399,16 +399,27 @@
 e;%0A  %7D%0A%0A
+  @Nonnull%0A
   privat
@@ -1318,24 +1318,35 @@
 %0A    %7D%0A  %7D%0A%0A
+  @Nonnull%0A
   public Lis

Add some Nonnull's to EnchanterRecipeManager