Package vazkii.botania.api.recipe
Interface ElvenTradeRecipe
- All Superinterfaces:
net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
- All Known Implementing Classes:
ElvenTradeRecipe,LexiconElvenTradeRecipe
public interface ElvenTradeRecipe
extends net.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationFields inherited from interface net.minecraft.world.item.crafting.Recipe
CODEC, STREAM_CODEC -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull net.minecraft.world.item.ItemStackassemble(@NotNull net.minecraft.world.item.crafting.RecipeInput inv, net.minecraft.core.HolderLookup.Provider registries) default booleancanCraftInDimensions(int width, int height) booleancontainsItem(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 recipedefault net.minecraft.world.item.ItemStackgetResultItem(net.minecraft.core.HolderLookup.Provider registries) default @NotNull net.minecraft.world.item.crafting.RecipeType<?> getType()default booleanChecks if this recipe is a "return" recipe, meaning that it returns the item that was thrown into it.default booleanAttempts to match the recipedefault booleanmatches(@NotNull net.minecraft.world.item.crafting.RecipeInput inv, @NotNull net.minecraft.world.level.Level world) Methods inherited from interface net.minecraft.world.item.crafting.Recipe
getGroup, getRemainingItems, getSerializer, getToastSymbol, isIncomplete, showNotification
-
Field Details
-
TYPE_ID
static final net.minecraft.resources.ResourceLocation TYPE_ID -
TYPE_ID_LEXICON
static final net.minecraft.resources.ResourceLocation TYPE_ID_LEXICON
-
-
Method Details
-
match
Optional<List<net.minecraft.world.item.ItemStack>> match(List<net.minecraft.world.item.ItemStack> stacks) Attempts to match the recipe- 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
boolean containsItem(net.minecraft.world.item.ItemStack stack) If the recipe does not contain the item, it will be destroyed upon entering the portal. -
getIngredients
@NotNull @NotNull net.minecraft.core.NonNullList<net.minecraft.world.item.crafting.Ingredient> getIngredients()- Specified by:
getIngredientsin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>- Returns:
- Preview of the inputs
-
getOutputs
List<net.minecraft.world.item.ItemStack> getOutputs()- Returns:
- Preview of the outputs
-
getOutputs
List<net.minecraft.world.item.ItemStack> getOutputs(List<net.minecraft.world.item.ItemStack> inputs) Actually evaluate the recipe -
getType
@NotNull default @NotNull net.minecraft.world.item.crafting.RecipeType<?> getType()- Specified by:
getTypein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
matches
default boolean matches(@NotNull @NotNull net.minecraft.world.item.crafting.RecipeInput inv, @NotNull @NotNull net.minecraft.world.level.Level world) - Specified by:
matchesin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
assemble
@NotNull default @NotNull net.minecraft.world.item.ItemStack assemble(@NotNull @NotNull net.minecraft.world.item.crafting.RecipeInput inv, @NotNull net.minecraft.core.HolderLookup.Provider registries) - Specified by:
assemblein interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
canCraftInDimensions
default boolean canCraftInDimensions(int width, int height) - Specified by:
canCraftInDimensionsin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
getResultItem
default net.minecraft.world.item.ItemStack getResultItem(@NotNull net.minecraft.core.HolderLookup.Provider registries) - Specified by:
getResultItemin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
isSpecial
default boolean isSpecial()- Specified by:
isSpecialin interfacenet.minecraft.world.item.crafting.Recipe<net.minecraft.world.item.crafting.RecipeInput>
-
isReturnRecipe
default boolean isReturnRecipe()Checks if this recipe is a "return" recipe, meaning that it returns the item that was thrown into it.- Returns:
trueif recipe is a return recipe,falseotherwise.
-