CustomFilteringRule
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.recipe.replacement.type.CustomFilteringRule;
Description
Filters recipes according to a custom set of rules.Implements
CustomFilteringRule
implements the following interfaces:
IFilteringRule
,ITargetingFilter
Members
The predicate gets access to the Recipe
instance directly, allowing for it to check directly elements that might be required.
Returns: A rule carrying out what has been specified.
CustomFilteringRule.of(myPredicate);
Parameters:
Return Type:
CustomFilteringRule
The predicate's first argument represents the IRecipeManager
used by the recipe, whereas the second argument is the Recipe
instance directly, allowing for it to check properties that might be required or perform additional manager-specific lookups.
Returns: A rule carrying out what has been specified.
// CustomFilteringRule.of(predicate as BiPredicate<IRecipeManager<?>, Recipe<?>>) as CustomFilteringRule;CustomFilteringRule.of(myBiPredicate);
Parameters:
predicate: BiPredicate<IRecipeManager<?>, Recipe<?>>
Type: BiPredicate<IRecipeManager<?>, Recipe<?>>
- The predicate for checking.
Return Type:
CustomFilteringRule