Class CraftingType

java.lang.Object
com.minecolonies.api.crafting.registry.CraftingType
Direct Known Subclasses:
BrewingCraftingType, RecipeCraftingType

public abstract class CraftingType extends Object
Class to represent the different types of crafting supported by MineColonies
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CraftingType(@NotNull net.minecraft.resources.ResourceLocation id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    abstract @NotNull List<IGenericRecipe>
    findRecipes(@NotNull net.minecraft.world.item.crafting.RecipeManager recipeManager, @Nullable net.minecraft.world.level.Level world)
    Find all teachable recipes supported by this particular crafting type
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CraftingType

      protected CraftingType(@NotNull @NotNull net.minecraft.resources.ResourceLocation id)
  • Method Details

    • findRecipes

      @NotNull public abstract @NotNull List<IGenericRecipe> findRecipes(@NotNull @NotNull net.minecraft.world.item.crafting.RecipeManager recipeManager, @Nullable @Nullable net.minecraft.world.level.Level world)
      Find all teachable recipes supported by this particular crafting type
      Parameters:
      recipeManager - the vanilla recipe manager
      world - the world (if available)
      Returns:
      the list of teachable recipes
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object