Add MissingIngredientExpection

This commit is contained in:
modmuss50 2017-01-05 21:11:44 +00:00
parent eb2453480f
commit a0c3cc644a
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
14 changed files with 45 additions and 30 deletions

View file

@ -31,11 +31,12 @@ import techreborn.blocks.*;
import techreborn.compat.CompatManager;
import techreborn.config.ConfigTechReborn;
import techreborn.items.*;
import techreborn.lib.MissingIngredientExpection;
import techreborn.parts.powerCables.ItemStandaloneCables;
import techreborn.utils.RecipeUtils;
import techreborn.utils.StackWIPHandler;
import java.security.InvalidParameterException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@ -990,10 +991,10 @@ public class ModRecipes {
ItemStack item = null;
try {
item = ItemIngots.getIngotByName(name, 9);
} catch (InvalidParameterException e) {
} catch (MissingIngredientExpection e) {
try {
item = ItemGems.getGemByName(name, 9);
} catch (InvalidParameterException e2) {
} catch (MissingIngredientExpection e2) {
continue;
}
}