Initial fix to allow null itemstacks

This commit is contained in:
modmuss50 2015-05-23 13:47:25 +01:00
parent 56e41efd6b
commit 46ee2fc71d
4 changed files with 22 additions and 9 deletions

View file

@ -113,6 +113,9 @@ public class ItemUtils {
}
public static List<ItemStack> getStackWithAllOre(ItemStack stack){
if(stack == null){
return new ArrayList<ItemStack>();
}
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
for (int oreID : OreDictionary.getOreIDs(stack)){
for(ItemStack ore : OreDictionary.getOres(OreDictionary.getOreName(oreID))){