}
}
} else if(rec1 instanceof ShapelessRecipe && rec2 instanceof ShapelessRecipe) {
CraftBookPlugin.logDebugMessage("Shapeless Recipe!", "advanced-data.compare-recipes.shapeless");
ShapelessRecipe recipe1 = (ShapelessRecipe) rec1;
ShapelessRecipe recipe2 = (ShapelessRecipe) rec2;
if(VerifyUtil.withoutNulls(recipe1.getIngredientList()).size() != VerifyUtil.withoutNulls(recipe2.getIngredientList()).size()) {
CraftBookPlugin.logDebugMessage("Recipes have different amounts of ingredients!", "advanced-data.compare-recipes.shapeless");
return false;
}
CraftBookPlugin.logDebugMessage("Same Size!", "advanced-data.compare-recipes.shapeless");
List<ItemStack> test = new ArrayList<ItemStack>();
test.addAll(VerifyUtil.<ItemStack>withoutNulls(recipe1.getIngredientList()));
if(test.size() == 0) {
CraftBookPlugin.logDebugMessage("Recipes are the same!", "advanced-data.compare-recipes.shapeless");
return true;
}
if(!test.removeAll(VerifyUtil.<ItemStack>withoutNulls(recipe2.getIngredientList())) && test.size() > 0) {
CraftBookPlugin.logDebugMessage("Recipes are NOT the same!", "advanced-data.compare-recipes.shapeless");
return false;
}
if(test.size() > 0) {
CraftBookPlugin.logDebugMessage("Recipes are NOT the same!", "advanced-data.compare-recipes.shapeless");