Class Vec3d

java.lang.Object
net.minecraft.util.math.Vec3d
All Implemented Interfaces:
Position

public class Vec3d
extends Object
implements Position
An immutable vector composed of 3 doubles.
Mappings:
Namespace Name
official diu
intermediary net/minecraft/class_243
named net/minecraft/util/math/Vec3d
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<Vec3d> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a:Lcom/mojang/serialization/Codec;
      intermediary field_28243 Lnet/minecraft/class_243;field_28243:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/util/math/Vec3d;CODEC:Lcom/mojang/serialization/Codec;
    • ZERO

      public static final Vec3d ZERO
      Mappings:
      Namespace Name Mixin selector
      official b Ldiu;b:Ldiu;
      intermediary field_1353 Lnet/minecraft/class_243;field_1353:Lnet/minecraft/class_243;
      named ZERO Lnet/minecraft/util/math/Vec3d;ZERO:Lnet/minecraft/util/math/Vec3d;
    • x

      public final double x
      Mappings:
      Namespace Name Mixin selector
      official c Ldiu;c:D
      intermediary field_1352 Lnet/minecraft/class_243;field_1352:D
      named x Lnet/minecraft/util/math/Vec3d;x:D
    • y

      public final double y
      Mappings:
      Namespace Name Mixin selector
      official d Ldiu;d:D
      intermediary field_1351 Lnet/minecraft/class_243;field_1351:D
      named y Lnet/minecraft/util/math/Vec3d;y:D
    • z

      public final double z
      Mappings:
      Namespace Name Mixin selector
      official e Ldiu;e:D
      intermediary field_1350 Lnet/minecraft/class_243;field_1350:D
      named z Lnet/minecraft/util/math/Vec3d;z:D
  • Constructor Details

    • Vec3d

      public Vec3d​(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldiu;<init>(DDD)V
      intermediary <init> Lnet/minecraft/class_243;<init>(DDD)V
      named <init> Lnet/minecraft/util/math/Vec3d;<init>(DDD)V
    • Vec3d

      public Vec3d​(Vec3f vec)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldiu;<init>(Lg;)V
      intermediary <init> Lnet/minecraft/class_243;<init>(Lnet/minecraft/class_1160;)V
      named <init> Lnet/minecraft/util/math/Vec3d;<init>(Lnet/minecraft/util/math/Vec3f;)V
  • Method Details

    • unpackRgb

      public static Vec3d unpackRgb​(int rgb)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(I)Ldiu;
      intermediary method_24457 Lnet/minecraft/class_243;method_24457(I)Lnet/minecraft/class_243;
      named unpackRgb Lnet/minecraft/util/math/Vec3d;unpackRgb(I)Lnet/minecraft/util/math/Vec3d;
    • ofCenter

      public static Vec3d ofCenter​(Vec3i vec)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Lgs;)Ldiu;
      intermediary method_24953 Lnet/minecraft/class_243;method_24953(Lnet/minecraft/class_2382;)Lnet/minecraft/class_243;
      named ofCenter Lnet/minecraft/util/math/Vec3d;ofCenter(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/Vec3d;
    • of

      public static Vec3d of​(Vec3i vec)
      Mappings:
      Namespace Name Mixin selector
      official b Ldiu;b(Lgs;)Ldiu;
      intermediary method_24954 Lnet/minecraft/class_243;method_24954(Lnet/minecraft/class_2382;)Lnet/minecraft/class_243;
      named of Lnet/minecraft/util/math/Vec3d;of(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/Vec3d;
    • ofBottomCenter

      public static Vec3d ofBottomCenter​(Vec3i vec)
      Mappings:
      Namespace Name Mixin selector
      official c Ldiu;c(Lgs;)Ldiu;
      intermediary method_24955 Lnet/minecraft/class_243;method_24955(Lnet/minecraft/class_2382;)Lnet/minecraft/class_243;
      named ofBottomCenter Lnet/minecraft/util/math/Vec3d;ofBottomCenter(Lnet/minecraft/util/math/Vec3i;)Lnet/minecraft/util/math/Vec3d;
    • ofCenter

      public static Vec3d ofCenter​(Vec3i vec, double deltaY)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Lgs;D)Ldiu;
      intermediary method_26410 Lnet/minecraft/class_243;method_26410(Lnet/minecraft/class_2382;D)Lnet/minecraft/class_243;
      named ofCenter Lnet/minecraft/util/math/Vec3d;ofCenter(Lnet/minecraft/util/math/Vec3i;D)Lnet/minecraft/util/math/Vec3d;
    • reverseSubtract

      public Vec3d reverseSubtract​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Ldiu;)Ldiu;
      intermediary method_1035 Lnet/minecraft/class_243;method_1035(Lnet/minecraft/class_243;)Lnet/minecraft/class_243;
      named reverseSubtract Lnet/minecraft/util/math/Vec3d;reverseSubtract(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
    • normalize

      public Vec3d normalize()
      Mappings:
      Namespace Name Mixin selector
      official d Ldiu;d()Ldiu;
      intermediary method_1029 Lnet/minecraft/class_243;method_1029()Lnet/minecraft/class_243;
      named normalize Lnet/minecraft/util/math/Vec3d;normalize()Lnet/minecraft/util/math/Vec3d;
    • dotProduct

      public double dotProduct​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official b Ldiu;b(Ldiu;)D
      intermediary method_1026 Lnet/minecraft/class_243;method_1026(Lnet/minecraft/class_243;)D
      named dotProduct Lnet/minecraft/util/math/Vec3d;dotProduct(Lnet/minecraft/util/math/Vec3d;)D
    • crossProduct

      public Vec3d crossProduct​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official c Ldiu;c(Ldiu;)Ldiu;
      intermediary method_1036 Lnet/minecraft/class_243;method_1036(Lnet/minecraft/class_243;)Lnet/minecraft/class_243;
      named crossProduct Lnet/minecraft/util/math/Vec3d;crossProduct(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
    • subtract

      public Vec3d subtract​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official d Ldiu;d(Ldiu;)Ldiu;
      intermediary method_1020 Lnet/minecraft/class_243;method_1020(Lnet/minecraft/class_243;)Lnet/minecraft/class_243;
      named subtract Lnet/minecraft/util/math/Vec3d;subtract(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
    • subtract

      public Vec3d subtract​(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(DDD)Ldiu;
      intermediary method_1023 Lnet/minecraft/class_243;method_1023(DDD)Lnet/minecraft/class_243;
      named subtract Lnet/minecraft/util/math/Vec3d;subtract(DDD)Lnet/minecraft/util/math/Vec3d;
    • add

      public Vec3d add​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official e Ldiu;e(Ldiu;)Ldiu;
      intermediary method_1019 Lnet/minecraft/class_243;method_1019(Lnet/minecraft/class_243;)Lnet/minecraft/class_243;
      named add Lnet/minecraft/util/math/Vec3d;add(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
    • add

      public Vec3d add​(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      official b Ldiu;b(DDD)Ldiu;
      intermediary method_1031 Lnet/minecraft/class_243;method_1031(DDD)Lnet/minecraft/class_243;
      named add Lnet/minecraft/util/math/Vec3d;add(DDD)Lnet/minecraft/util/math/Vec3d;
    • isInRange

      public boolean isInRange​(Position pos, double radius)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Lgk;D)Z
      intermediary method_24802 Lnet/minecraft/class_243;method_24802(Lnet/minecraft/class_2374;D)Z
      named isInRange Lnet/minecraft/util/math/Vec3d;isInRange(Lnet/minecraft/util/math/Position;D)Z
    • distanceTo

      public double distanceTo​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official f Ldiu;f(Ldiu;)D
      intermediary method_1022 Lnet/minecraft/class_243;method_1022(Lnet/minecraft/class_243;)D
      named distanceTo Lnet/minecraft/util/math/Vec3d;distanceTo(Lnet/minecraft/util/math/Vec3d;)D
    • squaredDistanceTo

      public double squaredDistanceTo​(Vec3d vec)
      Mappings:
      Namespace Name Mixin selector
      official g Ldiu;g(Ldiu;)D
      intermediary method_1025 Lnet/minecraft/class_243;method_1025(Lnet/minecraft/class_243;)D
      named squaredDistanceTo Lnet/minecraft/util/math/Vec3d;squaredDistanceTo(Lnet/minecraft/util/math/Vec3d;)D
    • squaredDistanceTo

      public double squaredDistanceTo​(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      official c Ldiu;c(DDD)D
      intermediary method_1028 Lnet/minecraft/class_243;method_1028(DDD)D
      named squaredDistanceTo Lnet/minecraft/util/math/Vec3d;squaredDistanceTo(DDD)D
    • multiply

      public Vec3d multiply​(double mult)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(D)Ldiu;
      intermediary method_1021 Lnet/minecraft/class_243;method_1021(D)Lnet/minecraft/class_243;
      named multiply Lnet/minecraft/util/math/Vec3d;multiply(D)Lnet/minecraft/util/math/Vec3d;
    • negate

      @Environment(CLIENT) public Vec3d negate()
      Mappings:
      Namespace Name Mixin selector
      official e Ldiu;e()Ldiu;
      intermediary method_22882 Lnet/minecraft/class_243;method_22882()Lnet/minecraft/class_243;
      named negate Lnet/minecraft/util/math/Vec3d;negate()Lnet/minecraft/util/math/Vec3d;
    • multiply

      public Vec3d multiply​(Vec3d mult)
      Mappings:
      Namespace Name Mixin selector
      official h Ldiu;h(Ldiu;)Ldiu;
      intermediary method_18806 Lnet/minecraft/class_243;method_18806(Lnet/minecraft/class_243;)Lnet/minecraft/class_243;
      named multiply Lnet/minecraft/util/math/Vec3d;multiply(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;
    • multiply

      public Vec3d multiply​(double multX, double multY, double multZ)
      Mappings:
      Namespace Name Mixin selector
      official d Ldiu;d(DDD)Ldiu;
      intermediary method_18805 Lnet/minecraft/class_243;method_18805(DDD)Lnet/minecraft/class_243;
      named multiply Lnet/minecraft/util/math/Vec3d;multiply(DDD)Lnet/minecraft/util/math/Vec3d;
    • length

      public double length()
      Mappings:
      Namespace Name Mixin selector
      official f Ldiu;f()D
      intermediary method_1033 Lnet/minecraft/class_243;method_1033()D
      named length Lnet/minecraft/util/math/Vec3d;length()D
    • lengthSquared

      public double lengthSquared()
      Mappings:
      Namespace Name Mixin selector
      official g Ldiu;g()D
      intermediary method_1027 Lnet/minecraft/class_243;method_1027()D
      named lengthSquared Lnet/minecraft/util/math/Vec3d;lengthSquared()D
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      official equals Ldiu;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_243;equals(Ljava/lang/Object;)Z
      named equals Lnet/minecraft/util/math/Vec3d;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
      Mappings:
      Namespace Name Mixin selector
      official hashCode Ldiu;hashCode()I
      intermediary hashCode Lnet/minecraft/class_243;hashCode()I
      named hashCode Lnet/minecraft/util/math/Vec3d;hashCode()I
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Mappings:
      Namespace Name Mixin selector
      official toString Ldiu;toString()Ljava/lang/String;
      intermediary toString Lnet/minecraft/class_243;toString()Ljava/lang/String;
      named toString Lnet/minecraft/util/math/Vec3d;toString()Ljava/lang/String;
    • rotateX

      public Vec3d rotateX​(float angle)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(F)Ldiu;
      intermediary method_1037 Lnet/minecraft/class_243;method_1037(F)Lnet/minecraft/class_243;
      named rotateX Lnet/minecraft/util/math/Vec3d;rotateX(F)Lnet/minecraft/util/math/Vec3d;
    • rotateY

      public Vec3d rotateY​(float angle)
      Mappings:
      Namespace Name Mixin selector
      official b Ldiu;b(F)Ldiu;
      intermediary method_1024 Lnet/minecraft/class_243;method_1024(F)Lnet/minecraft/class_243;
      named rotateY Lnet/minecraft/util/math/Vec3d;rotateY(F)Lnet/minecraft/util/math/Vec3d;
    • rotateZ

      @Environment(CLIENT) public Vec3d rotateZ​(float angle)
      Mappings:
      Namespace Name Mixin selector
      official c Ldiu;c(F)Ldiu;
      intermediary method_31033 Lnet/minecraft/class_243;method_31033(F)Lnet/minecraft/class_243;
      named rotateZ Lnet/minecraft/util/math/Vec3d;rotateZ(F)Lnet/minecraft/util/math/Vec3d;
    • fromPolar

      @Environment(CLIENT) public static Vec3d fromPolar​(Vec2f polar)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Ldit;)Ldiu;
      intermediary method_1034 Lnet/minecraft/class_243;method_1034(Lnet/minecraft/class_241;)Lnet/minecraft/class_243;
      named fromPolar Lnet/minecraft/util/math/Vec3d;fromPolar(Lnet/minecraft/util/math/Vec2f;)Lnet/minecraft/util/math/Vec3d;
    • fromPolar

      @Environment(CLIENT) public static Vec3d fromPolar​(float pitch, float yaw)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(FF)Ldiu;
      intermediary method_1030 Lnet/minecraft/class_243;method_1030(FF)Lnet/minecraft/class_243;
      named fromPolar Lnet/minecraft/util/math/Vec3d;fromPolar(FF)Lnet/minecraft/util/math/Vec3d;
    • floorAlongAxes

      public Vec3d floorAlongAxes​(EnumSet<Direction.Axis> axes)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Ljava/util/EnumSet;)Ldiu;
      intermediary method_1032 Lnet/minecraft/class_243;method_1032(Ljava/util/EnumSet;)Lnet/minecraft/class_243;
      named floorAlongAxes Lnet/minecraft/util/math/Vec3d;floorAlongAxes(Ljava/util/EnumSet;)Lnet/minecraft/util/math/Vec3d;
    • getComponentAlongAxis

      public double getComponentAlongAxis​(Direction.Axis axis)
      Mappings:
      Namespace Name Mixin selector
      official a Ldiu;a(Lgc$a;)D
      intermediary method_18043 Lnet/minecraft/class_243;method_18043(Lnet/minecraft/class_2350$class_2351;)D
      named getComponentAlongAxis Lnet/minecraft/util/math/Vec3d;getComponentAlongAxis(Lnet/minecraft/util/math/Direction$Axis;)D
    • getX

      public final double getX()
      Specified by:
      getX in interface Position
      Mappings:
      Namespace Name Mixin selector
      official a Lgk;a()D
      intermediary method_10216 Lnet/minecraft/class_2374;method_10216()D
      named getX Lnet/minecraft/util/math/Position;getX()D
    • getY

      public final double getY()
      Specified by:
      getY in interface Position
      Mappings:
      Namespace Name Mixin selector
      official b Lgk;b()D
      intermediary method_10214 Lnet/minecraft/class_2374;method_10214()D
      named getY Lnet/minecraft/util/math/Position;getY()D
    • getZ

      public final double getZ()
      Specified by:
      getZ in interface Position
      Mappings:
      Namespace Name Mixin selector
      official c Lgk;c()D
      intermediary method_10215 Lnet/minecraft/class_2374;method_10215()D
      named getZ Lnet/minecraft/util/math/Position;getZ()D