Class CraftingRecipeIngredient
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
A crafting recipe ingredient
public class CraftingRecipeIngredient
- Inheritance
-
CraftingRecipeIngredient
- Derived
Fields
Quantity (Recommended) (Default: 1)
The quantity of the itemstack required for the recipe.
public int Quantity
Field Value
Type (Recommended) (Default: Block)
Is the itemstack an item or a block?
public EnumItemClass Type
Field Value
AllowedVariants (Optional) (Default: Allow All)
When using a wildcard in the item/block code, setting this field will limit the allowed variants
public string[] AllowedVariants
Field Value
- string[]
Attributes (Optional) (Default: None)
What attributes this itemstack must have to be a valid ingredient
[JsonProperty]
[JsonConverter(typeof(JsonAttributesConverter))]
public JsonObject Attributes
Field Value
IsTool (Optional) (Default: False)
Whether this crafting recipe ingredient should be regarded as a tool required to build this item. If true, the recipe will not consume the item but reduce its durability.
public bool IsTool
Field Value
RecipeAttributes (Optional) (Default: None)
Optional attribute data that you can attach any data to. Used for some specific instances in code mods.
[JsonProperty]
[JsonConverter(typeof(JsonAttributesConverter))]
public JsonObject RecipeAttributes
Field Value
ReturnedStack (Optional) (Default: None)
If set, the crafting recipe will give back the consumed stack to be player upon crafting. Can also be used to produce multiple outputs for a recipe.
public JsonItemStack ReturnedStack
Field Value
SkipVariants (Optional) (Default: Skip None)
When using a wildcard in the item/block code, setting this field will skip these variants
public string[] SkipVariants
Field Value
- string[]
ToolDurabilityCost (Optional) (Default: 1)
If IsTool is set, this is the durability cost when the recipe is created.
public int ToolDurabilityCost
Field Value
Properties
Code (Required)
The code of the item or block
public AssetLocation Code { get; set; }
Property Value
Name (Required)
Attaches a name to a wildcard in an ingredient. This is used to substitute the value into the output. Only required if using a wildcard.
public string Name { get; set; }