use of mods.railcraft.common.util.crafting.InvalidRecipeException in project Railcraft by Railcraft.
the class CraftingPlugin method addShapelessRecipe.
public static void addShapelessRecipe(@Nullable ItemStack result, Object... recipeArray) {
ProcessedRecipe processedRecipe;
try {
processedRecipe = processRecipe(RecipeType.SHAPELESS, result, recipeArray);
} catch (InvalidRecipeException ex) {
Game.logTrace(Level.WARN, ex.getRawMessage());
return;
}
if (processedRecipe.isOreRecipe) {
IRecipe recipe = new ShapelessOreRecipe(processedRecipe.result, processedRecipe.recipeArray);
addRecipe(recipe);
} else
GameRegistry.addShapelessRecipe(processedRecipe.result, processedRecipe.recipeArray);
}
use of mods.railcraft.common.util.crafting.InvalidRecipeException in project Railcraft by Railcraft.
the class CraftingPlugin method addRecipe.
public static void addRecipe(@Nullable ItemStack result, Object... recipeArray) {
ProcessedRecipe processedRecipe;
try {
processedRecipe = processRecipe(RecipeType.SHAPED, result, recipeArray);
} catch (InvalidRecipeException ex) {
Game.logTrace(Level.WARN, ex.getRawMessage());
return;
}
if (processedRecipe.isOreRecipe) {
IRecipe recipe = new ShapedOreRecipe(processedRecipe.result, processedRecipe.recipeArray);
addRecipe(recipe);
} else
GameRegistry.addRecipe(processedRecipe.result, processedRecipe.recipeArray);
}
Aggregations