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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.server.packs.resources.ResourceManagerReloadListener
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<net.minecraft.world.item.crafting.Recipe<?>>
    get(Object cacheKey, net.minecraft.world.level.Level world, Predicate<net.minecraft.world.item.crafting.Recipe<?>> conditions)
    Find all IRecipes matching the condition predicate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LISTENER

      public static final net.minecraft.server.packs.resources.ResourceManagerReloadListener LISTENER
  • 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.