Package api.util
Class Vec3i
java.lang.Object
api.util.Vec3i
- All Implemented Interfaces:
Comparable<Vec3i>
- Direct Known Subclasses:
ImmutableBlockPos
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcrossProduct(Vec3i vec) Calculate the cross product of this and the given VectordoubledistanceSq(double toX, double toY, double toZ) Calculate squared distance to the given coordinatesdoubledistanceSq(Vec3i to) Calculate squared distance to the given VectordoubledistanceSqToCenter(double xIn, double yIn, double zIn) Compute square of distance from point x, y, z to center of this BlockbooleanintgetX()Get the X coordinateintgetY()Get the Y coordinateintgetZ()Get the Z coordinateinthashCode()toString()
-
Field Details
-
NULL_VECTOR
The Null vector constant (0, 0, 0)
-
-
Constructor Details
-
Vec3i
public Vec3i(int xIn, int yIn, int zIn) -
Vec3i
public Vec3i(double xIn, double yIn, double zIn)
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareToin interfaceComparable<Vec3i>
-
getX
public int getX()Get the X coordinate -
getY
public int getY()Get the Y coordinate -
getZ
public int getZ()Get the Z coordinate -
crossProduct
Calculate the cross product of this and the given Vector -
distanceSq
public double distanceSq(double toX, double toY, double toZ) Calculate squared distance to the given coordinates -
distanceSqToCenter
public double distanceSqToCenter(double xIn, double yIn, double zIn) Compute square of distance from point x, y, z to center of this Block -
distanceSq
Calculate squared distance to the given Vector -
toString
-