Class Vec3

  • All Implemented Interfaces:
    org.teavm.jso.JSObject

    public class Vec3
    extends PluginData
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Field Detail

      • xCoord

        public double xCoord
      • yCoord

        public double yCoord
      • zCoord

        public double zCoord
    • Constructor Detail

      • Vec3

        public Vec3​(double x,
                    double y,
                    double z)
      • Vec3

        public Vec3​(Vec3i parVec3i)
    • Method Detail

      • subtractReverse

        public Vec3 subtractReverse​(Vec3 vec)
        + Returns a new vector with the result of the specified vector minus this.
      • normalize

        public Vec3 normalize()
        + Normalizes the vector to a length of 1 (except if it is the zero vector)
      • dotProduct

        public double dotProduct​(Vec3 vec)
      • crossProduct

        public Vec3 crossProduct​(Vec3 vec)
        + Returns a new vector with the result of this vector x the specified vector.
      • subtract

        public Vec3 subtract​(Vec3 vec)
      • subtract

        public Vec3 subtract​(double x,
                             double y,
                             double z)
      • addVector

        public Vec3 addVector​(double x,
                              double y,
                              double z)
        + Adds the specified x,y,z vector components to this vector and returns the resulting vector. Does not change this vector.
      • distanceTo

        public double distanceTo​(Vec3 vec)
        + Euclidean distance between this and the specified vector, returned as double.
      • squareDistanceTo

        public double squareDistanceTo​(Vec3 vec)
        + The square of the Euclidean distance between this and the specified vector.
      • lengthVector

        public double lengthVector()
        + Returns the length of the vector.
      • getIntermediateWithXValue

        public Vec3 getIntermediateWithXValue​(Vec3 vec,
                                              double x)
        + Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
      • getIntermediateWithYValue

        public Vec3 getIntermediateWithYValue​(Vec3 vec,
                                              double y)
        + Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
      • getIntermediateWithZValue

        public Vec3 getIntermediateWithZValue​(Vec3 vec,
                                              double z)
        + Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.
      • toString

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

        public Vec3 rotatePitch​(float pitch)
      • rotateYaw

        public Vec3 rotateYaw​(float yaw)
      • loadPluginData

        public void loadPluginData​(BaseData data)
      • fromPluginData

        public static Vec3 fromPluginData​(BaseData data)
      • makePluginData

        public PluginData makePluginData()