Package net.minecraft.util.math
Enum Class Direction
- All Implemented Interfaces:
Serializable
,Comparable<Direction>
,Constable
,StringIdentifiable
An enum representing 6 cardinal directions in Minecraft.
In Minecraft, the X axis determines the east-west direction, the Y axis determines the up-down direction, and the Z axis determines the south-north direction (note that positive-Z direction is south, not north).
- Mappings:
Namespace Name named net/minecraft/util/math/Direction
intermediary net/minecraft/class_2350
official jm
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
static enum
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.minecraft.util.StringIdentifiable
StringIdentifiable.BasicCodec<S extends StringIdentifiable>, StringIdentifiable.EnumCodec<E extends Enum<E> & StringIdentifiable>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Direction[]
private final Direction.Axis
static final StringIdentifiable.EnumCodec
<Direction> private final Direction.AxisDirection
private final Vec3d
private static final Direction[]
private final int
static final IntFunction
<Direction> private final int
private final int
private final String
static final PacketCodec
<ByteBuf, Direction> private static final Direction[]
private final Vec3i
static final com.mojang.serialization.Codec
<Direction> Fields inherited from interface net.minecraft.util.StringIdentifiable
CACHED_MAP_THRESHOLD
-
Constructor Summary
ModifierConstructorDescriptionprivate
Direction
(int id, int idOpposite, int idHorizontal, String name, Direction.AxisDirection direction, Direction.Axis axis, Vec3i vector) -
Method Summary
Modifier and TypeMethodDescriptionfloat
asString()
Returns the unique string representation of the enum, used for serialization.static Direction
byId
(int id) Returns a direction with the givenname
, ornull
if there is no such direction.static Direction
from
(Direction.Axis axis, Direction.AxisDirection direction) static Direction
fromHorizontal
(int value) static Direction
fromRotation
(double rotation) fromVector
(int x, int y, int z, @Nullable Direction fallback) Returns the closest direction of the vector, orfallback
for zero vector.fromVector
(Vec3i vec, @Nullable Direction fallback) static Direction
get
(Direction.AxisDirection direction, Direction.Axis axis) getAxis()
static Direction[]
getEntityFacingOrder
(Entity entity) static Direction
getFacing
(double x, double y, double z) static Direction
getFacing
(float x, float y, float z) static Direction
int
static float
getHorizontalDegrees
(Direction direction) int
getId()
static Direction
getLookDirectionForAxis
(Entity entity, Direction.Axis axis) getName()
int
int
int
private static Direction[]
listClosest
(Direction first, Direction second, Direction third) Helper function that returns the 3 directions given, followed by the 3 opposite given in opposite order.boolean
pointsTo
(float yaw) Returns whether the given yaw points to the direction.static Direction
private Direction
private Direction
private Direction
private Direction
static Collection
<Direction> Returns a shuffled collection of all directions.stream()
toString()
static Direction
private static com.mojang.serialization.DataResult
<Direction> validateVertical
(Direction direction) static Direction
Returns the enum constant of this class with the specified name.static Direction[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOWN
- Mappings:
Namespace Name Mixin selector named DOWN
Lnet/minecraft/util/math/Direction;DOWN:Lnet/minecraft/util/math/Direction;
intermediary field_11033
Lnet/minecraft/class_2350;field_11033:Lnet/minecraft/class_2350;
official a
Ljm;a:Ljm;
-
UP
- Mappings:
Namespace Name Mixin selector named UP
Lnet/minecraft/util/math/Direction;UP:Lnet/minecraft/util/math/Direction;
intermediary field_11036
Lnet/minecraft/class_2350;field_11036:Lnet/minecraft/class_2350;
official b
Ljm;b:Ljm;
-
NORTH
- Mappings:
Namespace Name Mixin selector named NORTH
Lnet/minecraft/util/math/Direction;NORTH:Lnet/minecraft/util/math/Direction;
intermediary field_11043
Lnet/minecraft/class_2350;field_11043:Lnet/minecraft/class_2350;
official c
Ljm;c:Ljm;
-
SOUTH
- Mappings:
Namespace Name Mixin selector named SOUTH
Lnet/minecraft/util/math/Direction;SOUTH:Lnet/minecraft/util/math/Direction;
intermediary field_11035
Lnet/minecraft/class_2350;field_11035:Lnet/minecraft/class_2350;
official d
Ljm;d:Ljm;
-
WEST
- Mappings:
Namespace Name Mixin selector named WEST
Lnet/minecraft/util/math/Direction;WEST:Lnet/minecraft/util/math/Direction;
intermediary field_11039
Lnet/minecraft/class_2350;field_11039:Lnet/minecraft/class_2350;
official e
Ljm;e:Ljm;
-
EAST
- Mappings:
Namespace Name Mixin selector named EAST
Lnet/minecraft/util/math/Direction;EAST:Lnet/minecraft/util/math/Direction;
intermediary field_11034
Lnet/minecraft/class_2350;field_11034:Lnet/minecraft/class_2350;
official f
Ljm;f:Ljm;
-
-
Field Details
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/util/math/Direction;CODEC:Lnet/minecraft/util/StringIdentifiable$EnumCodec;
intermediary field_29502
Lnet/minecraft/class_2350;field_29502:Lnet/minecraft/class_3542$class_7292;
official g
Ljm;g:Lbba$a;
-
VERTICAL_CODEC
- Mappings:
Namespace Name Mixin selector named VERTICAL_CODEC
Lnet/minecraft/util/math/Direction;VERTICAL_CODEC:Lcom/mojang/serialization/Codec;
intermediary field_35088
Lnet/minecraft/class_2350;field_35088:Lcom/mojang/serialization/Codec;
official h
Ljm;h:Lcom/mojang/serialization/Codec;
-
ID_TO_VALUE_FUNCTION
- Mappings:
Namespace Name Mixin selector named ID_TO_VALUE_FUNCTION
Lnet/minecraft/util/math/Direction;ID_TO_VALUE_FUNCTION:Ljava/util/function/IntFunction;
intermediary field_48449
Lnet/minecraft/class_2350;field_48449:Ljava/util/function/IntFunction;
official i
Ljm;i:Ljava/util/function/IntFunction;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/util/math/Direction;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_48450
Lnet/minecraft/class_2350;field_48450:Lnet/minecraft/class_9139;
official j
Ljm;j:Lzt;
-
ALL
- Mappings:
Namespace Name Mixin selector named ALL
Lnet/minecraft/util/math/Direction;ALL:[Lnet/minecraft/util/math/Direction;
intermediary field_11040
Lnet/minecraft/class_2350;field_11040:[Lnet/minecraft/class_2350;
official s
Ljm;s:[Ljm;
-
VALUES
- Mappings:
Namespace Name Mixin selector named VALUES
Lnet/minecraft/util/math/Direction;VALUES:[Lnet/minecraft/util/math/Direction;
intermediary field_11038
Lnet/minecraft/class_2350;field_11038:[Lnet/minecraft/class_2350;
official t
Ljm;t:[Ljm;
-
HORIZONTAL
- Mappings:
Namespace Name Mixin selector named HORIZONTAL
Lnet/minecraft/util/math/Direction;HORIZONTAL:[Lnet/minecraft/util/math/Direction;
intermediary field_11041
Lnet/minecraft/class_2350;field_11041:[Lnet/minecraft/class_2350;
official u
Ljm;u:[Ljm;
-
id
private final int id- Mappings:
Namespace Name Mixin selector named id
Lnet/minecraft/util/math/Direction;id:I
intermediary field_11032
Lnet/minecraft/class_2350;field_11032:I
official k
Ljm;k:I
-
idOpposite
private final int idOpposite- Mappings:
Namespace Name Mixin selector named idOpposite
Lnet/minecraft/util/math/Direction;idOpposite:I
intermediary field_11031
Lnet/minecraft/class_2350;field_11031:I
official l
Ljm;l:I
-
idHorizontal
private final int idHorizontal- Mappings:
Namespace Name Mixin selector named idHorizontal
Lnet/minecraft/util/math/Direction;idHorizontal:I
intermediary field_11030
Lnet/minecraft/class_2350;field_11030:I
official m
Ljm;m:I
-
name
- Mappings:
Namespace Name Mixin selector named name
Lnet/minecraft/util/math/Direction;name:Ljava/lang/String;
intermediary field_11046
Lnet/minecraft/class_2350;field_11046:Ljava/lang/String;
official n
Ljm;n:Ljava/lang/String;
-
axis
- Mappings:
Namespace Name Mixin selector named axis
Lnet/minecraft/util/math/Direction;axis:Lnet/minecraft/util/math/Direction$Axis;
intermediary field_11047
Lnet/minecraft/class_2350;field_11047:Lnet/minecraft/class_2350$class_2351;
official o
Ljm;o:Ljm$a;
-
direction
- Mappings:
Namespace Name Mixin selector named direction
Lnet/minecraft/util/math/Direction;direction:Lnet/minecraft/util/math/Direction$AxisDirection;
intermediary field_11044
Lnet/minecraft/class_2350;field_11044:Lnet/minecraft/class_2350$class_2352;
official p
Ljm;p:Ljm$b;
-
vec3i
- Mappings:
Namespace Name Mixin selector named vec3i
Lnet/minecraft/util/math/Direction;vec3i:Lnet/minecraft/util/math/Vec3i;
intermediary field_11042
Lnet/minecraft/class_2350;field_11042:Lnet/minecraft/class_2382;
official q
Ljm;q:Lkl;
-
doubleVector
- Mappings:
Namespace Name Mixin selector named doubleVector
Lnet/minecraft/util/math/Direction;doubleVector:Lnet/minecraft/util/math/Vec3d;
intermediary field_53685
Lnet/minecraft/class_2350;field_53685:Lnet/minecraft/class_243;
official r
Ljm;r:Lfbx;
-
-
Constructor Details
-
Direction
private Direction(int id, int idOpposite, int idHorizontal, String name, Direction.AxisDirection direction, Direction.Axis axis, Vec3i vector) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/util/math/Direction;<init>(Ljava/lang/String;IIIILjava/lang/String;Lnet/minecraft/util/math/Direction$AxisDirection;Lnet/minecraft/util/math/Direction$Axis;Lnet/minecraft/util/math/Vec3i;)V
intermediary <init>
Lnet/minecraft/class_2350;<init>(Ljava/lang/String;IIIILjava/lang/String;Lnet/minecraft/class_2350$class_2352;Lnet/minecraft/class_2350$class_2351;Lnet/minecraft/class_2382;)V
official <init>
Ljm;<init>(Ljava/lang/String;IIIILjava/lang/String;Ljm$b;Ljm$a;Lkl;)V
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getEntityFacingOrder
- Mappings:
Namespace Name Mixin selector named getEntityFacingOrder
Lnet/minecraft/util/math/Direction;getEntityFacingOrder(Lnet/minecraft/entity/Entity;)[Lnet/minecraft/util/math/Direction;
intermediary method_10159
Lnet/minecraft/class_2350;method_10159(Lnet/minecraft/class_1297;)[Lnet/minecraft/class_2350;
official a
Ljm;a(Lbvj;)[Ljm;
-
listClosest
Helper function that returns the 3 directions given, followed by the 3 opposite given in opposite order.- Mappings:
Namespace Name Mixin selector named listClosest
Lnet/minecraft/util/math/Direction;listClosest(Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/Direction;)[Lnet/minecraft/util/math/Direction;
intermediary method_10145
Lnet/minecraft/class_2350;method_10145(Lnet/minecraft/class_2350;Lnet/minecraft/class_2350;Lnet/minecraft/class_2350;)[Lnet/minecraft/class_2350;
official a
Ljm;a(Ljm;Ljm;Ljm;)[Ljm;
-
transform
- Mappings:
Namespace Name Mixin selector named transform
Lnet/minecraft/util/math/Direction;transform(Lorg/joml/Matrix4f;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/Direction;
intermediary method_23225
Lnet/minecraft/class_2350;method_23225(Lorg/joml/Matrix4f;Lnet/minecraft/class_2350;)Lnet/minecraft/class_2350;
official a
Ljm;a(Lorg/joml/Matrix4f;Ljm;)Ljm;
-
shuffle
Returns a shuffled collection of all directions.- Returns:
- a shuffled collection of all directions
- Mappings:
Namespace Name Mixin selector named shuffle
Lnet/minecraft/util/math/Direction;shuffle(Lnet/minecraft/util/math/random/Random;)Ljava/util/Collection;
intermediary method_42014
Lnet/minecraft/class_2350;method_42014(Lnet/minecraft/class_5819;)Ljava/util/Collection;
official a
Ljm;a(Lbam;)Ljava/util/Collection;
-
stream
- Mappings:
Namespace Name Mixin selector named stream
Lnet/minecraft/util/math/Direction;stream()Ljava/util/stream/Stream;
intermediary method_42013
Lnet/minecraft/class_2350;method_42013()Ljava/util/stream/Stream;
official a
Ljm;a()Ljava/util/stream/Stream;
-
getHorizontalDegrees
- Mappings:
Namespace Name Mixin selector named getHorizontalDegrees
Lnet/minecraft/util/math/Direction;getHorizontalDegrees(Lnet/minecraft/util/math/Direction;)F
intermediary method_62673
Lnet/minecraft/class_2350;method_62673(Lnet/minecraft/class_2350;)F
official a
Ljm;a(Ljm;)F
-
getRotationQuaternion
- Mappings:
Namespace Name Mixin selector named getRotationQuaternion
Lnet/minecraft/util/math/Direction;getRotationQuaternion()Lorg/joml/Quaternionf;
intermediary method_23224
Lnet/minecraft/class_2350;method_23224()Lorg/joml/Quaternionf;
official b
Ljm;b()Lorg/joml/Quaternionf;
-
getId
public int getId()- Mappings:
Namespace Name Mixin selector named getId
Lnet/minecraft/util/math/Direction;getId()I
intermediary method_10146
Lnet/minecraft/class_2350;method_10146()I
official d
Ljm;d()I
-
getHorizontal
public int getHorizontal()- Mappings:
Namespace Name Mixin selector named getHorizontal
Lnet/minecraft/util/math/Direction;getHorizontal()I
intermediary method_10161
Lnet/minecraft/class_2350;method_10161()I
official e
Ljm;e()I
-
getDirection
- Mappings:
Namespace Name Mixin selector named getDirection
Lnet/minecraft/util/math/Direction;getDirection()Lnet/minecraft/util/math/Direction$AxisDirection;
intermediary method_10171
Lnet/minecraft/class_2350;method_10171()Lnet/minecraft/class_2350$class_2352;
official f
Ljm;f()Ljm$b;
-
getLookDirectionForAxis
- Mappings:
Namespace Name Mixin selector named getLookDirectionForAxis
Lnet/minecraft/util/math/Direction;getLookDirectionForAxis(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Direction$Axis;)Lnet/minecraft/util/math/Direction;
intermediary method_32801
Lnet/minecraft/class_2350;method_32801(Lnet/minecraft/class_1297;Lnet/minecraft/class_2350$class_2351;)Lnet/minecraft/class_2350;
official a
Ljm;a(Lbvj;Ljm$a;)Ljm;
-
getOpposite
- Mappings:
Namespace Name Mixin selector named getOpposite
Lnet/minecraft/util/math/Direction;getOpposite()Lnet/minecraft/util/math/Direction;
intermediary method_10153
Lnet/minecraft/class_2350;method_10153()Lnet/minecraft/class_2350;
official g
Ljm;g()Ljm;
-
rotateClockwise
- Mappings:
Namespace Name Mixin selector named rotateClockwise
Lnet/minecraft/util/math/Direction;rotateClockwise(Lnet/minecraft/util/math/Direction$Axis;)Lnet/minecraft/util/math/Direction;
intermediary method_35833
Lnet/minecraft/class_2350;method_35833(Lnet/minecraft/class_2350$class_2351;)Lnet/minecraft/class_2350;
official a
Ljm;a(Ljm$a;)Ljm;
-
rotateCounterclockwise
- Mappings:
Namespace Name Mixin selector named rotateCounterclockwise
Lnet/minecraft/util/math/Direction;rotateCounterclockwise(Lnet/minecraft/util/math/Direction$Axis;)Lnet/minecraft/util/math/Direction;
intermediary method_35834
Lnet/minecraft/class_2350;method_35834(Lnet/minecraft/class_2350$class_2351;)Lnet/minecraft/class_2350;
official b
Ljm;b(Ljm$a;)Ljm;
-
rotateYClockwise
- Mappings:
Namespace Name Mixin selector named rotateYClockwise
Lnet/minecraft/util/math/Direction;rotateYClockwise()Lnet/minecraft/util/math/Direction;
intermediary method_10170
Lnet/minecraft/class_2350;method_10170()Lnet/minecraft/class_2350;
official h
Ljm;h()Ljm;
-
rotateXClockwise
- Mappings:
Namespace Name Mixin selector named rotateXClockwise
Lnet/minecraft/util/math/Direction;rotateXClockwise()Lnet/minecraft/util/math/Direction;
intermediary method_35835
Lnet/minecraft/class_2350;method_35835()Lnet/minecraft/class_2350;
official s
Ljm;s()Ljm;
-
rotateXCounterclockwise
- Mappings:
Namespace Name Mixin selector named rotateXCounterclockwise
Lnet/minecraft/util/math/Direction;rotateXCounterclockwise()Lnet/minecraft/util/math/Direction;
intermediary method_35836
Lnet/minecraft/class_2350;method_35836()Lnet/minecraft/class_2350;
official t
Ljm;t()Ljm;
-
rotateZClockwise
- Mappings:
Namespace Name Mixin selector named rotateZClockwise
Lnet/minecraft/util/math/Direction;rotateZClockwise()Lnet/minecraft/util/math/Direction;
intermediary method_35837
Lnet/minecraft/class_2350;method_35837()Lnet/minecraft/class_2350;
official u
Ljm;u()Ljm;
-
rotateZCounterclockwise
- Mappings:
Namespace Name Mixin selector named rotateZCounterclockwise
Lnet/minecraft/util/math/Direction;rotateZCounterclockwise()Lnet/minecraft/util/math/Direction;
intermediary method_35838
Lnet/minecraft/class_2350;method_35838()Lnet/minecraft/class_2350;
official v
Ljm;v()Ljm;
-
rotateYCounterclockwise
- Mappings:
Namespace Name Mixin selector named rotateYCounterclockwise
Lnet/minecraft/util/math/Direction;rotateYCounterclockwise()Lnet/minecraft/util/math/Direction;
intermediary method_10160
Lnet/minecraft/class_2350;method_10160()Lnet/minecraft/class_2350;
official i
Ljm;i()Ljm;
-
getOffsetX
public int getOffsetX()- Mappings:
Namespace Name Mixin selector named getOffsetX
Lnet/minecraft/util/math/Direction;getOffsetX()I
intermediary method_10148
Lnet/minecraft/class_2350;method_10148()I
official j
Ljm;j()I
-
getOffsetY
public int getOffsetY()- Mappings:
Namespace Name Mixin selector named getOffsetY
Lnet/minecraft/util/math/Direction;getOffsetY()I
intermediary method_10164
Lnet/minecraft/class_2350;method_10164()I
official k
Ljm;k()I
-
getOffsetZ
public int getOffsetZ()- Mappings:
Namespace Name Mixin selector named getOffsetZ
Lnet/minecraft/util/math/Direction;getOffsetZ()I
intermediary method_10165
Lnet/minecraft/class_2350;method_10165()I
official l
Ljm;l()I
-
getUnitVector
- Mappings:
Namespace Name Mixin selector named getUnitVector
Lnet/minecraft/util/math/Direction;getUnitVector()Lorg/joml/Vector3f;
intermediary method_23955
Lnet/minecraft/class_2350;method_23955()Lorg/joml/Vector3f;
official m
Ljm;m()Lorg/joml/Vector3f;
-
getName
- Mappings:
Namespace Name Mixin selector named getName
Lnet/minecraft/util/math/Direction;getName()Ljava/lang/String;
intermediary method_10151
Lnet/minecraft/class_2350;method_10151()Ljava/lang/String;
official n
Ljm;n()Ljava/lang/String;
-
getAxis
- Mappings:
Namespace Name Mixin selector named getAxis
Lnet/minecraft/util/math/Direction;getAxis()Lnet/minecraft/util/math/Direction$Axis;
intermediary method_10166
Lnet/minecraft/class_2350;method_10166()Lnet/minecraft/class_2350$class_2351;
official o
Ljm;o()Ljm$a;
-
byName
Returns a direction with the givenname
, ornull
if there is no such direction.- Returns:
- a direction with the given
name
, ornull
if there is no such direction - Mappings:
Namespace Name Mixin selector named byName
Lnet/minecraft/util/math/Direction;byName(Ljava/lang/String;)Lnet/minecraft/util/math/Direction;
intermediary method_10168
Lnet/minecraft/class_2350;method_10168(Ljava/lang/String;)Lnet/minecraft/class_2350;
official a
Ljm;a(Ljava/lang/String;)Ljm;
-
byId
- Mappings:
Namespace Name Mixin selector named byId
Lnet/minecraft/util/math/Direction;byId(I)Lnet/minecraft/util/math/Direction;
intermediary method_10143
Lnet/minecraft/class_2350;method_10143(I)Lnet/minecraft/class_2350;
official a
Ljm;a(I)Ljm;
-
fromHorizontal
- Mappings:
Namespace Name Mixin selector named fromHorizontal
Lnet/minecraft/util/math/Direction;fromHorizontal(I)Lnet/minecraft/util/math/Direction;
intermediary method_10139
Lnet/minecraft/class_2350;method_10139(I)Lnet/minecraft/class_2350;
official b
Ljm;b(I)Ljm;
-
fromRotation
- Mappings:
Namespace Name Mixin selector named fromRotation
Lnet/minecraft/util/math/Direction;fromRotation(D)Lnet/minecraft/util/math/Direction;
intermediary method_10150
Lnet/minecraft/class_2350;method_10150(D)Lnet/minecraft/class_2350;
official a
Ljm;a(D)Ljm;
-
from
- Mappings:
Namespace Name Mixin selector named from
Lnet/minecraft/util/math/Direction;from(Lnet/minecraft/util/math/Direction$Axis;Lnet/minecraft/util/math/Direction$AxisDirection;)Lnet/minecraft/util/math/Direction;
intermediary method_10169
Lnet/minecraft/class_2350;method_10169(Lnet/minecraft/class_2350$class_2351;Lnet/minecraft/class_2350$class_2352;)Lnet/minecraft/class_2350;
official a
Ljm;a(Ljm$a;Ljm$b;)Ljm;
-
asRotation
public float asRotation()- Mappings:
Namespace Name Mixin selector named asRotation
Lnet/minecraft/util/math/Direction;asRotation()F
intermediary method_10144
Lnet/minecraft/class_2350;method_10144()F
official p
Ljm;p()F
-
random
- Mappings:
Namespace Name Mixin selector named random
Lnet/minecraft/util/math/Direction;random(Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/util/math/Direction;
intermediary method_10162
Lnet/minecraft/class_2350;method_10162(Lnet/minecraft/class_5819;)Lnet/minecraft/class_2350;
official b
Ljm;b(Lbam;)Ljm;
-
getFacing
- Mappings:
Namespace Name Mixin selector named getFacing
Lnet/minecraft/util/math/Direction;getFacing(DDD)Lnet/minecraft/util/math/Direction;
intermediary method_10142
Lnet/minecraft/class_2350;method_10142(DDD)Lnet/minecraft/class_2350;
official a
Ljm;a(DDD)Ljm;
-
getFacing
- Mappings:
Namespace Name Mixin selector named getFacing
Lnet/minecraft/util/math/Direction;getFacing(FFF)Lnet/minecraft/util/math/Direction;
intermediary method_10147
Lnet/minecraft/class_2350;method_10147(FFF)Lnet/minecraft/class_2350;
official a
Ljm;a(FFF)Ljm;
-
getFacing
- Mappings:
Namespace Name Mixin selector named getFacing
Lnet/minecraft/util/math/Direction;getFacing(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Direction;
intermediary method_58251
Lnet/minecraft/class_2350;method_58251(Lnet/minecraft/class_243;)Lnet/minecraft/class_2350;
official a
Ljm;a(Lfbx;)Ljm;
-
fromVector
@Contract("_,_,_,!null->!null;_,_,_,_->_") @Nullable public static @Nullable Direction fromVector(int x, int y, int z, @Nullable @Nullable Direction fallback) Returns the closest direction of the vector, orfallback
for zero vector.- Returns:
- the closest direction of the vector, or
fallback
for zero vector - Mappings:
Namespace Name Mixin selector named fromVector
Lnet/minecraft/util/math/Direction;fromVector(IIILnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/Direction;
intermediary method_62672
Lnet/minecraft/class_2350;method_62672(IIILnet/minecraft/class_2350;)Lnet/minecraft/class_2350;
official a
Ljm;a(IIILjm;)Ljm;
-
fromVector
@Contract("_,!null->!null;_,_->_") @Nullable public static @Nullable Direction fromVector(Vec3i vec, @Nullable @Nullable Direction fallback) - Mappings:
Namespace Name Mixin selector named fromVector
Lnet/minecraft/util/math/Direction;fromVector(Lnet/minecraft/util/math/Vec3i;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/Direction;
intermediary method_62674
Lnet/minecraft/class_2350;method_62674(Lnet/minecraft/class_2382;Lnet/minecraft/class_2350;)Lnet/minecraft/class_2350;
official a
Ljm;a(Lkl;Ljm;)Ljm;
-
toString
-
asString
Returns the unique string representation of the enum, used for serialization.- Specified by:
asString
in interfaceStringIdentifiable
- Returns:
- the unique string representation of the enum, used for serialization
- Mappings:
Namespace Name Mixin selector named asString
Lnet/minecraft/util/StringIdentifiable;asString()Ljava/lang/String;
intermediary method_15434
Lnet/minecraft/class_3542;method_15434()Ljava/lang/String;
official c
Lbba;c()Ljava/lang/String;
-
validateVertical
- Mappings:
Namespace Name Mixin selector named validateVertical
Lnet/minecraft/util/math/Direction;validateVertical(Lnet/minecraft/util/math/Direction;)Lcom/mojang/serialization/DataResult;
intermediary method_38940
Lnet/minecraft/class_2350;method_38940(Lnet/minecraft/class_2350;)Lcom/mojang/serialization/DataResult;
official b
Ljm;b(Ljm;)Lcom/mojang/serialization/DataResult;
-
get
- Mappings:
Namespace Name Mixin selector named get
Lnet/minecraft/util/math/Direction;get(Lnet/minecraft/util/math/Direction$AxisDirection;Lnet/minecraft/util/math/Direction$Axis;)Lnet/minecraft/util/math/Direction;
intermediary method_10156
Lnet/minecraft/class_2350;method_10156(Lnet/minecraft/class_2350$class_2352;Lnet/minecraft/class_2350$class_2351;)Lnet/minecraft/class_2350;
official a
Ljm;a(Ljm$b;Ljm$a;)Ljm;
-
getVector
- Mappings:
Namespace Name Mixin selector named getVector
Lnet/minecraft/util/math/Direction;getVector()Lnet/minecraft/util/math/Vec3i;
intermediary method_62675
Lnet/minecraft/class_2350;method_62675()Lnet/minecraft/class_2382;
official q
Ljm;q()Lkl;
-
getDoubleVector
- Mappings:
Namespace Name Mixin selector named getDoubleVector
Lnet/minecraft/util/math/Direction;getDoubleVector()Lnet/minecraft/util/math/Vec3d;
intermediary method_62676
Lnet/minecraft/class_2350;method_62676()Lnet/minecraft/class_243;
official r
Ljm;r()Lfbx;
-
pointsTo
public boolean pointsTo(float yaw) Returns whether the given yaw points to the direction.- Returns:
- whether the given yaw points to the direction
- Implementation Note:
- This returns whether the yaw can make an acute angle with the direction.
This always returns
false
for vertical directions. - Mappings:
Namespace Name Mixin selector named pointsTo
Lnet/minecraft/util/math/Direction;pointsTo(F)Z
intermediary method_30928
Lnet/minecraft/class_2350;method_30928(F)Z
official a
Ljm;a(F)Z
-