asyncPartialSearch

fun asyncPartialSearch(crafterId: UUID, view: CraftView, searchQuery: Search.SearchQuery = Search.SearchQuery.ASYNC_DEFAULT, sourceRecipes: List<CRecipe> = CustomCrafterAPI.getRecipes()): CompletableFuture<List<PartialSearch.PartialSearchResult>>

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:

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

crafterId

UUID of the player whose crafting grid is being evaluated.

view

Snapshot of the crafting grid to match against.

searchQuery

Controls search behaviour such as result mode and async context. Defaults to Search.SearchQuery.ASYNC_DEFAULT.

sourceRecipes

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.