Package net.minecraft.core
Enum Class Direction
- All Implemented Interfaces:
- Serializable,- Comparable<Direction>,- Constable,- StringRepresentable
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentableStringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>
- 
Enum Constant SummaryEnum Constants
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Direction.Axisprivate final Direction.AxisDirectionprivate static final Direction[]private static final Direction[]static final StringRepresentable.EnumCodec<Direction>private final intprivate final intprivate final Stringprivate final Vec3iprivate final intprivate static final Direction[]static final com.mojang.serialization.Codec<Direction>Fields inherited from interface net.minecraft.util.StringRepresentablePRE_BUILT_MAP_THRESHOLD
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateDirection(int p_122356_, int p_122357_, int p_122358_, String p_122359_, Direction.AxisDirection p_122360_, Direction.Axis p_122361_, Vec3i p_122362_) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic Collection<Direction>allShuffled(RandomSource p_235668_) static Directionstatic Directionfrom2DDataValue(int p_122408_) static Directionfrom3DDataValue(int p_122377_) static DirectionfromAxisAndDirection(Direction.Axis p_122388_, Direction.AxisDirection p_122389_) static DirectionfromDelta(int p_278323_, int p_278296_, int p_278347_) static DirectionfromYRot(double p_122365_) static Directionget(Direction.AxisDirection p_122391_, Direction.Axis p_122392_) intintgetAxis()getClockWise(Direction.Axis p_175363_) private Directionprivate DirectiongetCounterClockWise(Direction.Axis p_175365_) private Directionprivate Directionstatic DirectiongetFacingAxis(Entity p_175358_, Direction.Axis p_175359_) getName()static DirectiongetNearest(double p_122367_, double p_122368_, double p_122369_) static DirectiongetNearest(float p_122373_, float p_122374_, float p_122375_) static DirectiongetRandom(RandomSource p_235673_) org.joml.QuaternionfintgetStepX()intgetStepY()intgetStepZ()booleanisFacingAngle(float p_122371_) private static Direction[]makeDirectionArray(Direction p_122399_, Direction p_122400_, Direction p_122401_) static Direction[]orderedByNearest(Entity p_122383_) static Directionorg.joml.Vector3fstep()stream()toString()floattoYRot()static DirectionReturns 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.private static com.mojang.serialization.DataResult<Direction>verifyVertical(Direction p_194529_) 
- 
Enum Constant Details- 
DOWN
- 
UP
- 
NORTH
- 
SOUTH
- 
WEST
- 
EAST
 
- 
- 
Field Details- 
CODEC
- 
VERTICAL_CODEC
- 
data3dprivate final int data3d
- 
oppositeIndexprivate final int oppositeIndex
- 
data2dprivate final int data2d
- 
name
- 
axis
- 
axisDirection
- 
normal
- 
VALUES
- 
BY_3D_DATA
- 
BY_2D_DATA
 
- 
- 
Constructor Details- 
Directionprivate Direction(int p_122356_, int p_122357_, int p_122358_, String p_122359_, Direction.AxisDirection p_122360_, Direction.Axis p_122361_, Vec3i p_122362_) 
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
orderedByNearest
- 
makeDirectionArray
- 
rotate
- 
allShuffled
- 
stream
- 
getRotationpublic org.joml.Quaternionf getRotation()
- 
get3DDataValuepublic int get3DDataValue()
- 
get2DDataValuepublic int get2DDataValue()
- 
getAxisDirection
- 
getFacingAxis
- 
getOpposite
- 
getClockWise
- 
getCounterClockWise
- 
getClockWise
- 
getClockWiseX
- 
getCounterClockWiseX
- 
getClockWiseZ
- 
getCounterClockWiseZ
- 
getCounterClockWise
- 
getStepXpublic int getStepX()
- 
getStepYpublic int getStepY()
- 
getStepZpublic int getStepZ()
- 
steppublic org.joml.Vector3f step()
- 
getName
- 
getAxis
- 
byName
- 
from3DDataValue
- 
from2DDataValue
- 
fromDelta
- 
fromYRot
- 
fromAxisAndDirectionpublic static Direction fromAxisAndDirection(Direction.Axis p_122388_, Direction.AxisDirection p_122389_) 
- 
toYRotpublic float toYRot()
- 
getRandom
- 
getNearest
- 
getNearest
- 
toString
- 
getSerializedName- Specified by:
- getSerializedNamein interface- StringRepresentable
 
- 
verifyVertical
- 
get
- 
getNormal
- 
isFacingAnglepublic boolean isFacingAngle(float p_122371_) 
 
-