Package net.minecraft.util
Enum Class Direction
- All Implemented Interfaces:
Serializable,Comparable<Direction>,Constable,IStringSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Direction.Axisprivate final Direction.AxisDirectionprivate static final Direction[]private static final Direction[]private static final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Direction>private final intprivate final intprivate final Stringprivate final Vector3iprivate final intprivate static final Direction[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDirection(int p_i46016_3_, int p_i46016_4_, int p_i46016_5_, String p_i46016_6_, Direction.AxisDirection p_i46016_7_, Direction.Axis p_i46016_8_, Vector3i p_i46016_9_) -
Method Summary
Modifier and TypeMethodDescriptionstatic Directionstatic Directionfrom2DDataValue(int p_176731_0_) static Directionfrom3DDataValue(int p_82600_0_) static DirectionfromAxisAndDirection(Direction.Axis p_211699_0_, Direction.AxisDirection p_211699_1_) static DirectionfromNormal(int p_218383_0_, int p_218383_1_, int p_218383_2_) static DirectionfromYRot(double p_176733_0_) static Directionget(Direction.AxisDirection p_181076_0_, Direction.Axis p_181076_1_) intintgetAxis()getName()static DirectiongetNearest(double p_210769_0_, double p_210769_2_, double p_210769_4_) static DirectiongetNearest(float p_176737_0_, float p_176737_1_, float p_176737_2_) static DirectionintgetStepX()intgetStepY()intgetStepZ()booleanisFacingAngle(float p_243532_1_) private static Direction[]makeDirectionArray(Direction p_196053_0_, Direction p_196053_1_, Direction p_196053_2_) static Direction[]orderedByNearest(Entity p_196054_0_) static Directionstep()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.
-
Enum Constant Details
-
DOWN
-
UP
-
NORTH
-
SOUTH
-
WEST
-
EAST
-
-
Field Details
-
data3d
private final int data3d -
oppositeIndex
private final int oppositeIndex -
data2d
private final int data2d -
name
-
axis
-
axisDirection
-
normal
-
VALUES
-
BY_NAME
-
BY_3D_DATA
-
BY_2D_DATA
-
BY_NORMAL
-
-
Constructor Details
-
Direction
private Direction(int p_i46016_3_, int p_i46016_4_, int p_i46016_5_, String p_i46016_6_, Direction.AxisDirection p_i46016_7_, Direction.Axis p_i46016_8_, Vector3i p_i46016_9_)
-
-
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
-
orderedByNearest
-
makeDirectionArray
-
rotate
-
getRotation
-
get3DDataValue
public int get3DDataValue() -
get2DDataValue
public int get2DDataValue() -
getAxisDirection
-
getOpposite
-
getClockWise
-
getCounterClockWise
-
getStepX
public int getStepX() -
getStepY
public int getStepY() -
getStepZ
public int getStepZ() -
step
-
getName
-
getAxis
-
byName
-
from3DDataValue
-
from2DDataValue
-
fromNormal
-
fromYRot
-
fromAxisAndDirection
public static Direction fromAxisAndDirection(Direction.Axis p_211699_0_, Direction.AxisDirection p_211699_1_) -
toYRot
public float toYRot() -
getRandom
-
getNearest
-
getNearest
-
toString
-
getSerializedName
- Specified by:
getSerializedNamein interfaceIStringSerializable
-
get
-
getNormal
-
isFacingAngle
public boolean isFacingAngle(float p_243532_1_)
-