async Partial Search
Runs a partial recipe search asynchronously and returns a future that resolves to all PartialSearchResult entries whose recipes are at least partially satisfied by the items currently placed in the crafting grid.
Recipes that implement io.github.sakaki_aruka.customcrafter.recipe.UnPartialSearchableRecipe and recipes whose minimum required slot count exceeds the number of items in view are excluded before any per-recipe work is dispatched.
The behaviour of searchQuery fields:
Search.SearchQuery.searchMode — when Search.SearchQuery.SearchMode.ONLY_FIRST, the future completes as soon as the first non-empty per-recipe result is available and the remaining tasks are cancelled.
Search.SearchQuery.asyncContext — propagated to per-recipe evaluations so that predicate execution and interruption signals are handled consistently.
vanillaSearchMode— not applicable; partial search is custom-recipe only.
Return
A CompletableFuture that resolves to the list of partial-search results. The list is empty when no recipe even partially matches the current input.
Since
5.0.21
Parameters
UUID of the player whose crafting grid is being evaluated.
Snapshot of the crafting grid to match against.
Controls search behaviour such as result mode and async context. Defaults to Search.SearchQuery.ASYNC_DEFAULT.
The pool of recipes to search. Defaults to all registered custom recipes via CustomCrafterAPI.getRecipes.
Throws
if view contains zero items or more than 36 items.