Class Vec3Impl

  • All Implemented Interfaces:
    java.lang.Comparable<Vec3Impl>

    public class Vec3Impl
    extends java.lang.Object
    implements java.lang.Comparable<Vec3Impl>
    • Field Detail

      • NULL_VECTOR

        public static final Vec3Impl NULL_VECTOR
    • Constructor Detail

      • Vec3Impl

        public Vec3Impl​(int in0,
                        int in1,
                        int in2)
    • Method Detail

      • getFromPool

        public static Vec3Impl getFromPool​(int in0,
                                           int in1,
                                           int in2)
        THIS WILL CAUSE THIS VECTOR TO PERMANENTLY RESIDE IN STATIC MEMORY. DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING!!!
      • compareTo

        public int compareTo​(Vec3Impl o)
        Specified by:
        compareTo in interface java.lang.Comparable<Vec3Impl>
      • get

        public int get​(int index)
        Gets the coordinate.
      • get0

        public int get0()
        Gets the X coordinate.
      • get1

        public int get1()
        Gets the Y coordinate.
      • get2

        public int get2()
        Gets the Z coordinate.
      • offset

        public Vec3Impl offset​(net.minecraftforge.common.util.ForgeDirection facing,
                               int n)
      • add

        public Vec3Impl add​(int pos0,
                            int pos1,
                            int pos2)
      • sub

        public Vec3Impl sub​(int pos0,
                            int pos1,
                            int pos2)
      • withinDistance

        public boolean withinDistance​(Vec3Impl to,
                                      double distance)
      • withinDistance

        public boolean withinDistance​(IPosition to,
                                      double distance)
      • distanceSq

        public double distanceSq​(Vec3Impl to)
      • distanceSq

        public double distanceSq​(IPosition to,
                                 boolean useCenter)
      • distanceSq

        public double distanceSq​(double x,
                                 double y,
                                 double z,
                                 boolean useCenter)
      • manhattanDistance

        public int manhattanDistance​(Vec3Impl to)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object