Interface Ingredient.Builder

All Superinterfaces:
AbstractBuilder<Ingredient>, Builder<Ingredient,Ingredient.Builder>, ResettableBuilder<Ingredient,Ingredient.Builder>
Enclosing interface:
Ingredient

public static interface Ingredient.Builder extends Builder<Ingredient,Ingredient.Builder>
Builder for Ingredients.
  • Method Details

    • with

      Ingredient.Builder with(ItemType... types)
      Sets one or more ItemTypes for matching the ingredient.
      Parameters:
      types - The items
      Returns:
      This Builder, for chaining
    • with

      Ingredient.Builder with(Supplier<? extends ItemType>... types)
      Sets one or more ItemTypes for matching the ingredient.
      Parameters:
      types - The items
      Returns:
      This Builder, for chaining
    • with

      Ingredient.Builder with(ItemStack... types)
      Sets one ore more ItemStack for matching the ingredient.
      Parameters:
      types - The items
      Returns:
      This Builder, for chaining
    • with

      Ingredient.Builder with(ResourceKey resourceKey, Predicate<ItemStack> predicate, ItemStack... exemplaryTypes)
      Sets a Predicate for matching the ingredient.

      Exemplary types are used for the vanilla recipe book.

      Note: Predicate ingredients may not be fully supported for all recipe types

      Parameters:
      predicate - The predicate
      exemplaryTypes - The items
      Returns:
      This Builder, for chaining
    • with

      Sets one ItemStack for matching the ingredient.
      Parameters:
      types - The items
      Returns:
      This Builder, for chaining
    • with

      Sets the item tag for matching the ingredient.
      Parameters:
      itemTag - The item tag
      Returns:
      This Builder, for chaining
    • build

      Ingredient build()
      Builds the Ingredient with the specified items and or predicates.
      Specified by:
      build in interface AbstractBuilder<Ingredient>
      Returns:
      The new Ingredient