Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Filterable

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.

script.zs
import crafttweaker.api.server.Filterable;

Members

filtered() as T?
script.zs
// Filterable<T>.filtered<T>() as T?;
myFilterable.filtered<T>();

Return Type: T?

getFiltered(filtered as bool) as T
script.zs
// Filterable<T>.getFiltered<T>(filtered as bool) as T;
myFilterable.getFiltered<T>(myBool);

Parameters:

filtered Type: bool

Return Type: T

map(mapper as function(r as U) as T) as Filterable<U>
script.zs
// Filterable<T>.map<T, U>(mapper as function(r as U) as T) as Filterable<U>;
myFilterable.map<T, U>(myFunction);

Parameters:

mapper Type: function(r as U) as T

Return Type: Filterable<U>

static of<T>(raw as T, filtered as T?) as Filterable<T>
script.zs
// Filterable<T>.of<T>(raw as T, filtered as T?) as Filterable<T>;
Filterable<T>.of<T>(myT, myT);

Parameters:

raw Type: T
filtered Type: T?

Return Type: Filterable<T>

raw() as T
script.zs
// Filterable<T>.raw<T>() as T;
myFilterable.raw<T>();

Return Type: T

resolve(resolver as function(r as Optional<U>) as T) as Optional<Filterable<U>>
script.zs
// Filterable<T>.resolve<T, U>(resolver as function(r as Optional<U>) as T) as Optional<Filterable<U>>;
myFilterable.resolve<T, U>(myFunction);

Parameters:

resolver Type: function(r as Optional<U>) as T

Return Type: Optional<Filterable<U>>