Class RecipeBase<T>
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Creates a new base recipe type. Almost all recipe types extend from this.
public abstract class RecipeBase<T> : IRecipeBase<T>
Type Parameters
T
The resulting recipe type.
- Inheritance
-
RecipeBase<T>
- Implements
-
IRecipeBase<T>
- Derived
- Inherited Members
- Extension Methods
Fields
Ingredients
An array of ingredients for this recipe. If only using a single ingredient, see Ingredient.
Required if not using Ingredient.
public CraftingRecipeIngredient[] Ingredients
Field Value
Output
The output when the recipe is successful.
public JsonItemStack Output
Field Value
RecipeId
The ID of the recipe. Automatically generated when the recipe is loaded.
public int RecipeId
Field Value
Properties
Enabled
Should this recipe be loaded by the game?
public bool Enabled { get; set; }
Property Value
Ingredient
A single ingredient for this recipe. If you need to use more than one ingredient, see Ingredients.
Required if not using Ingredients.
public CraftingRecipeIngredient Ingredient { get; set; }
Property Value
Name
Adds a name to this recipe. Used for logging, and determining helve hammer workability for smithing recipes.
public AssetLocation Name { get; set; }
Property Value
Methods
Clone()
public abstract T Clone()
Returns
- T
GetNameToCodeMapping(IWorldAccessor)
public abstract Dictionary<string, string[]> GetNameToCodeMapping(IWorldAccessor world)
Parameters
world
IWorldAccessor
Returns
- Dictionary<string, string[]>
Resolve(IWorldAccessor, string)
public abstract bool Resolve(IWorldAccessor world, string sourceForErrorLogging)
Parameters
world
IWorldAccessorsourceForErrorLogging
string