Diese Klasse importieren

Link to diese-klasse-importieren

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.util.math.Vec3;

Implemented Interfaces

Link to implemented-interfaces

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

ZenScript
Copy
new Vec3(x as double, y as double, z as double) as Vec3
ParameterTypeBeschreibung
Parameter
x
Type
double
Beschreibung
No description provided
Parameter
y
Type
double
Beschreibung
No description provided
Parameter
z
Type
double
Beschreibung
No description provided

Name: add

Return Type: Vec3

ZenScript
Copy
Vec3.add(other as Vec3) as Vec3
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: add

Return Type: Vec3

ZenScript
Copy
Vec3.add(x as double, y as double, z as double) as Vec3
ParameterTypeBeschreibung
Parameter
x
Type
double
Beschreibung
No Description Provided
Parameter
y
Type
double
Beschreibung
No Description Provided
Parameter
z
Type
double
Beschreibung
No Description Provided

Name: closerThan

Return Type: boolean

ZenScript
Copy
Vec3.closerThan(position as Position, maxDistance as double) as boolean
ParameterTypeBeschreibung
Parameter
position
Type
Position
Beschreibung
No Description Provided
Parameter
maxDistance
Type
double
Beschreibung
No Description Provided

Name: cross

Return Type: Vec3

ZenScript
Copy
Vec3.cross(other as Vec3) as Vec3
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: distanceTo

Return Type: double

ZenScript
Copy
Vec3.distanceTo(other as Vec3) as double
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: distanceToSqr

Return Type: double

ZenScript
Copy
Vec3.distanceToSqr(other as Vec3) as double
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: distanceToSqr

Return Type: double

ZenScript
Copy
Vec3.distanceToSqr(x as double, y as double, z as double) as double
ParameterTypeBeschreibung
Parameter
x
Type
double
Beschreibung
No Description Provided
Parameter
y
Type
double
Beschreibung
No Description Provided
Parameter
z
Type
double
Beschreibung
No Description Provided

Name: dot

Return Type: double

ZenScript
Copy
Vec3.dot(other as Vec3) as double
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: getValue

Return Type: double

ZenScript
Copy
Vec3.getValue(axis as Axis) as double
ParameterTypeBeschreibung
Parameter
axis
Type
Axis
Beschreibung
No Description Provided

Link to horizontalDistance

Name: horizontalDistance

Return Type: double

ZenScript
Copy
// Vec3.horizontalDistance() as double

myVec3.horizontalDistance();

Link to horizontalDistanceSqr

Name: horizontalDistanceSqr

Return Type: double

ZenScript
Copy
// Vec3.horizontalDistanceSqr() as double

myVec3.horizontalDistanceSqr();

Name: length

Return Type: double

ZenScript
Copy
// Vec3.length() as double

myVec3.length();

Name: lengthSqr

Return Type: double

ZenScript
Copy
// Vec3.lengthSqr() as double

myVec3.lengthSqr();

Name: lerp

Return Type: Vec3

ZenScript
Copy
Vec3.lerp(other as Vec3, value as double) as Vec3
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided
Parameter
value
Type
double
Beschreibung
No Description Provided

Name: multiply

Return Type: Vec3

ZenScript
Copy
Vec3.multiply(other as Vec3) as Vec3
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: multiply

Return Type: Vec3

ZenScript
Copy
Vec3.multiply(x as double, y as double, z as double) as Vec3
ParameterTypeBeschreibung
Parameter
x
Type
double
Beschreibung
No Description Provided
Parameter
y
Type
double
Beschreibung
No Description Provided
Parameter
z
Type
double
Beschreibung
No Description Provided

Name: normalize

Return Type: Vec3

ZenScript
Copy
// Vec3.normalize() as Vec3

myVec3.normalize();

Name: reverse

Return Type: Vec3

ZenScript
Copy
// Vec3.reverse() as Vec3

myVec3.reverse();

Name: scale

Return Type: Vec3

ZenScript
Copy
Vec3.scale(scalar as double) as Vec3
ParameterTypeBeschreibung
Parameter
scalar
Type
double
Beschreibung
No Description Provided

Name: subtract

Return Type: Vec3

ZenScript
Copy
Vec3.subtract(other as Vec3) as Vec3
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: subtract

Return Type: Vec3

ZenScript
Copy
Vec3.subtract(x as double, y as double, z as double) as Vec3
ParameterTypeBeschreibung
Parameter
x
Type
double
Beschreibung
No Description Provided
Parameter
y
Type
double
Beschreibung
No Description Provided
Parameter
z
Type
double
Beschreibung
No Description Provided

Name: vectorTo

Return Type: Vec3

ZenScript
Copy
Vec3.vectorTo(other as Vec3) as Vec3
ParameterTypeBeschreibung
Parameter
other
Type
Vec3
Beschreibung
No Description Provided

Name: xRot

Return Type: Vec3

ZenScript
Copy
Vec3.xRot(pitch as float) as Vec3
ParameterTypeBeschreibung
Parameter
pitch
Type
float
Beschreibung
No Description Provided

Name: yRot

Return Type: Vec3

ZenScript
Copy
Vec3.yRot(yaw as float) as Vec3
ParameterTypeBeschreibung
Parameter
yaw
Type
float
Beschreibung
No Description Provided

Name: zRot

Return Type: Vec3

ZenScript
Copy
Vec3.zRot(roll as float) as Vec3
ParameterTypeBeschreibung
Parameter
roll
Type
float
Beschreibung
No Description Provided
NameTypeHas GetterHas SetterBeschreibung
Name
horizontalDistance
Type
double
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
horizontalDistanceSqr
Type
double
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
length
Type
double
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
lengthSqr
Type
double
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
normalize
Type
Vec3
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
reverse
Type
Vec3
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided