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.
import crafttweaker . api.util.math . Vec3;
Vec3
implements the following interfaces:
Position
// new Vec3(x as double, y as double, z as double);
new Vec3(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
// Vec3.add(other as Vec3) as Vec3;
Return Type:
Vec3
// Vec3.add(x as double, y as double, z as double) as Vec3;
myVec3 . add(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Return Type:
Vec3
// Vec3.closerThan(position as Position, maxDistance as double) as bool;
myVec3 . closerThan(myPosition, myDouble);
Parameters:
maxDistance: double
Type: double
Return Type:
bool
// Vec3.cross(other as Vec3) as Vec3;
Return Type:
Vec3
// Vec3.distanceTo(other as Vec3) as double;
myVec3 . distanceTo(myVec3);
Return Type:
double
// Vec3.distanceToSqr(other as Vec3) as double;
myVec3 . distanceToSqr(myVec3);
Return Type:
double
// Vec3.distanceToSqr(x as double, y as double, z as double) as double;
myVec3 . distanceToSqr(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Return Type:
double
// Vec3.dot(other as Vec3) as double;
Return Type:
double
// Vec3.getValue(axis as Axis) as double;
Return Type:
double
// Vec3.horizontalDistance as double
myVec3 . horizontalDistance
Return Type:
double
// Vec3.horizontalDistance() as double;
myVec3 . horizontalDistance();
Return Type:
double
// Vec3.horizontalDistanceSqr as double
myVec3 . horizontalDistanceSqr
Return Type:
double
// Vec3.horizontalDistanceSqr() as double;
myVec3 . horizontalDistanceSqr();
Return Type:
double
// Vec3.length() as double;
Return Type:
double
// Vec3.lengthSqr as double
Return Type:
double
// Vec3.lengthSqr() as double;
Return Type:
double
// Vec3.lerp(other as Vec3, value as double) as Vec3;
myVec3 . lerp(myVec3, myDouble);
Parameters:
value: double
Type: double
Return Type:
Vec3
// Vec3.multiply(other as Vec3) as Vec3;
Return Type:
Vec3
// Vec3.multiply(x as double, y as double, z as double) as Vec3;
myVec3 . multiply(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Return Type:
Vec3
// Vec3.normalize as Vec3
Return Type:
Vec3
// Vec3.normalize() as Vec3;
Return Type:
Vec3
// Vec3.reverse() as Vec3;
Return Type:
Vec3
// Vec3.scale(scalar as double) as Vec3;
Parameters:
scalar: double
Type: double
Return Type:
Vec3
// Vec3.subtract(other as Vec3) as Vec3;
Return Type:
Vec3
// Vec3.subtract(x as double, y as double, z as double) as Vec3;
myVec3 . subtract(myDouble, myDouble, myDouble);
Parameters:
x: double
Type: double
y: double
Type: double
z: double
Type: double
Return Type:
Vec3
// Vec3.vectorTo(other as Vec3) as Vec3;
Return Type:
Vec3
// Vec3.xRot(pitch as float) as Vec3;
Return Type:
Vec3
// Vec3.yRot(yaw as float) as Vec3;
Return Type:
Vec3
// Vec3.zRot(roll as float) as Vec3;
Return Type:
Vec3