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.
  • Constructor Details

    • BlockVector

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

      public BlockVector​(@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