Class Vec3
java.lang.Object
net.minecraft.world.phys.Vec3
- All Implemented Interfaces:
Position
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StreamCodec<io.netty.buffer.ByteBuf, Vec3> static final StreamCodec<io.netty.buffer.ByteBuf, Vec3> final doublestatic final Vec3final doublestatic final Vec3final doublestatic final Vec3static final Vec3 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(double value) add(double x, double y, double z) addLocalCoordinates(Vec3 direction) align(EnumSet<Direction.Axis> axes) static Vec3applyLocalCoordinatesToRotation(Vec2 rotation, Vec3 direction) static Vec3atBottomCenterOf(Vec3i pos) static Vec3atCenterOf(Vec3i pos) static Vec3atLowerCornerOf(Vec3i pos) static Vec3atLowerCornerWithOffset(Vec3i pos, double x, double y, double z) booleancloserThan(Position pos, double distance) booleancloserThan(Vec3 vec, double distanceXZ, double distanceY) static Vec3directionFromRotation(float rotX, float rotY) static Vec3directionFromRotation(Vec2 rotation) doubledistanceTo(Vec3 vec) doubledistanceToSqr(double x, double y, double z) doubledistanceToSqr(Vec3 vec) doublebooleandoubleget(Direction.Axis axis) inthashCode()doubledoublebooleanisFinite()doublelength()doublemultiply(double xScale, double yScale, double zScale) offsetRandom(RandomSource random, float offset) offsetRandomXZ(RandomSource random, float offset) projectedOn(Vec3 onto) reverse()rotation()scale(double scale) subtract(double value) subtract(double x, double y, double z) toString()org.joml.Vector3fstatic Vec3upFromBottomCenterOf(Vec3i pos, double yOffset) with(Direction.Axis axis, double value) final doublex()xRot(float radians) final doubley()yRot(float radians) final doublez()zRot(float radians)
-
Field Details
-
CODEC
-
STREAM_CODEC
-
LP_STREAM_CODEC
-
ZERO
-
X_AXIS
-
Y_AXIS
-
Z_AXIS
-
x
public final double x -
y
public final double y -
z
public final double z
-
-
Constructor Details
-
Vec3
public Vec3(double x, double y, double z) -
Vec3
public Vec3(org.joml.Vector3fc vec) -
Vec3
-
-
Method Details
-
atLowerCornerOf
-
atLowerCornerWithOffset
-
atCenterOf
-
atBottomCenterOf
-
upFromBottomCenterOf
-
vectorTo
-
normalize
-
dot
-
cross
-
subtract
-
subtract
-
subtract
-
add
-
add
-
add
-
closerThan
-
distanceTo
-
distanceToSqr
-
distanceToSqr
public double distanceToSqr(double x, double y, double z) -
closerThan
-
scale
-
reverse
-
multiply
-
multiply
-
horizontal
-
offsetRandom
-
offsetRandomXZ
-
length
public double length() -
lengthSqr
public double lengthSqr() -
horizontalDistance
public double horizontalDistance() -
horizontalDistanceSqr
public double horizontalDistanceSqr() -
equals
-
hashCode
-
toString
-
lerp
-
xRot
-
yRot
-
zRot
-
rotateClockwise90
-
directionFromRotation
-
directionFromRotation
-
rotation
-
align
-
get
-
with
-
relative
-
x
-
y
-
z
-
toVector3f
public org.joml.Vector3f toVector3f() -
projectedOn
-
applyLocalCoordinatesToRotation
-
addLocalCoordinates
-
isFinite
public boolean isFinite()
-