Class NotFilteringRule
java.lang.Object
com.blamejared.crafttweaker.api.recipe.replacement.type.NotFilteringRule
- All Implemented Interfaces:
IFilteringRule,ITargetingFilter
Inverts a filtering rule.
This rule should be used sparingly as it incurs a performance loss due to having to loop over all recipes multiple times to perform the inversion of the rule.
- 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.describe()Describes the actions of this filtering rule in a human-readable form, for log output.static NotFilteringRuleof(IFilteringRule rule) Inverts the specified rule.
-
Method Details
-
of
Inverts the specified rule.- Parameters:
rule- The rule to invert.- Returns:
- The inverted rule.
- Since:
- 10.0.0
-
castFilter
public Stream<net.minecraft.world.item.crafting.RecipeHolder<?>> castFilter(Stream<net.minecraft.world.item.crafting.RecipeHolder<?>> 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.
-