Class Vec3

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

public class Vec3 extends Object implements Position
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<Vec3> CODEC
    • 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(org.joml.Vector3f p_253821_)
  • Method Details

    • fromRGB24

      public static Vec3 fromRGB24(int p_82502_)
    • atLowerCornerOf

      public static Vec3 atLowerCornerOf(Vec3i p_82529_)
    • atLowerCornerWithOffset

      public static Vec3 atLowerCornerWithOffset(Vec3i p_272866_, double p_273680_, double p_273668_, double p_273687_)
    • atCenterOf

      public static Vec3 atCenterOf(Vec3i p_82513_)
    • 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_)
    • closerThan

      public boolean closerThan(Vec3 p_312866_, double p_312928_, double p_312788_)
    • 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_)
    • offsetRandom

      public Vec3 offsetRandom(RandomSource p_272810_, float p_273473_)
    • 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_)
    • with

      public Vec3 with(Direction.Axis p_193104_, double p_193105_)
    • relative

      public Vec3 relative(Direction p_231076_, double p_231077_)
    • 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
    • toVector3f

      public org.joml.Vector3f toVector3f()