Recipe.smithing constructor

Recipe.smithing(
  1. Item base,
  2. Item result, {
  3. Item? addition,
  4. String name = 'recipe',
  5. int? id,
  6. bool exactlyPlaced = false,
  7. int? exactResult,
  8. RecipeType type = RecipeType.smithing,
})

For smithing you can define an additional item on top to the base item:

Recipe.smithing
Item The ingredient
Item result Item
addition additional Item
... stays the same

Implementation

Recipe.smithing(
  Item base,
  this.result, {
  Item? addition,
  this.name = 'recipe',
  this.id,
  this.exactlyPlaced = false,
  this.exactResult,
  this.type = RecipeType.smithing,
})  : experience = 0.1,
      cookingtime = 200,
      ingredients = {
        1: base,
        ...(addition != null ? {2: addition} : {})
      };