Class RecipeFinder

java.lang.Object
com.simibubi.create.foundation.utility.recipe.RecipeFinder

public class RecipeFinder extends Object
Utility for searching through a world's recipe collection. Non-dynamic conditions can be split off into an initial search for caching intermediate results.
  • Field Details

  • Constructor Details

    • RecipeFinder

      public RecipeFinder()
  • Method Details

    • get

      public static List<net.minecraft.world.item.crafting.Recipe<?>> get(@Nullable Object cacheKey, net.minecraft.world.level.Level world, Predicate<net.minecraft.world.item.crafting.Recipe<?>> conditions)
      Find all IRecipes matching the condition predicate. If this search is made more than once, using the same object instance as the cacheKey will retrieve the cached result from the first time.
      Parameters:
      cacheKey - (can be null to prevent the caching)
      world -
      conditions -
      Returns:
      A started search to continue with more specific conditions.