Class ElvenTradeRecipe

java.lang.Object
vazkii.botania.common.crafting.ElvenTradeRecipe
All Implemented Interfaces:
net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>, ElvenTradeRecipe

public class ElvenTradeRecipe extends Object implements ElvenTradeRecipe
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields inherited from interface vazkii.botania.api.recipe.ElvenTradeRecipe

    TYPE_ID, TYPE_ID_LEXICON

    Fields inherited from interface net.minecraft.world.item.crafting.Recipe

    CODEC, STREAM_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    ElvenTradeRecipe(List<net.minecraft.world.item.ItemStack> outputs, List<net.minecraft.world.item.crafting.Ingredient> ingredients)
     
    ElvenTradeRecipe(net.minecraft.world.item.ItemStack[] outputs, net.minecraft.world.item.crafting.Ingredient... inputs)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsItem(net.minecraft.world.item.ItemStack stack)
    If the recipe does not contain the item, it will be destroyed upon entering the portal.
    @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient>
     
    List<net.minecraft.world.item.ItemStack>
     
    List<net.minecraft.world.item.ItemStack>
    getOutputs(List<net.minecraft.world.item.ItemStack> inputs)
    Actually evaluate the recipe
    @NotNull net.minecraft.world.item.crafting.RecipeSerializer<?>
     
    @NotNull net.minecraft.world.item.ItemStack
     
    Optional<List<net.minecraft.world.item.ItemStack>>
    match(List<net.minecraft.world.item.ItemStack> stacks)
    Attempts to match the recipe

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface vazkii.botania.api.recipe.ElvenTradeRecipe

    assemble, canCraftInDimensions, getResultItem, getType, isReturnRecipe, isSpecial, matches

    Methods inherited from interface net.minecraft.world.item.crafting.Recipe

    getGroup, getRemainingItems, isIncomplete, showNotification
  • Constructor Details

    • ElvenTradeRecipe

      public ElvenTradeRecipe(net.minecraft.world.item.ItemStack[] outputs, net.minecraft.world.item.crafting.Ingredient... inputs)
    • ElvenTradeRecipe

      public ElvenTradeRecipe(List<net.minecraft.world.item.ItemStack> outputs, List<net.minecraft.world.item.crafting.Ingredient> ingredients)
  • Method Details

    • match

      public Optional<List<net.minecraft.world.item.ItemStack>> match(List<net.minecraft.world.item.ItemStack> stacks)
      Description copied from interface: ElvenTradeRecipe
      Attempts to match the recipe
      Specified by:
      match in interface ElvenTradeRecipe
      Parameters:
      stacks - Entire contents of the portal's buffer
      Returns:
      Optional.empty() if recipe doesn't match, Optional with a set of items used by recipe otherwise
    • containsItem

      public boolean containsItem(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: ElvenTradeRecipe
      If the recipe does not contain the item, it will be destroyed upon entering the portal.
      Specified by:
      containsItem in interface ElvenTradeRecipe
    • getSerializer

      @NotNull public @NotNull net.minecraft.world.item.crafting.RecipeSerializer<?> getSerializer()
      Specified by:
      getSerializer in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • getIngredients

      @NotNull public @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> getIngredients()
      Specified by:
      getIngredients in interface ElvenTradeRecipe
      Specified by:
      getIngredients in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
      Returns:
      Preview of the inputs
    • getToastSymbol

      @NotNull public @NotNull net.minecraft.world.item.ItemStack getToastSymbol()
      Specified by:
      getToastSymbol in interface net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
    • getOutputs

      public List<net.minecraft.world.item.ItemStack> getOutputs()
      Specified by:
      getOutputs in interface ElvenTradeRecipe
      Returns:
      Preview of the outputs
    • getOutputs

      public List<net.minecraft.world.item.ItemStack> getOutputs(List<net.minecraft.world.item.ItemStack> inputs)
      Description copied from interface: ElvenTradeRecipe
      Actually evaluate the recipe
      Specified by:
      getOutputs in interface ElvenTradeRecipe