Package com.minecolonies.api.crafting
Class RecipeCraftingType<C extends net.minecraft.world.item.crafting.RecipeInput,T extends net.minecraft.world.item.crafting.Recipe<C>>
java.lang.Object
com.minecolonies.api.crafting.registry.CraftingType
com.minecolonies.api.crafting.RecipeCraftingType<C,T>
- Type Parameters:
C- the crafting inventory typeT- the recipe type
- Direct Known Subclasses:
ArchitectsCutterCraftingType
public class RecipeCraftingType<C extends net.minecraft.world.item.crafting.RecipeInput,T extends net.minecraft.world.item.crafting.Recipe<C>>
extends CraftingType
A
CraftingType for the vanilla RecipeType-
Constructor Summary
ConstructorsConstructorDescriptionRecipeCraftingType(@NotNull net.minecraft.resources.ResourceLocation id, @NotNull net.minecraft.world.item.crafting.RecipeType<T> recipeType, @Nullable Predicate<net.minecraft.world.item.crafting.RecipeHolder<T>> predicate) Create a new instance -
Method Summary
Modifier and TypeMethodDescription@NotNull List<IGenericRecipe> findRecipes(@NotNull net.minecraft.world.item.crafting.RecipeManager recipeManager, @NotNull net.minecraft.world.level.Level world) Find all teachable recipes supported by this particular crafting typeMethods inherited from class com.minecolonies.api.crafting.registry.CraftingType
equals, hashCode
-
Constructor Details
-
RecipeCraftingType
public RecipeCraftingType(@NotNull @NotNull net.minecraft.resources.ResourceLocation id, @NotNull @NotNull net.minecraft.world.item.crafting.RecipeType<T> recipeType, @Nullable @Nullable Predicate<net.minecraft.world.item.crafting.RecipeHolder<T>> predicate) Create a new instance- Parameters:
id- the crafting type idrecipeType- the vanilla recipe typepredicate- filter acceptable recipes, or null to accept all
-
-
Method Details
-
findRecipes
@NotNull public @NotNull List<IGenericRecipe> findRecipes(@NotNull @NotNull net.minecraft.world.item.crafting.RecipeManager recipeManager, @NotNull @NotNull net.minecraft.world.level.Level world) Description copied from class:CraftingTypeFind all teachable recipes supported by this particular crafting type- Specified by:
findRecipesin classCraftingType- Parameters:
recipeManager- the vanilla recipe managerworld- the world (if available)- Returns:
- the list of teachable recipes
-