Enum Class Direction
- 所有已实现的接口:
Serializable
,Comparable<Direction>
,Constable
,StringRepresentable
-
嵌套类概要
嵌套类修饰符和类型类说明static enum
static enum
static enum
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
从接口继承的嵌套类/接口 net.minecraft.util.StringRepresentable
StringRepresentable.EnumCodec<E extends Enum<E> & StringRepresentable>
-
枚举常量概要
枚举常量 -
字段概要
字段修饰符和类型字段说明private final Direction.Axis
private final Direction.AxisDirection
private static final Direction[]
private static final Direction[]
static final StringRepresentable.EnumCodec<Direction>
private final int
private final int
private final String
private final Vec3i
private final int
private static final Direction[]
static final com.mojang.serialization.Codec<Direction>
从接口继承的字段 net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
构造器概要
构造器限定符构造器说明private
Direction
(int pData3d, int pOppositeIndex, int pData2d, String pName, Direction.AxisDirection pAxisDirection, Direction.Axis pAxis, Vec3i pNormal) -
方法概要
修饰符和类型方法说明static Collection<Direction>
allShuffled
(RandomSource pRandom) static Direction
static Direction
from2DDataValue
(int pHorizontalIndex) static Direction
from3DDataValue
(int pIndex) static Direction
fromAxisAndDirection
(Direction.Axis pAxis, Direction.AxisDirection pAxisDirection) static Direction
fromDelta
(int pX, int pY, int pZ) static Direction
fromYRot
(double pAngle) static Direction
get
(Direction.AxisDirection pAxisDirection, Direction.Axis pAxis) int
int
getAxis()
getClockWise
(Direction.Axis pAxis) private Direction
private Direction
private Direction
private Direction
static Direction
getFacingAxis
(Entity pEntity, Direction.Axis pAxis) getName()
static Direction
getNearest
(double pX, double pY, double pZ) static Direction
getNearest
(float pX, float pY, float pZ) static Direction
getNearestStable
(float pX, float pY, float pZ) NeoForge: Version ofgetNearest(float, float, float)
that accounts for potential rounding errors.static Direction
getRandom
(RandomSource pRandom) org.joml.Quaternionf
int
getStepX()
int
getStepY()
int
getStepZ()
boolean
isFacingAngle
(float pDegrees) private static Direction[]
makeDirectionArray
(Direction pFirst, Direction pSecond, Direction pThird) static Direction[]
orderedByNearest
(Entity pEntity) static Direction
org.joml.Vector3f
step()
stream()
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.private static com.mojang.serialization.DataResult<Direction>
verifyVertical
(Direction p_194529_)
-
枚举常量详细资料
-
DOWN
-
UP
-
NORTH
-
SOUTH
-
WEST
-
EAST
-
-
字段详细资料
-
CODEC
-
VERTICAL_CODEC
-
data3d
private final int data3d -
oppositeIndex
private final int oppositeIndex -
data2d
private final int data2d -
name
-
axis
-
axisDirection
-
normal
-
VALUES
-
BY_3D_DATA
-
BY_2D_DATA
-
-
构造器详细资料
-
Direction
private Direction(int pData3d, int pOppositeIndex, int pData2d, String pName, Direction.AxisDirection pAxisDirection, Direction.Axis pAxis, Vec3i pNormal)
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- 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.)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- 如果参数为空值
-
orderedByNearest
-
makeDirectionArray
-
rotate
-
allShuffled
-
stream
-
getRotation
public org.joml.Quaternionf getRotation() -
get3DDataValue
public int get3DDataValue() -
get2DDataValue
public int get2DDataValue() -
getAxisDirection
-
getFacingAxis
-
getOpposite
-
getClockWise
-
getCounterClockWise
-
getClockWise
-
getClockWiseX
-
getCounterClockWiseX
-
getClockWiseZ
-
getCounterClockWiseZ
-
getCounterClockWise
-
getStepX
public int getStepX() -
getStepY
public int getStepY() -
getStepZ
public int getStepZ() -
step
public org.joml.Vector3f step() -
getName
-
getAxis
-
byName
-
from3DDataValue
-
from2DDataValue
-
fromDelta
-
fromYRot
-
fromAxisAndDirection
public static Direction fromAxisAndDirection(Direction.Axis pAxis, Direction.AxisDirection pAxisDirection) -
toYRot
public float toYRot() -
getRandom
-
getNearest
-
getNearest
-
getNearestStable
NeoForge: Version ofgetNearest(float, float, float)
that accounts for potential rounding errors. -
toString
-
getSerializedName
- 指定者:
getSerializedName
在接口中StringRepresentable
-
verifyVertical
-
get
-
getNormal
-
isFacingAngle
public boolean isFacingAngle(float pDegrees)
-