java.lang.Object
org.cyclops.commoncapabilities.api.capability.recipehandler.DefaultRecipeHandler
All Implemented Interfaces:
IRecipeHandler

public class DefaultRecipeHandler extends Object implements IRecipeHandler
A default recipe handler that contains a dirt to diamonds recipe.
  • Constructor Details

    • DefaultRecipeHandler

      public DefaultRecipeHandler()
  • Method Details

    • getRecipeInputComponents

      public Set<IngredientComponent<?,?>> getRecipeInputComponents()
      Specified by:
      getRecipeInputComponents in interface IRecipeHandler
      Returns:
      The input recipe component types that are possible for recipes in this handler.
    • getRecipeOutputComponents

      public Set<IngredientComponent<?,?>> getRecipeOutputComponents()
      Specified by:
      getRecipeOutputComponents in interface IRecipeHandler
      Returns:
      The output recipe component types that are possible for recipes in this handler.
    • isValidSizeInput

      public boolean isValidSizeInput(IngredientComponent component, int size)
      Description copied from interface: IRecipeHandler
      Check if the given size of recipe component instances are valid for the given recipe component type.
      Specified by:
      isValidSizeInput in interface IRecipeHandler
      Parameters:
      component - The component type.
      size - A certain length of recipe component instances.
      Returns:
      If the given size of recipe component instances can be used by this recipe handler.
    • getRecipes

      public List<IRecipeDefinition> getRecipes()
      Specified by:
      getRecipes in interface IRecipeHandler
      Returns:
      Recipes that are available through this handler, this list is not necessarily exhaustive, but SHOULD be. No consistent order should be assumed from in collection.
    • simulate

      @Nullable public IMixedIngredients simulate(IMixedIngredients input)
      Description copied from interface: IRecipeHandler
      Test if the given recipe input can be handled by this handler. This method is mainly meant to be indicative. No actual crafting processes should be crafted because of this, i.e., calling this method should not have any effects on the state of this recipe handler.
      Specified by:
      simulate in interface IRecipeHandler
      Parameters:
      input - A recipe input.
      Returns:
      The simulated output, or null if no valid recipe for the given input was found.