Class TypeFilteringRule
java.lang.Object
com.blamejared.crafttweaker.api.recipe.replacement.type.TypeFilteringRule
- All Implemented Interfaces:
IFilteringRule,ITargetingFilter
Filters recipes based on their
IRecipeManager.- Since:
- 10.0.0
-
Method Summary
Modifier and TypeMethodDescriptionStream<? extends net.minecraft.world.item.crafting.Recipe<?>>castFilter(Stream<? extends net.minecraft.world.item.crafting.Recipe<?>> allRecipes) Casts the filter onto the givenStreamofRecipes.describe()Describes the actions of this filtering rule in a human-readable form, for log output.static IFilteringRuleof(IRecipeManager<?>... managers) Creates a new rule filtering recipes based on the given managers.
-
Method Details
-
of
Creates a new rule filtering recipes based on the given managers.- Parameters:
managers- The managers that should be filtered.- Returns:
- A new rule carrying out the specified operation.
- Since:
- 10.0.0
-
castFilter
public Stream<? extends net.minecraft.world.item.crafting.Recipe<?>> castFilter(Stream<? extends net.minecraft.world.item.crafting.Recipe<?>> allRecipes) Description copied from interface:ITargetingFilterCasts the filter onto the givenStreamofRecipes.The filter can perform any operation required, which range from filtering, to simple mapping, to peeking as needed.
- Specified by:
castFilterin interfaceITargetingFilter- Parameters:
allRecipes- TheStreamthat needs to be filtered.- Returns:
- The mutated stream.
-
describe
Description copied from interface:IFilteringRuleDescribes the actions of this filtering rule in a human-readable form, for log output.- Specified by:
describein interfaceIFilteringRule- Returns:
- A human-readable description of this rule.
-