Package net.minecraft.util
Enum Class Direction
- All Implemented Interfaces:
Serializable
,Comparable<Direction>
,Constable
,IStringSerializable
-
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>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Direction.Axis
private final Direction.AxisDirection
private static final Direction[]
private static final Direction[]
private static final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Direction>
private final int
private final int
private final String
private final Vector3i
private final int
private static final Direction[]
-
Constructor Summary
ModifierConstructorDescriptionprivate
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 Summary
Modifier and TypeMethodDescriptionstatic Direction
static Direction
from2DDataValue
(int p_176731_0_) static Direction
from3DDataValue
(int p_82600_0_) static Direction
fromAxisAndDirection
(Direction.Axis p_211699_0_, Direction.AxisDirection p_211699_1_) static Direction
fromNormal
(int p_218383_0_, int p_218383_1_, int p_218383_2_) static Direction
fromYRot
(double p_176733_0_) static Direction
get
(Direction.AxisDirection p_181076_0_, Direction.Axis p_181076_1_) int
int
getAxis()
getName()
static Direction
getNearest
(double p_210769_0_, double p_210769_2_, double p_210769_4_) static Direction
getNearest
(float p_176737_0_, float p_176737_1_, float p_176737_2_) static Direction
int
getStepX()
int
getStepY()
int
getStepZ()
boolean
isFacingAngle
(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 Direction
step()
toString()
float
toYRot()
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
-
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:
getSerializedName
in interfaceIStringSerializable
-
get
-
getNormal
-
isFacingAngle
public boolean isFacingAngle(float p_243532_1_)
-