Interface RecipeDisplayResultIdExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents logic for extracting all relevant ids from a recipe display's result slot display.
-
Method Summary
Modifier and TypeMethodDescriptionextract(SlotDisplay result, RegistryAccess registryAccess, Registry<Item> itemRegistries, ContextMap recipeContext) Returns all relevant ids from a recipe display's result slot display.static <TYPE> RecipeDisplayResultIdExtractorforRegisteredType(DisplayContentsFactory<? extends TypedInstance<TYPE>> contentsFactory, ResourceKey<? extends Registry<TYPE>> registryName) Helper to create an id extractor for registered elements.
-
Method Details
-
extract
Stream<Identifier> extract(SlotDisplay result, RegistryAccess registryAccess, Registry<Item> itemRegistries, ContextMap recipeContext) Returns all relevant ids from a recipe display's result slot display.- Parameters:
result- The result slot display from the recipe display being checked.registryAccess- Current registry access.itemRegistries- Cached lookup of the item registries.recipeContext- Context data for recipes.- Returns:
- all relevant ids from a recipe display's result slot display
- See Also:
-
forRegisteredType
static <TYPE> RecipeDisplayResultIdExtractor forRegisteredType(DisplayContentsFactory<? extends TypedInstance<TYPE>> contentsFactory, ResourceKey<? extends Registry<TYPE>> registryName) Helper to create an id extractor for registered elements.- Parameters:
contentsFactory- Factory to resolve the typed instances from the result display.registryName- Name of the registry for objects of the provided type.
-