|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.util.Vector org.bukkit.util.BlockVector
public class BlockVector
A vector with a hash function that floors the X, Y, Z components, a la BlockVector in WorldEdit. BlockVectors can be used in hash sets and hash maps. Be aware that BlockVectors are mutable, but it is important that BlockVectors are never changed once put into a hash set or hash map.
Field Summary |
---|
Fields inherited from class org.bukkit.util.Vector |
---|
x, y, z |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.bukkit.util.Vector |
---|
add, angle, copy, crossProduct, distance, distanceSquared, divide, dot, getBlockX, getBlockY, getBlockZ, getEpsilon, getMaximum, getMidpoint, getMinimum, getRandom, getX, getY, getZ, isInAABB, isInSphere, length, lengthSquared, midpoint, multiply, multiply, multiply, multiply, normalize, serialize, setX, setX, setX, setY, setY, setY, setZ, setZ, setZ, subtract, toBlockVector, toLocation, toLocation, toString, zero |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BlockVector()
public BlockVector(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 componentMethod Detail |
---|
public boolean equals(Object obj)
equals
in class Vector
obj
- The other object
public int hashCode()
hashCode
in class Vector
public BlockVector clone()
clone
in class Vector
public static BlockVector deserialize(Map<String,Object> args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |