Package org.bukkit.util
Class BlockVector
java.lang.Object
org.bukkit.util.Vector
org.bukkit.util.BlockVector
- All Implemented Interfaces:
- Cloneable,- ConfigurationSerializable
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
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct 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(@NotNull Vector vec) Construct the vector with another vector.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Get a new block vector.static @NotNull BlockVectordeserialize(@NotNull Map<String, Object> args) booleanChecks if another object is equivalent.inthashCode()Returns a hash code for this vector.Methods inherited from class org.bukkit.util.Vectoradd, angle, checkFinite, copy, crossProduct, distance, distanceSquared, divide, dot, fromJOML, fromJOML, fromJOML, getBlockX, getBlockY, getBlockZ, getCrossProduct, getEpsilon, getMaximum, getMidpoint, getMinimum, getRandom, getX, getY, getZ, isInAABB, isInSphere, isNormalized, isZero, 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, toVector3d, toVector3f, toVector3i, toVector3i, zero
- 
Constructor Details- 
BlockVectorpublic BlockVector()Construct the vector with all components as 0.
- 
BlockVectorConstruct the vector with another vector.- Parameters:
- vec- The other vector.
 
- 
BlockVectorpublic BlockVector(int x, int y, int z) Construct the vector with provided integer components.- Parameters:
- x- X component
- y- Y component
- z- Z component
 
- 
BlockVectorpublic BlockVector(double x, double y, double z) Construct the vector with provided double components.- Parameters:
- x- X component
- y- Y component
- z- Z component
 
- 
BlockVectorpublic BlockVector(float x, float y, float z) Construct the vector with provided float components.- Parameters:
- x- X component
- y- Y component
- z- Z component
 
 
- 
- 
Method Details- 
equalsChecks if another object is equivalent.
- 
hashCodepublic int hashCode()Returns a hash code for this vector.
- 
cloneGet a new block vector.
- 
deserialize
 
-