Interface ITargetingFilter
- All Known Subinterfaces:
IFilteringRule
- All Known Implementing Classes:
ComponentFilteringRule,CustomFilteringRule,ModsFilteringRule,NameFilteringRule,NotFilteringRule,TypeFilteringRule
Represents a filter applied to the recipe list.
This filter is applied to Replacer instances and allows for the removal of certain set of recipes from
being able to be inspected by a replacer, or for additional global executions to be performed. Note that the filter
is positive, meaning that the filter determines which recipes are allowed to be examined by a
replacer, not the opposite.
Script writers should refer to IFilteringRule instead.
This is a FunctionalInterface whose functional method is castFilter(Stream).
- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionStream<net.minecraft.world.item.crafting.RecipeHolder<?>> castFilter(Stream<net.minecraft.world.item.crafting.RecipeHolder<?>> allRecipes) Casts the filter onto the givenStreamofRecipes.
-
Method Details
-
castFilter
Stream<net.minecraft.world.item.crafting.RecipeHolder<?>> castFilter(Stream<net.minecraft.world.item.crafting.RecipeHolder<?>> allRecipes) Casts the filter onto the givenStreamofRecipes.The filter can perform any operation required, which range from filtering, to simple mapping, to peeking as needed.
- Parameters:
allRecipes- TheStreamthat needs to be filtered.- Returns:
- The mutated stream.
- Since:
- 10.0.0
-