Enum Class EnumFacing
- All Implemented Interfaces:
Serializable, Comparable<EnumFacing>, Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumstatic enumNested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetAxis()intReturns a offset that addresses the block in front of this facing.intintReturns a offset that addresses the block in front of this facing.getName2()Same as getName, but does not override the method from Enum.Get the opposite Facing (e.g.static EnumFacingChoose a random Facing using the given RandomtoString()static EnumFacingReturns the enum constant of this class with the specified name.static EnumFacing[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOWN
-
UP
-
NORTH
-
SOUTH
-
WEST
-
EAST
-
-
Field Details
-
VALUES
All facings in D-U-N-S-W-E order
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- 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.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
random
Choose a random Facing using the given Random -
getOpposite
Get the opposite Facing (e.g. DOWN => UP) -
getFrontOffsetX
public int getFrontOffsetX()Returns a offset that addresses the block in front of this facing. -
getFrontOffsetY
public int getFrontOffsetY() -
getFrontOffsetZ
public int getFrontOffsetZ()Returns a offset that addresses the block in front of this facing. -
getName2
Same as getName, but does not override the method from Enum. -
toString
- Overrides:
toStringin classEnum<EnumFacing>
-
getAxis
-