Package api.util

Class Vec3i

java.lang.Object
api.util.Vec3i
All Implemented Interfaces:
Comparable<Vec3i>
Direct Known Subclasses:
ImmutableBlockPos

public class Vec3i extends Object implements Comparable<Vec3i>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Vec3i
    The Null vector constant (0, 0, 0)
  • Constructor Summary

    Constructors
    Constructor
    Description
    Vec3i(double xIn, double yIn, double zIn)
     
    Vec3i(int xIn, int yIn, int zIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo(Vec3i p_compareTo_1_)
     
    Calculate the cross product of this and the given Vector
    double
    distanceSq(double toX, double toY, double toZ)
    Calculate squared distance to the given coordinates
    double
    Calculate squared distance to the given Vector
    double
    distanceSqToCenter(double xIn, double yIn, double zIn)
    Compute square of distance from point x, y, z to center of this Block
    boolean
    equals(Object comparedObject)
     
    int
    Get the X coordinate
    int
    Get the Y coordinate
    int
    Get the Z coordinate
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • NULL_VECTOR

      public static final Vec3i NULL_VECTOR
      The Null vector constant (0, 0, 0)
  • Constructor Details

    • Vec3i

      public Vec3i(int xIn, int yIn, int zIn)
    • Vec3i

      public Vec3i(double xIn, double yIn, double zIn)
  • Method Details

    • equals

      public boolean equals(Object comparedObject)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(Vec3i p_compareTo_1_)
      Specified by:
      compareTo in interface Comparable<Vec3i>
    • getX

      public int getX()
      Get the X coordinate
    • getY

      public int getY()
      Get the Y coordinate
    • getZ

      public int getZ()
      Get the Z coordinate
    • crossProduct

      public Vec3i crossProduct(Vec3i vec)
      Calculate the cross product of this and the given Vector
    • distanceSq

      public double distanceSq(double toX, double toY, double toZ)
      Calculate squared distance to the given coordinates
    • distanceSqToCenter

      public double distanceSqToCenter(double xIn, double yIn, double zIn)
      Compute square of distance from point x, y, z to center of this Block
    • distanceSq

      public double distanceSq(Vec3i to)
      Calculate squared distance to the given Vector
    • toString

      public String toString()
      Overrides:
      toString in class Object