public enum EnumFacing extends java.lang.Enum<EnumFacing> implements IStringSerializable
Modifier and Type | Class and Description |
---|---|
static class |
EnumFacing.Axis |
static class |
EnumFacing.AxisDirection |
static class |
EnumFacing.Plane |
Modifier and Type | Field and Description |
---|---|
static EnumFacing[] |
HORIZONTALS
All Facings with horizontal axis in order S-W-N-E
|
static EnumFacing[] |
VALUES
All facings in D-U-N-S-W-E order
|
Modifier and Type | Method and Description |
---|---|
static EnumFacing |
byName(java.lang.String name)
Get the facing specified by the given name
|
static EnumFacing |
fromAngle(double angle)
Get the Facing corresponding to the given angle (0-360).
|
static EnumFacing |
func_181076_a(EnumFacing.AxisDirection p_181076_0_,
EnumFacing.Axis p_181076_1_) |
EnumFacing.Axis |
getAxis() |
EnumFacing.AxisDirection |
getAxisDirection()
Get the AxisDirection of this Facing.
|
Vec3i |
getDirectionVec()
Get a normalized Vector that points in the direction of this Facing.
|
static EnumFacing |
getFacingFromVector(float p_176737_0_,
float p_176737_1_,
float p_176737_2_) |
static EnumFacing |
getFront(int index)
Get a Facing by it's index (0-5).
|
int |
getFrontOffsetX()
Returns a offset that addresses the block in front of this facing.
|
int |
getFrontOffsetY() |
int |
getFrontOffsetZ()
Returns a offset that addresses the block in front of this facing.
|
static EnumFacing |
getHorizontal(int p_176731_0_)
Get a Facing by it's horizontal index (0-3).
|
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.
|
EnumFacing |
getOpposite()
Get the opposite Facing (e.g.
|
static EnumFacing |
random(java.util.Random rand)
Choose a random Facing using the given Random
|
EnumFacing |
rotateAround(EnumFacing.Axis axis)
Rotate this Facing around the given axis clockwise.
|
EnumFacing |
rotateY()
Rotate this Facing around the Y axis clockwise (NORTH => EAST => SOUTH => WEST => NORTH)
|
EnumFacing |
rotateYCCW()
Rotate this Facing around the Y axis counter-clockwise (NORTH => WEST => SOUTH => EAST => NORTH)
|
java.lang.String |
toString() |
static EnumFacing |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static EnumFacing[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnumFacing DOWN
public static final EnumFacing UP
public static final EnumFacing NORTH
public static final EnumFacing SOUTH
public static final EnumFacing WEST
public static final EnumFacing EAST
public static final EnumFacing[] VALUES
public static final EnumFacing[] HORIZONTALS
public static EnumFacing[] values()
for (EnumFacing c : EnumFacing.values()) System.out.println(c);
public static EnumFacing valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getIndex()
public int getHorizontalIndex()
public EnumFacing.AxisDirection getAxisDirection()
public EnumFacing getOpposite()
public EnumFacing rotateAround(EnumFacing.Axis axis)
public EnumFacing rotateY()
public EnumFacing rotateYCCW()
public int getFrontOffsetX()
public int getFrontOffsetY()
public int getFrontOffsetZ()
public java.lang.String getName2()
public EnumFacing.Axis getAxis()
public static EnumFacing byName(java.lang.String name)
public static EnumFacing getFront(int index)
public static EnumFacing getHorizontal(int p_176731_0_)
public static EnumFacing fromAngle(double angle)
public static EnumFacing random(java.util.Random rand)
public static EnumFacing getFacingFromVector(float p_176737_0_, float p_176737_1_, float p_176737_2_)
public java.lang.String toString()
toString
in class java.lang.Enum<EnumFacing>
public java.lang.String getName()
getName
in interface IStringSerializable
public static EnumFacing func_181076_a(EnumFacing.AxisDirection p_181076_0_, EnumFacing.Axis p_181076_1_)
public Vec3i getDirectionVec()