RecipeFinder
This class will search through all existing recipes for you based on criteria that you give it. It's useful for finding a particular vanilla recipe that you wish to remove or edit. Use this by creating new instances with the empty constructor for each search you perform.
Methods
- AddIngredient(System.Int32,System.Int32)()
- Adds an ingredient with the given item type and stack size to the search criteria.
- AddRecipeGroup(System.String,System.Int32)()
- Adds a recipe group ingredient with the given RecipeGroup name and stack size to the search criteria.
- SetResult(System.Int32,System.Int32)()
- Sets the search criteria's result to the given item type and stack size.
- AddTile(System.Int32)()
- Adds a required crafting station with the given tile type to the search criteria.
- FindExactRecipe()
- Searches for a recipe that matches the search criteria exactly, then returns it. That means the recipe will have exactly the same ingredients, tiles, liquid requirements, recipe groups, and result; even the stack sizes will match. If no recipe with an exact match is found, this will return null.
- SearchRecipes()
- Searches for all recipes that include the search criteria, then returns them in a list. In terms of ingredients, it will search for recipes that include all the search criteria ingredients, with stack sizes greater than or equal to the search criteria. It will also make sure the recipes include all search criteria recipe groups and tiles. If the search criteria includes a result, the recipes will also have the same result with a stack size greater than or equal to the search criteria. Finally, if needWater, needLava, or needHoney are set to true, the found recipes will also have them set to true.