Package net.minecraft.util.math
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vec3d
add(double x, double y, double z)
Vec3d
add(Vec3d vec)
Vec3d
crossProduct(Vec3d vec)
double
distanceTo(Vec3d vec)
double
dotProduct(Vec3d vec)
boolean
equals(Object o)
Vec3d
floorAlongAxes(EnumSet<Direction.Axis> axes)
static Vec3d
fromPolar(float pitch, float yaw)
static Vec3d
fromPolar(Vec2f polar)
double
getComponentAlongAxis(Direction.Axis axis)
double
getX()
double
getY()
double
getZ()
int
hashCode()
boolean
isInRange(Position pos, double radius)
double
length()
double
lengthSquared()
Vec3d
multiply(double mult)
Vec3d
multiply(double multX, double multY, double multZ)
Vec3d
multiply(Vec3d mult)
Vec3d
negate()
Vec3d
normalize()
static Vec3d
of(Vec3i vec)
static Vec3d
ofBottomCenter(Vec3i vec)
static Vec3d
ofCenter(Vec3i vec)
static Vec3d
ofCenter(Vec3i vec, double deltaY)
Vec3d
reverseSubtract(Vec3d vec)
Vec3d
rotateX(float angle)
Vec3d
rotateY(float angle)
Vec3d
rotateZ(float angle)
double
squaredDistanceTo(double x, double y, double z)
double
squaredDistanceTo(Vec3d vec)
Vec3d
subtract(double x, double y, double z)
Vec3d
subtract(Vec3d vec)
String
toString()
static Vec3d
unpackRgb(int rgb)
-
Field Details
-
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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
-
hashCode
public int hashCode() -
toString
-
rotateX
- 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
- 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
- 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
- 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
- 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
- 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
- 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() -
getY
public final double getY() -
getZ
public final double getZ()
-