Invalid leaf directive! `since`

CustomFilteringRule

Link to customfilteringrule

Filters recipes according to a custom set of rules.

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.recipe.replacement.type.CustomFilteringRule;

已实现的接口

Link to 已实现的接口

CustomFilteringRule implements the following interfaces. That means all methods defined in these interfaces are also available in CustomFilteringRule

Name: of

Creates a new rule filtering recipes based on the given BiPredicate<T,U>.

The predicate's first argument represents the IRecipeManager<T> used by the recipe, whereas the second
argument is the Recipe<C> 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.
Return Type: CustomFilteringRule

ZenScript
Copy
CustomFilteringRule.of(predicate as BiPredicate<IRecipeManager,Recipe>) as CustomFilteringRule
参数类型描述
参数
predicate
类型
BiPredicate<IRecipeManager,Recipe>
描述
The predicate for checking.

Name: of

Creates a new rule filtering recipes based on the given Predicate<T>.

The predicate gets access to the Recipe<C> instance directly, allowing for it to check directly elements
that might be required.

Returns: A rule carrying out what has been specified.
Return Type: CustomFilteringRule

ZenScript
Copy
CustomFilteringRule.of(predicate as Predicate<Recipe>) as CustomFilteringRule
参数类型描述
参数
predicate
类型
Predicate<Recipe>
描述
The predicate for checking.