public static Item?CreateItemSafe(this IRecipe recipe, LogMethod?log = null) { try { return(recipe.CreateItem()); } catch (Exception ex) { log?.Invoke($"Unable to create item instance for recipe \"{recipe.Name}\".", LogLevel.Warn, ex); } return(null); }