本文整理汇总了C#中Terraria.ModLoader.ModRecipe.AddRecipeGroup方法的典型用法代码示例。如果您正苦于以下问题:C# ModRecipe.AddRecipeGroup方法的具体用法?C# ModRecipe.AddRecipeGroup怎么用?C# ModRecipe.AddRecipeGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Terraria.ModLoader.ModRecipe
的用法示例。
在下文中一共展示了ModRecipe.AddRecipeGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddRecipes
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Starfury);
recipe.AddRecipeGroup("IronBar", 5);
recipe.AddTile(TileID.FireflyinaBottle);
recipe.SetResult(this);
recipe.AddRecipe();
}
示例2: AddRecipes
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock);
recipe.SetResult(this, 999);
recipe.AddRecipe();
recipe = new ModRecipe(mod);
recipe.AddRecipeGroup("ExampleMod:ExampleItem");
recipe.SetResult(this, 999);
recipe.AddRecipe();
/*
// Start a new Recipe. (Prepend with "ModRecipe " if 1st recipe in code block.)
recipe = new ModRecipe(mod);
// Add a Vanilla Ingredient.
// Look up ItemIDs: https://github.com/bluemagic123/tModLoader/wiki/Vanilla-Item-IDs
// To specify more than one ingredient, use multiple recipe.AddIngredient() calls.
recipe.AddIngredient(ItemID.DirtBlock);
// An optional 2nd argument will specifie a stack of the item.
recipe.AddIngredient(ItemID.Acorn, 10);
// We can also specify the current item as an ingredient
recipe.AddIngredient(this, 2);
// Add a Mod Ingredient. Do not attempt ItemID.EquipMaterial, it's not how it works.
recipe.AddIngredient(mod, "EquipMaterial", 3);
// an alternate approach to the above.
recipe.AddIngredient(mod.ItemType("EquipMaterial"), 3);
// RecipeGroups allow you create a recipe that accepts items from a group of similar ingredients. For example, all varieties of Wood are in the vanilla "Wood" Group
recipe.AddRecipeGroup("Wood"); // check here for other vanilla groups: https://github.com/bluemagic123/tModLoader/wiki/ModRecipe#public-void-addrecipegroupstring-name-int-stack--1
// Here is using a mod recipe group. Check out ExampleMod.AddRecipeGroups() to see how to register a recipe group.
recipe.AddRecipeGroup("ExampleMod:ExampleItem", 2);
// To specify a crafting station, specify a tile. Look up TileIDs: https://github.com/bluemagic123/tModLoader/wiki/Vanilla-Tile-IDs
recipe.AddTile(TileID.WorkBenches);
// A mod Tile example. To specify more than one crafting station, use multiple recipe.AddTile() calls.
recipe.AddTile(mod, "ExampleWorkbench");
// There is a limit of 15 ingredients and 15 tiles to a recipe.
// Special
// Water, Honey, and Lava are not tiles, there are special bools for those. Also needSnowBiome. Water also specifies that it works with Sinks.
recipe.needHoney = true;
// Set the result of the recipe. You can use stack here too. Since this is in a ModItem class, we can use "this" to specify this item as the result.
recipe.SetResult(this, 999); // or, for a vanilla result, recipe.SetResult(ItemID.Muramasa);
// Finish your recipe
recipe.AddRecipe();
*/
}