public enum Direction extends java.lang.Enum<Direction> implements IStringSerializable
修飾子とタイプ | クラスと説明 |
---|---|
static class |
Direction.Axis |
static class |
Direction.AxisDirection |
static class |
Direction.Plane |
修飾子とタイプ | メソッドと説明 |
---|---|
static Direction |
byHorizontalIndex(int horizontalIndexIn)
Gets the EnumFacing corresponding to the given horizontal index (0-3).
|
static Direction |
byIndex(int index)
Gets the EnumFacing corresponding to the given index (0-5).
|
static Direction |
byLong(int x,
int y,
int z) |
static Direction |
byName(java.lang.String name)
Get the facing specified by the given name
|
static Direction |
fromAngle(double angle)
Get the EnumFacing corresponding to the given angle in degrees (0-360).
|
Direction.Axis |
getAxis() |
Direction.AxisDirection |
getAxisDirection()
Get the AxisDirection of this Facing.
|
Vec3i |
getDirectionVec()
Get a normalized Vector that points in the direction of this Facing.
|
static Direction[] |
getFacingDirections(Entity entityIn)
Gets the
EnumFacing values for the provided entity's
looking direction. |
static Direction |
getFacingFromAxis(Direction.AxisDirection axisDirectionIn,
Direction.Axis axisIn) |
static Direction |
getFacingFromAxisDirection(Direction.Axis axisIn,
Direction.AxisDirection axisDirectionIn) |
static Direction |
getFacingFromVector(double x,
double y,
double z) |
static Direction |
getFacingFromVector(float x,
float y,
float z) |
float |
getHorizontalAngle()
Gets the angle in degrees corresponding to this EnumFacing.
|
int |
getHorizontalIndex()
Get the index of this horizontal facing (0-3).
|
int |
getIndex()
Get the Index of this Facing (0-5).
|
java.lang.String |
getName() |
java.lang.String |
getName2()
Same as getName, but does not override the method from Enum.
|
Direction |
getOpposite()
Get the opposite Facing (e.g.
|
Quaternion |
getRotation() |
int |
getXOffset()
Gets the offset in the x direction to the block in front of this facing.
|
int |
getYOffset()
Gets the offset in the y direction to the block in front of this facing.
|
int |
getZOffset()
Gets the offset in the z direction to the block in front of this facing.
|
static Direction |
random(java.util.Random rand)
Choose a random Facing using the given Random
|
static Direction |
rotateFace(Matrix4f matrixIn,
Direction directionIn) |
Direction |
rotateY()
Rotate this Facing around the Y axis clockwise (NORTH => EAST => SOUTH => WEST => NORTH)
|
Direction |
rotateYCCW()
Rotate this Facing around the Y axis counter-clockwise (NORTH => WEST => SOUTH => EAST => NORTH)
|
java.lang.String |
toString() |
Vector3f |
toVector3f() |
static Direction |
valueOf(java.lang.String name)
指定した名前を持つこの型の列挙型定数を返します。
|
static Direction[] |
values()
この列挙型の定数を含む配列を宣言されている順序で返します。
|
public static final Direction DOWN
public static final Direction UP
public static final Direction NORTH
public static final Direction SOUTH
public static final Direction WEST
public static final Direction EAST
public static Direction[] values()
for(Direction c: Direction.values()) System.out.println(c);
public static Direction valueOf(java.lang.String name)
name
- 返される列挙型定数の名前。java.lang.IllegalArgumentException
- この列挙型に、指定した名前の定数がない場合java.lang.NullPointerException
- 引数がnullの場合public static Direction[] getFacingDirections(Entity entityIn)
EnumFacing
values for the provided entity's
looking direction. Dependent on yaw and pitch of entity looking.public Quaternion getRotation()
public int getIndex()
public int getHorizontalIndex()
public Direction.AxisDirection getAxisDirection()
public Direction getOpposite()
public Direction rotateY()
public Direction rotateYCCW()
public int getXOffset()
public int getYOffset()
public int getZOffset()
public Vector3f toVector3f()
public java.lang.String getName2()
public Direction.Axis getAxis()
@Nullable public static Direction byName(@Nullable java.lang.String name)
public static Direction byIndex(int index)
public static Direction byHorizontalIndex(int horizontalIndexIn)
@Nullable public static Direction byLong(int x, int y, int z)
public static Direction fromAngle(double angle)
public static Direction getFacingFromAxisDirection(Direction.Axis axisIn, Direction.AxisDirection axisDirectionIn)
public float getHorizontalAngle()
public static Direction random(java.util.Random rand)
public static Direction getFacingFromVector(double x, double y, double z)
public static Direction getFacingFromVector(float x, float y, float z)
public java.lang.String toString()
toString
クラス内 java.lang.Enum<Direction>
public java.lang.String getName()
getName
インタフェース内 IStringSerializable
public static Direction getFacingFromAxis(Direction.AxisDirection axisDirectionIn, Direction.Axis axisIn)
public Vec3i getDirectionVec()