ModsFilteringRule

Filters recipes that have been created by the given set of mods.

Every mod is identified according to its mod id. Recipes have been created by a mod if their name as determined by Recipe<C>#getId() has that mod id as the namespace.

Importing the class

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.

script.zs
import crafttweaker.api.recipe.replacement.type.ModsFilteringRule;

Implemented Interfaces

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

Static Methods

Creates a new rule filtering recipes based on the given mod ids.

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

script.zs
ModsFilteringRule.of(modIds as string[]) as IFilteringRule
ParameterTypeDescription
Parameter
modIds
Type
string[]
Description
The mod ids to check for.

Creates a new rule filtering recipes based on the ids of the given Mods.

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

script.zs
ModsFilteringRule.of(mods as Mod[]) as IFilteringRule
ParameterTypeDescription
Parameter
mods
Type
Mod[]
Description
The mods to check for.