FluidPredicate

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.predicate.FluidPredicate;

Members

static create() as Builder
script.zs
// FluidPredicate.create() as FluidPredicateBuilder;
FluidPredicate.create();

Return Type: FluidPredicateBuilder

static create(fluid as Fluid) as Builder
script.zs
// FluidPredicate.create(fluid as Fluid) as FluidPredicateBuilder;
FluidPredicate.create(myFluid);

Parameters:

fluid Type: Fluid

Return Type: FluidPredicateBuilder

static create(tag as KnownTag<Fluid>) as Builder
script.zs
// FluidPredicate.create(tag as KnownTag<Fluid>) as FluidPredicateBuilder;
FluidPredicate.create(myKnownTag);

Parameters:

tag Type: KnownTag<Fluid>

Return Type: FluidPredicateBuilder

matches(level as ServerLevel, pos as BlockPos) as bool
script.zs
// FluidPredicate.matches(level as ServerLevel, pos as BlockPos) as bool;
myFluidPredicate.matches(myServerLevel, myBlockPos);

Parameters:

level Type: ServerLevel
pos Type: BlockPos

Return Type: bool