package com.enderio.core.common.util;

import java.util.List;

import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;

public final class OreDictionaryHelper {

  public static final String INGOT_COPPER = "ingotCopper";
  public static final String INGOT_TIN = "ingotTin";
  public static final String DUST_ENDERPEARL = "dustEnderPearl";
  public static final String INGOT_ENDERIUM = "ingotEnderium";

  public static boolean isRegistered(String name) {
    if(!getOres(name).isEmpty()) {
      return true;
    }
    return false;
  }

  public static List<ItemStack> getOres(String name) {
    return OreDictionary.getOres(name);
  }

  public static boolean hasCopper() {
    return isRegistered(INGOT_COPPER);
  }

  public static boolean hasTin() {
    return isRegistered(INGOT_TIN);
  }

  public static boolean hasEnderPearlDust() {
    return isRegistered(DUST_ENDERPEARL);
  }

  private OreDictionaryHelper() {
  }

  public static boolean hasEnderium() {
    return isRegistered(INGOT_ENDERIUM);
  }

}

@@ -56,16 +56,61 @@
 .List;%0A%0A
+import org.apache.commons.lang3.ArrayUtils;%0A%0A
 import n
@@ -138,16 +138,16 @@
 mStack;%0A
-
 import n
@@ -529,16 +529,17 @@
 %7B%0A    if
+ 
 (!getOre
@@ -1033,24 +1033,24 @@
 nderium() %7B%0A
-
     return i
@@ -1083,10 +1083,409 @@
 );%0A  %7D%0A%0A
+  public static String%5B%5D getOreNames(ItemStack stack) %7B%0A    int%5B%5D ids = OreDictionary.getOreIDs(stack);%0A    String%5B%5D ret = new String%5Bids.length%5D;%0A    for (int i = 0; i %3C ids.length; i++) %7B%0A      ret%5Bi%5D = OreDictionary.getOreName(ids%5Bi%5D);%0A    %7D%0A    return ret;%0A  %7D%0A%0A  public static boolean hasName(ItemStack stack, String oreName) %7B%0A    return ArrayUtils.contains(getOreNames(stack), oreName);%0A  %7D%0A%0A
 %7D%0A

Add some new OreDictionary helpers