public enum DirectionCorner extends java.lang.Enum<DirectionCorner>
ForgeDirection for being able to also refer to
block positions that are at a euclidian distance of maximum 2.ForgeDirection| Enum Constant and Description |
|---|
LOWER_EAST
+X;-Y
|
LOWER_NORTH
-Z;-Y
|
LOWER_SOUTH
+Z;-Y
|
LOWER_WEST
-X;-Y
|
MIDDLE_NORTHEAST
+Z;+Y
|
MIDDLE_NORTHWEST
-Z;+Y
|
MIDDLE_SOUTHEAST
-X;+Y
|
MIDDLE_SOUTHWEST
+X;+Y
|
UNKNOWN
Used only by getOrientation, for invalid inputs
|
UPPER_EAST
+X;+Y
|
UPPER_NORTH
-Z;+Y
|
UPPER_SOUTH
+Z;+Y
|
UPPER_WEST
-X;+Y
|
| Modifier and Type | Field and Description |
|---|---|
int |
flag
The bitwise identifier for this direction, used for bitwise toggling of directions.
|
int |
offsetX
The offset in the X axis.
|
int |
offsetY
The offset in the Y axis.
|
int |
offsetZ
The offset in the Z axis.
|
static DirectionCorner[] |
VALID_DIRECTIONS
All the valid directions.
|
| Modifier and Type | Method and Description |
|---|---|
static DirectionCorner |
getOrientation(int id)
Get the direction of the given value, inverse of the @see DirectionCorner#ordinal() method.
|
static DirectionCorner |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DirectionCorner[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DirectionCorner UPPER_NORTH
public static final DirectionCorner UPPER_SOUTH
public static final DirectionCorner UPPER_WEST
public static final DirectionCorner UPPER_EAST
public static final DirectionCorner MIDDLE_NORTHWEST
public static final DirectionCorner MIDDLE_NORTHEAST
public static final DirectionCorner MIDDLE_SOUTHEAST
public static final DirectionCorner MIDDLE_SOUTHWEST
public static final DirectionCorner LOWER_NORTH
public static final DirectionCorner LOWER_SOUTH
public static final DirectionCorner LOWER_WEST
public static final DirectionCorner LOWER_EAST
public static final DirectionCorner UNKNOWN
public final int offsetX
public final int offsetY
public final int offsetZ
public final int flag
public static final DirectionCorner[] VALID_DIRECTIONS
public static DirectionCorner[] values()
for (DirectionCorner c : DirectionCorner.values()) System.out.println(c);
public static DirectionCorner 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 static DirectionCorner getOrientation(int id)
id - The ordinal value of a direction.