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 type
T - 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

    Constructors
    Constructor
    Description
    RecipeCraftingType(@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 Type
    Method
    Description
    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 type

    Methods inherited from class com.minecolonies.api.crafting.registry.CraftingType

    equals, hashCode

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • 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 id
      recipeType - the vanilla recipe type
      predicate - 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: CraftingType
      Find all teachable recipes supported by this particular crafting type
      Specified by:
      findRecipes in class CraftingType
      Parameters:
      recipeManager - the vanilla recipe manager
      world - the world (if available)
      Returns:
      the list of teachable recipes