Class Vec3

java.lang.Object
net.minecraft.world.phys.Vec3
All Implemented Interfaces:
Position

public class Vec3 extends Object implements Position
  • Field Details

    • ZERO

      public static final Vec3 ZERO
    • x

      public final double x
    • y

      public final double y
    • z

      public final double z
  • Constructor Details

    • Vec3

      public Vec3(double p_82484_, double p_82485_, double p_82486_)
    • Vec3

      public Vec3(Vector3f p_82488_)
  • Method Details

    • fromRGB24

      public static Vec3 fromRGB24(int p_82502_)
    • atCenterOf

      public static Vec3 atCenterOf(Vec3i p_82513_)
    • atLowerCornerOf

      public static Vec3 atLowerCornerOf(Vec3i p_82529_)
    • atBottomCenterOf

      public static Vec3 atBottomCenterOf(Vec3i p_82540_)
    • upFromBottomCenterOf

      public static Vec3 upFromBottomCenterOf(Vec3i p_82515_, double p_82516_)
    • vectorTo

      public Vec3 vectorTo(Vec3 p_82506_)
    • normalize

      public Vec3 normalize()
    • dot

      public double dot(Vec3 p_82527_)
    • cross

      public Vec3 cross(Vec3 p_82538_)
    • subtract

      public Vec3 subtract(Vec3 p_82547_)
    • subtract

      public Vec3 subtract(double p_82493_, double p_82494_, double p_82495_)
    • add

      public Vec3 add(Vec3 p_82550_)
    • add

      public Vec3 add(double p_82521_, double p_82522_, double p_82523_)
    • closerThan

      public boolean closerThan(Position p_82510_, double p_82511_)
    • distanceTo

      public double distanceTo(Vec3 p_82555_)
    • distanceToSqr

      public double distanceToSqr(Vec3 p_82558_)
    • distanceToSqr

      public double distanceToSqr(double p_82532_, double p_82533_, double p_82534_)
    • scale

      public Vec3 scale(double p_82491_)
    • reverse

      public Vec3 reverse()
    • multiply

      public Vec3 multiply(Vec3 p_82560_)
    • multiply

      public Vec3 multiply(double p_82543_, double p_82544_, double p_82545_)
    • length

      public double length()
    • lengthSqr

      public double lengthSqr()
    • horizontalDistance

      public double horizontalDistance()
    • horizontalDistanceSqr

      public double horizontalDistanceSqr()
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
    • lerp

      public Vec3 lerp(Vec3 p_165922_, double p_165923_)
    • xRot

      public Vec3 xRot(float p_82497_)
    • yRot

      public Vec3 yRot(float p_82525_)
    • zRot

      public Vec3 zRot(float p_82536_)
    • directionFromRotation

      public static Vec3 directionFromRotation(Vec2 p_82504_)
    • directionFromRotation

      public static Vec3 directionFromRotation(float p_82499_, float p_82500_)
    • align

      public Vec3 align(EnumSet<Direction.Axis> p_82518_)
    • get

      public double get(Direction.Axis p_82508_)
    • x

      public final double x()
      Specified by:
      x in interface Position
    • y

      public final double y()
      Specified by:
      y in interface Position
    • z

      public final double z()
      Specified by:
      z in interface Position