Vector3f
Link to vector3f
导入类
Link to 导入类
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 Copyimport crafttweaker.api.util.math.Vector3f;
使用方式
Link to 使用方式
Name: add
ZenScript CopyVector3f.add(x as float, y as float, z as float)
参数 | 类型 |
---|---|
参数 x | 类型 float |
参数 y | 类型 float |
参数 z | 类型 float |
Name: clamp
ZenScript CopyVector3f.clamp(min as float, max as float)
参数 | 类型 |
---|---|
参数 min | 类型 float |
参数 max | 类型 float |
Name: dot
Return Type: float
ZenScript CopyVector3f.dot(other as Vector3f) as float
参数 | 类型 |
---|---|
参数 other | 类型 Vector3f |
Name: lerp
ZenScript CopyVector3f.lerp(max as Vector3f, value as float)
参数 | 类型 |
---|---|
参数 max | 类型 Vector3f |
参数 value | 类型 float |
Name: mul
ZenScript CopyVector3f.mul(scalar as float)
参数 | 类型 |
---|---|
参数 scalar | 类型 float |
Name: mul
ZenScript CopyVector3f.mul(x as float, y as float, z as float)
参数 | 类型 |
---|---|
参数 x | 类型 float |
参数 y | 类型 float |
参数 z | 类型 float |
Name: normalize
Return Type: boolean
ZenScript Copy// Vector3f.normalize() as boolean
myVector3f.normalize();
Name: rotation
Return Type: Quaternion
ZenScript CopyVector3f.rotation(rads as float) as Quaternion
参数 | 类型 |
---|---|
参数 rads | 类型 float |
Name: rotationDegrees
Return Type: Quaternion
ZenScript CopyVector3f.rotationDegrees(degrees as float) as Quaternion
参数 | 类型 |
---|---|
参数 degrees | 类型 float |
Name: setValues
ZenScript CopyVector3f.setValues(x as float, y as float, z as float)
参数 | 类型 |
---|---|
参数 x | 类型 float |
参数 y | 类型 float |
参数 z | 类型 float |
Name: transform
ZenScript CopyVector3f.transform(quaternion as Quaternion)
参数 | 类型 |
---|---|
参数 quaternion | 类型 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();
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 x | 类型 float | 可获得 true | 可设置 false |
名称 y | 类型 float | 可获得 true | 可设置 false |
名称 z | 类型 float | 可获得 true | 可设置 false |