Cloneable
, ConfigurationSerializable
public class BlockVector extends Vector
Constructor | Description |
---|---|
BlockVector() |
Construct the vector with all components as 0.
|
BlockVector(double x,
double y,
double z) |
Construct the vector with provided double components.
|
BlockVector(float x,
float y,
float z) |
Construct the vector with provided float components.
|
BlockVector(int x,
int y,
int z) |
Construct the vector with provided integer components.
|
BlockVector(Vector vec) |
Construct the vector with another vector.
|
Modifier and Type | Method | Description |
---|---|---|
BlockVector |
clone() |
Get a new block vector.
|
static BlockVector |
deserialize(Map<String,Object> args) |
|
boolean |
equals(Object obj) |
Checks if another object is equivalent.
|
int |
hashCode() |
Returns a hash code for this vector.
|
finalize, getClass, notify, notifyAll, wait, wait, wait
add, angle, checkFinite, copy, crossProduct, distance, distanceSquared, divide, dot, getBlockX, getBlockY, getBlockZ, getCrossProduct, getEpsilon, getMaximum, getMidpoint, getMinimum, getRandom, getX, getY, getZ, isInAABB, isInSphere, isNormalized, length, lengthSquared, midpoint, multiply, multiply, multiply, multiply, normalize, rotateAroundAxis, rotateAroundNonUnitAxis, rotateAroundX, rotateAroundY, rotateAroundZ, serialize, setX, setX, setX, setY, setY, setY, setZ, setZ, setZ, subtract, toBlockVector, toLocation, toLocation, toString, zero
public BlockVector()
public BlockVector(@NotNull Vector vec)
vec
- The other vector.public BlockVector(int x, int y, int z)
x
- X componenty
- Y componentz
- Z componentpublic BlockVector(double x, double y, double z)
x
- X componenty
- Y componentz
- Z componentpublic BlockVector(float x, float y, float z)
x
- X componenty
- Y componentz
- Z componentpublic boolean equals(Object obj)
public int hashCode()
public BlockVector clone()
@NotNull public static BlockVector deserialize(@NotNull Map<String,Object> args)
Copyright © 2020. All rights reserved.