Enum Class BlockFace
- All Implemented Interfaces:
Serializable, Comparable<BlockFace>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockFacebyId(int id) Returns the face with the given protocol identifier, orUPwhen it is out of range.intdx()Returns the step this face makes on the X axis,-1,0or1.intdy()Returns the step this face makes on the Y axis,-1,0or1.intdz()Returns the step this face makes on the Z axis,-1,0or1.opposite()Returns the face pointing the other way.static BlockFaceReturns the enum constant of this class with the specified name.static BlockFace[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOWN
Towards negative Y. -
UP
Towards positive Y. -
NORTH
Towards negative Z. -
SOUTH
Towards positive Z. -
WEST
Towards negative X. -
EAST
Towards positive X.
-
-
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
-
byId
-
opposite
Returns the face pointing the other way.- Returns:
- the face pointing the other way
- Since:
- 0.1.0
-
dx
public int dx()Returns the step this face makes on the X axis,-1,0or1.- Returns:
- the step this face makes on the X axis,
-1,0or1 - Since:
- 0.1.0
-
dy
public int dy()Returns the step this face makes on the Y axis,-1,0or1.- Returns:
- the step this face makes on the Y axis,
-1,0or1 - Since:
- 0.1.0
-
dz
public int dz()Returns the step this face makes on the Z axis,-1,0or1.- Returns:
- the step this face makes on the Z axis,
-1,0or1 - Since:
- 0.1.0
-