mirror of https://github.com/FabricMC/yarn.git
175 lines
8.3 KiB
Plaintext
175 lines
8.3 KiB
Plaintext
CLASS net/minecraft/class_2382 net/minecraft/util/math/Vec3i
|
|
COMMENT A vector composed of 3 integers.
|
|
COMMENT
|
|
COMMENT <p>This class is very often used to hold the coordinates. To hold a block position
|
|
COMMENT specifically, use {@link BlockPos} instead, which extends {@code Vec3i}. To hold
|
|
COMMENT positions for entities and other non-voxels, consider using {@link Vec3d} that
|
|
COMMENT holds values using {@code double} instead.
|
|
COMMENT
|
|
COMMENT <p>{@code Vec3i} is read-only, but subclasses like {@link BlockPos.Mutable}
|
|
COMMENT may be mutable. Make sure to sanitize inputs of {@code Vec3i} if needed,
|
|
COMMENT such as calling {@link BlockPos#toImmutable()} or making new copies.
|
|
COMMENT
|
|
COMMENT @see org.joml.Vector3f
|
|
COMMENT @see Vec3d
|
|
COMMENT @see BlockPos
|
|
FIELD field_11173 z I
|
|
FIELD field_11174 y I
|
|
FIELD field_11175 x I
|
|
FIELD field_11176 ZERO Lnet/minecraft/class_2382;
|
|
FIELD field_25123 CODEC Lcom/mojang/serialization/Codec;
|
|
METHOD <init> (III)V
|
|
ARG 1 x
|
|
ARG 2 y
|
|
ARG 3 z
|
|
METHOD compareTo (Ljava/lang/Object;)I
|
|
ARG 1 vec
|
|
METHOD equals (Ljava/lang/Object;)Z
|
|
ARG 1 o
|
|
METHOD method_10099 setY (I)Lnet/minecraft/class_2382;
|
|
ARG 1 y
|
|
METHOD method_10259 crossProduct (Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;
|
|
ARG 1 vec
|
|
METHOD method_10260 getZ ()I
|
|
METHOD method_10262 getSquaredDistance (Lnet/minecraft/class_2382;)D
|
|
COMMENT {@return the squared distance between here (center) and {@code vec}}
|
|
COMMENT
|
|
COMMENT @see #getSquaredDistance(double, double, double)
|
|
COMMENT @see #getSquaredDistanceFromCenter(double, double, double)
|
|
ARG 1 vec
|
|
METHOD method_10263 getX ()I
|
|
METHOD method_10264 getY ()I
|
|
METHOD method_10268 getSquaredDistanceFromCenter (DDD)D
|
|
COMMENT {@return the squared distance between the center of this voxel and {@code (x, y, z)}}
|
|
COMMENT This is equivalent to {@link Vec3d#ofCenter(Vec3i)
|
|
COMMENT Vec3d.ofCenter(this).squaredDistanceTo(x, y, z)}.
|
|
ARG 1 x
|
|
ARG 3 y
|
|
ARG 5 z
|
|
METHOD method_19455 getManhattanDistance (Lnet/minecraft/class_2382;)I
|
|
COMMENT {@return the Manhattan distance between here and {@code vec}}
|
|
COMMENT
|
|
COMMENT <p>Manhattan distance, also called taxicab distance or snake distance, is the
|
|
COMMENT distance measured as the sum of the absolute differences of their coordinates.
|
|
COMMENT For example, the Manhattan distance between {@code (0, 0, 0)} and {@code (1, 1, 1)}
|
|
COMMENT is {@code 3}.
|
|
ARG 1 vec
|
|
METHOD method_19769 isWithinDistance (Lnet/minecraft/class_2374;D)Z
|
|
COMMENT {@return whether the distance between here and {@code pos} is less than {@code distance}}
|
|
ARG 1 pos
|
|
ARG 2 distance
|
|
METHOD method_19770 getSquaredDistance (Lnet/minecraft/class_2374;)D
|
|
COMMENT {@return the squared distance between here and {@code pos}}
|
|
ARG 1 pos
|
|
METHOD method_19771 isWithinDistance (Lnet/minecraft/class_2382;D)Z
|
|
COMMENT {@return whether the distance between here and {@code vec} is less than {@code distance}}
|
|
ARG 1 vec
|
|
ARG 2 distance
|
|
METHOD method_20787 setX (I)Lnet/minecraft/class_2382;
|
|
ARG 1 x
|
|
METHOD method_20788 setZ (I)Lnet/minecraft/class_2382;
|
|
ARG 1 z
|
|
METHOD method_23226 offset (Lnet/minecraft/class_2350;I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in {@code direction} direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 direction
|
|
ARG 2 distance
|
|
METHOD method_23227 down (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in the downward direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 distance
|
|
METHOD method_23228 down ()Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in the downward direction}
|
|
METHOD method_23854 toShortString ()Ljava/lang/String;
|
|
COMMENT {@return the coordinates joined with a colon and a space}
|
|
METHOD method_29124 (Lnet/minecraft/class_2382;)Ljava/util/stream/IntStream;
|
|
ARG 0 vec
|
|
METHOD method_29125 (Ljava/util/stream/IntStream;)Lcom/mojang/serialization/DataResult;
|
|
ARG 0 stream
|
|
METHOD method_29126 ([I)Lnet/minecraft/class_2382;
|
|
ARG 0 coordinates
|
|
METHOD method_30558 getComponentAlongAxis (Lnet/minecraft/class_2350$class_2351;)I
|
|
COMMENT {@return the component on the {@code axis} axis}
|
|
ARG 1 axis
|
|
METHOD method_30930 up (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in the upward direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 distance
|
|
METHOD method_30931 up ()Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in the upward direction}
|
|
METHOD method_34592 add (III)Lnet/minecraft/class_2382;
|
|
COMMENT {@return another Vec3i whose coordinates have the parameter x, y, and z
|
|
COMMENT added to the coordinates of this vector}
|
|
COMMENT
|
|
COMMENT <p>This method always returns an immutable object.
|
|
ARG 1 x
|
|
ARG 2 y
|
|
ARG 3 z
|
|
METHOD method_35850 offset (Lnet/minecraft/class_2350$class_2351;I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} on {@code axis} axis}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 axis
|
|
ARG 2 distance
|
|
METHOD method_35851 offset (Lnet/minecraft/class_2350;)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in {@code direction} direction}
|
|
ARG 1 direction
|
|
METHOD method_35852 subtract (Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;
|
|
COMMENT {@return another Vec3i whose coordinates have the coordinates of {@code vec}
|
|
COMMENT subtracted from the coordinates of this vector}
|
|
COMMENT
|
|
COMMENT <p>This method always returns an immutable object.
|
|
ARG 1 vec
|
|
METHOD method_35853 add (Lnet/minecraft/class_2382;)Lnet/minecraft/class_2382;
|
|
COMMENT {@return another Vec3i whose coordinates have the coordinates of {@code vec}
|
|
COMMENT added to the coordinates of this vector}
|
|
COMMENT
|
|
COMMENT <p>This method always returns an immutable object.
|
|
ARG 1 vec
|
|
METHOD method_35854 east (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in the eastward direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 distance
|
|
METHOD method_35855 east ()Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in the eastward direction}
|
|
METHOD method_35856 west (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in the westward direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 distance
|
|
METHOD method_35857 west ()Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in the westward direction}
|
|
METHOD method_35858 south (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in the southward direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 distance
|
|
METHOD method_35859 south ()Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in the southward direction}
|
|
METHOD method_35860 north (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code distance} in the northward direction}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code distance} equals {@code 0}.
|
|
ARG 1 distance
|
|
METHOD method_35861 north ()Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector which is offset by {@code 1} in the northward direction}
|
|
METHOD method_35862 multiply (I)Lnet/minecraft/class_2382;
|
|
COMMENT {@return a vector with all components multiplied by {@code scale}}
|
|
COMMENT
|
|
COMMENT @implNote This can return the same vector if {@code scale} equals {@code 1}.
|
|
ARG 1 scale
|
|
METHOD method_39677 createOffsetCodec (I)Lcom/mojang/serialization/Codec;
|
|
ARG 0 maxAbsValue
|
|
METHOD method_40081 getSquaredDistance (DDD)D
|
|
COMMENT {@return the squared distance between here and {@code (x, y, z)}}
|
|
COMMENT This is equivalent to {@code Vec3d.of(this).squaredDistanceTo(x, y, z)}.
|
|
ARG 1 x
|
|
ARG 3 y
|
|
ARG 5 z
|
|
METHOD method_48305 (ILnet/minecraft/class_2382;)Lcom/mojang/serialization/DataResult;
|
|
ARG 1 vec
|