DistancePredicate

Link to distancepredicate

Importing the class

Link to 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.

ZenScript
Copy
import crafttweaker.api.predicate.DistancePredicate;

Extending Record

Link to extending-record

DistancePredicate extends Record. That means all methods available in Record are also available in DistancePredicate

Link to absoluteDistance

Name: absoluteDistance

Return Type: DistancePredicate

ZenScript
Copy
DistancePredicate.absoluteDistance(bounds as DoubleMinMaxBoundsPredicate) as DistancePredicate
ParameterType
Parameter
bounds
Type
DoubleMinMaxBoundsPredicate

Name: create

Return Type: DistancePredicate

ZenScript
Copy
DistancePredicate.create(x as DoubleMinMaxBoundsPredicate, y as DoubleMinMaxBoundsPredicate, z as DoubleMinMaxBoundsPredicate, horizontal as DoubleMinMaxBoundsPredicate, absolute as DoubleMinMaxBoundsPredicate) as DistancePredicate
ParameterType
Parameter
x
Type
DoubleMinMaxBoundsPredicate
Parameter
y
Type
DoubleMinMaxBoundsPredicate
Parameter
z
Type
DoubleMinMaxBoundsPredicate
Parameter
horizontal
Type
DoubleMinMaxBoundsPredicate
Parameter
absolute
Type
DoubleMinMaxBoundsPredicate

Link to horizontalDistance

Name: horizontalDistance

Return Type: DistancePredicate

ZenScript
Copy
DistancePredicate.horizontalDistance(bounds as DoubleMinMaxBoundsPredicate) as DistancePredicate
ParameterType
Parameter
bounds
Type
DoubleMinMaxBoundsPredicate

Link to verticalDistance

Name: verticalDistance

Return Type: DistancePredicate

ZenScript
Copy
DistancePredicate.verticalDistance(bounds as DoubleMinMaxBoundsPredicate) as DistancePredicate
ParameterType
Parameter
bounds
Type
DoubleMinMaxBoundsPredicate

Name: xyz

Return Type: DistancePredicate

ZenScript
Copy
DistancePredicate.xyz(x as DoubleMinMaxBoundsPredicate, y as DoubleMinMaxBoundsPredicate, z as DoubleMinMaxBoundsPredicate) as DistancePredicate
ParameterType
Parameter
x
Type
DoubleMinMaxBoundsPredicate
Parameter
y
Type
DoubleMinMaxBoundsPredicate
Parameter
z
Type
DoubleMinMaxBoundsPredicate