Recipe.smelting constructor

Recipe.smelting(
  1. Item ingredient,
  2. Item result, {
  3. String name = 'recipe',
  4. int? id,
  5. bool exactlyPlaced = false,
  6. int? exactResult,
  7. double experience = 0.1,
  8. int cookingtime = 200,
  9. RecipeType type = RecipeType.smelting,
})

Since smelting requires just one ingredient, just give it an Item and its result. Futhermore you can change the cooktime and experience gained:

Recipe.smelting
Item The ingredient (without slot)
cooktime The cook time of the recipe in ticks(default = 200)
experience output experience as double(default = 0.1)
type Can be changed to RecipeType.blasting, smoking or campfire_cooking (optional)
... stays the same

Implementation

Recipe.smelting(
  Item ingredient,
  this.result, {
  this.name = 'recipe',
  this.id,
  this.exactlyPlaced = false,
  this.exactResult,
  this.experience = 0.1,
  this.cookingtime = 200,
  this.type = RecipeType.smelting,
}) : ingredients = {1: ingredient};