枚举类 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>, StringRepresentable.StringRepresentableCodec<S extends StringRepresentable>
-
枚举常量概要
枚举常量 -
字段概要
字段修饰符和类型字段说明private final Direction.Axis
private final Direction.AxisDirection
private static final Direction[]
private static final Direction[]
static final IntFunction
<Direction> static final StringRepresentable.EnumCodec
<Direction> private final int
private final int
static final com.mojang.serialization.Codec
<Direction> 已过时。static final com.mojang.serialization.Codec
<Direction> 已过时。private final String
private final Vec3i
private final Vec3
private final org.joml.Vector3fc
private final int
static final StreamCodec
<io.netty.buffer.ByteBuf, Direction> private static final Direction[]
static final com.mojang.serialization.Codec
<Direction> 从接口继承的字段 net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD
-
构造器概要
构造器限定符构造器说明private
Direction
(int p_122356_, int p_122357_, int p_122358_, String p_122359_, Direction.AxisDirection p_122360_, Direction.Axis p_122361_, Vec3i p_122362_) -
方法概要
修饰符和类型方法说明static Collection
<Direction> allShuffled
(RandomSource p_235668_) static Direction
static Direction
from2DDataValue
(int p_122408_) static Direction
from3DDataValue
(int p_122377_) static Direction
fromAxisAndDirection
(Direction.Axis p_122388_, Direction.AxisDirection p_122389_) static Direction
fromYRot
(double p_122365_) static Direction
get
(Direction.AxisDirection p_122391_, Direction.Axis p_122392_) int
int
static Direction
getApproximateNearest
(double p_362121_, double p_364871_, double p_364153_) static Direction
getApproximateNearest
(float p_122373_, float p_122374_, float p_122375_) static Direction
getApproximateNearest
(Vec3 p_361200_) getAxis()
getClockWise
(Direction.Axis p_175363_) private Direction
private Direction
getCounterClockWise
(Direction.Axis p_175365_) private Direction
private Direction
static Direction
getFacingAxis
(Entity p_175358_, Direction.Axis p_175359_) getName()
static Direction
getNearest
(int p_365087_, int p_364094_, int p_361757_, Direction p_364698_) static Direction
getNearest
(Vec3i p_362245_, Direction p_363910_) static Direction
getRandom
(RandomSource p_235673_) org.joml.Quaternionf
int
getStepX()
int
getStepY()
int
getStepZ()
org.joml.Vector3fc
static float
boolean
isFacingAngle
(float p_122371_) private static Direction[]
makeDirectionArray
(Direction p_122399_, Direction p_122400_, Direction p_122401_) static Direction[]
orderedByNearest
(Entity p_122383_) static Direction
org.joml.Vector3f
step()
stream()
toString()
float
toYRot()
static Direction
返回带有指定名称的该类的枚举常量。static Direction[]
values()
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同private static com.mojang.serialization.DataResult
<Direction> verifyVertical
(Direction p_194529_)
-
枚举常量详细资料
-
DOWN
-
UP
-
NORTH
-
SOUTH
-
WEST
-
EAST
-
-
字段详细资料
-
CODEC
-
VERTICAL_CODEC
-
BY_ID
-
STREAM_CODEC
-
LEGACY_ID_CODEC
已过时。 -
LEGACY_ID_CODEC_2D
已过时。 -
data3d
private final int data3d -
oppositeIndex
private final int oppositeIndex -
data2d
private final int data2d -
name
-
axis
-
axisDirection
-
normal
-
normalVec3
-
normalVec3f
private final org.joml.Vector3fc normalVec3f -
VALUES
-
BY_3D_DATA
-
BY_2D_DATA
-
-
构造器详细资料
-
Direction
private Direction(int p_122356_, int p_122357_, int p_122358_, String p_122359_, Direction.AxisDirection p_122360_, Direction.Axis p_122361_, Vec3i p_122362_)
-
-
方法详细资料
-
values
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同- 返回:
- 包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
-
valueOf
返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name
- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException
- 如果该枚举类没有带有指定名称的常量NullPointerException
- 如果参数为空值
-
orderedByNearest
-
makeDirectionArray
-
rotate
-
allShuffled
-
stream
-
getYRot
-
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
-
fromYRot
-
fromAxisAndDirection
public static Direction fromAxisAndDirection(Direction.Axis p_122388_, Direction.AxisDirection p_122389_) -
toYRot
public float toYRot() -
getRandom
-
getApproximateNearest
-
getApproximateNearest
-
getApproximateNearest
-
getNearest
-
getNearest
-
toString
-
getSerializedName
- 指定者:
getSerializedName
在接口中StringRepresentable
-
verifyVertical
-
get
-
getUnitVec3i
-
getUnitVec3
-
getUnitVec3f
public org.joml.Vector3fc getUnitVec3f() -
isFacingAngle
public boolean isFacingAngle(float p_122371_)
-