Package org.bukkit.util

# Class BlockVector

java.lang.Object
org.bukkit.util.Vector
org.bukkit.util.BlockVector

All Implemented Interfaces:
  `Cloneable`, `ConfigurationSerializable`

public class BlockVector extends Vector
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

Constructors
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(@NotNull Vector vec)`
Construct the vector with another vector.

## Method Summary

Modifier and Type
Method
Description
`BlockVector`
`clone()`
Get a new block vector.
`static @NotNull BlockVector`
`deserialize(@NotNull 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, 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`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

## Constructor Details

### BlockVector

public BlockVector()
Construct the vector with all components as 0.

### BlockVector

public BlockVector(@NotNull @NotNull Vector vec)
Construct the vector with another vector.

Parameters:
  `vec` - The other vector.

### BlockVector

public BlockVector(int x, int y, int z)
Construct the vector with provided integer components.

Parameters:
  `x` - X component
  `y` - Y component
  `z` - Z component

### BlockVector

public BlockVector(double x, double y, double z)
Construct the vector with provided double components.

Parameters:
  `x` - X component
  `y` - Y component
  `z` - Z component

### BlockVector

public 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

### equals

public boolean equals(Object obj)
Checks if another object is equivalent.

Overrides:
  `equals` in class `Vector`
Parameters:
  `obj` - The other object
Returns:
  whether the other object is equivalent

### hashCode

public int hashCode()
Returns a hash code for this vector.

Overrides:
  `hashCode` in class `Vector`
Returns:
  hash code

### clone

public BlockVector clone()
Get a new block vector.

Overrides:
  `clone` in class `Vector`
Returns:
  vector

### deserialize

@NotNull public static @NotNull BlockVector deserialize(@NotNull @NotNull Map<String,Object> args)