Importare la Classe

Link to importare-la-classe

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.Vector3f;

Name: add

ZenScript
Copy
Vector3f.add(other as Vector3f)
ParametroTipo
Parametro
other
Tipo
Vector3f

Name: add

ZenScript
Copy
Vector3f.add(x as float, y as float, z as float)
ParametroTipo
Parametro
x
Tipo
float
Parametro
y
Tipo
float
Parametro
z
Tipo
float

Name: clamp

ZenScript
Copy
Vector3f.clamp(min as float, max as float)
ParametroTipo
Parametro
min
Tipo
float
Parametro
max
Tipo
float

Name: clamp

ZenScript
Copy
Vector3f.clamp(min as Vector3f, max as Vector3f)
ParametroTipo
Parametro
min
Tipo
Vector3f
Parametro
max
Tipo
Vector3f

Name: copy

Return Type: Vector3f

ZenScript
Copy
// Vector3f.copy() as Vector3f

myVector3f.copy();

Name: cross

ZenScript
Copy
Vector3f.cross(other as Vector3f)
ParametroTipo
Parametro
other
Tipo
Vector3f

Name: dot

Return Type: float

ZenScript
Copy
Vector3f.dot(other as Vector3f) as float
ParametroTipo
Parametro
other
Tipo
Vector3f

Name: lerp

ZenScript
Copy
Vector3f.lerp(max as Vector3f, value as float)
ParametroTipo
Parametro
max
Tipo
Vector3f
Parametro
valore
Tipo
float

Name: load

ZenScript
Copy
Vector3f.load(other as Vector3f)
ParametroTipo
Parametro
other
Tipo
Vector3f

Name: mul

ZenScript
Copy
Vector3f.mul(scalar as float)
ParametroTipo
Parametro
scalar
Tipo
float

Name: mul

ZenScript
Copy
Vector3f.mul(x as float, y as float, z as float)
ParametroTipo
Parametro
x
Tipo
float
Parametro
y
Tipo
float
Parametro
z
Tipo
float

Name: normalize

Return Type: boolean

ZenScript
Copy
// Vector3f.normalize() as boolean

myVector3f.normalize();

Name: rotation

Return Type: Quaternion

ZenScript
Copy
Vector3f.rotation(rads as float) as Quaternion
ParametroTipo
Parametro
rads
Tipo
float

Name: rotationDegrees

Return Type: Quaternion

ZenScript
Copy
Vector3f.rotationDegrees(degrees as float) as Quaternion
ParametroTipo
Parametro
degrees
Tipo
float

Name: setValues

ZenScript
Copy
Vector3f.setValues(x as float, y as float, z as float)
ParametroTipo
Parametro
x
Tipo
float
Parametro
y
Tipo
float
Parametro
z
Tipo
float

Name: sub

ZenScript
Copy
Vector3f.sub(other as Vector3f)
ParametroTipo
Parametro
other
Tipo
Vector3f

Name: transform

ZenScript
Copy
Vector3f.transform(matrix as Matrix3f)
ParametroTipo
Parametro
matrix
Tipo
Matrix3f

Name: transform

ZenScript
Copy
Vector3f.transform(quaternion as Quaternion)
ParametroTipo
Parametro
quaternion
Tipo
Quaternion

Name: x

Return Type: float

ZenScript
Copy
// Vector3f.x() as float

myVector3f.x();

Name: y

Return Type: float

ZenScript
Copy
// Vector3f.y() as float

myVector3f.y();

Name: z

Return Type: float

ZenScript
Copy
// Vector3f.z() as float

myVector3f.z();
NomeTipoHa GetterHa Setter
Nome
x
Tipo
float
Ha Getter
Ha Setter
no
Nome
y
Tipo
float
Ha Getter
Ha Setter
no
Nome
z
Tipo
float
Ha Getter
Ha Setter
no