Vec3
Link to vec3
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 Copyimport 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
Constructors
Link to constructors
ZenScript Copynew Vec3(x as double, y as double, z as double) as Vec3
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Methoden
Link to methoden
Name: add
Return Type: Vec3
ZenScript CopyVec3.add(x as double, y as double, z as double) as Vec3
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Name: closerThan
Return Type: boolean
ZenScript CopyVec3.closerThan(position as Position, maxDistance as double) as boolean
Parameter | Type |
---|---|
Parameter position | Type Position |
Parameter maxDistance | Type double |
Name: distanceTo
Return Type: double
ZenScript CopyVec3.distanceTo(other as Vec3) as double
Parameter | Type |
---|---|
Parameter other | Type Vec3 |
Name: distanceToSqr
Return Type: double
ZenScript CopyVec3.distanceToSqr(other as Vec3) as double
Parameter | Type |
---|---|
Parameter other | Type Vec3 |
Name: distanceToSqr
Return Type: double
ZenScript CopyVec3.distanceToSqr(x as double, y as double, z as double) as double
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Name: dot
Return Type: double
ZenScript CopyVec3.dot(other as Vec3) as double
Parameter | Type |
---|---|
Parameter other | Type Vec3 |
Name: getValue
Return Type: double
ZenScript CopyVec3.getValue(axis as Axis) as double
Parameter | Type |
---|---|
Parameter axis | Type Axis |
Name: horizontalDistance
Return Type: double
ZenScript Copy// Vec3.horizontalDistance() as double
myVec3.horizontalDistance();
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: multiply
Return Type: Vec3
ZenScript CopyVec3.multiply(x as double, y as double, z as double) as Vec3
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Name: scale
Return Type: Vec3
ZenScript CopyVec3.scale(scalar as double) as Vec3
Parameter | Type |
---|---|
Parameter scalar | Type double |
Name: subtract
Return Type: Vec3
ZenScript CopyVec3.subtract(x as double, y as double, z as double) as Vec3
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Name: xRot
Return Type: Vec3
ZenScript CopyVec3.xRot(pitch as float) as Vec3
Parameter | Type |
---|---|
Parameter pitch | Type float |
Name: yRot
Return Type: Vec3
ZenScript CopyVec3.yRot(yaw as float) as Vec3
Parameter | Type |
---|---|
Parameter yaw | Type float |
Name: zRot
Return Type: Vec3
ZenScript CopyVec3.zRot(roll as float) as Vec3
Parameter | Type |
---|---|
Parameter roll | Type float |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name horizontalDistance | Type double | Has Getter true | Has Setter false |
Name horizontalDistanceSqr | Type double | Has Getter true | Has Setter false |
Name length | Type double | Has Getter true | Has Setter false |
Name lengthSqr | Type double | Has Getter true | Has Setter false |
Name normalize | Type Vec3 | Has Getter true | Has Setter false |
Name reverse | Type Vec3 | Has Getter true | Has Setter false |