Package org.bukkit.block
Enum BlockFace
- All Implemented Interfaces:
Serializable,Comparable<BlockFace>,Constable
public enum BlockFace extends Enum<BlockFace>
Represents the face of a block
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description DOWNEASTEAST_NORTH_EASTEAST_SOUTH_EASTNORTHNORTH_EASTNORTH_NORTH_EASTNORTH_NORTH_WESTNORTH_WESTSELFSOUTHSOUTH_EASTSOUTH_SOUTH_EASTSOUTH_SOUTH_WESTSOUTH_WESTUPWESTWEST_NORTH_WESTWEST_SOUTH_WEST -
Method Summary
Modifier and Type Method Description VectorgetDirection()Gets the normal vector corresponding to this block face.intgetModX()Get the amount of X-coordinates to modify to get the represented blockintgetModY()Get the amount of Y-coordinates to modify to get the represented blockintgetModZ()Get the amount of Z-coordinates to modify to get the represented blockBlockFacegetOppositeFace()static BlockFacevalueOf(String name)Returns the enum constant of this type with the specified name.static BlockFace[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getModX
public int getModX()Get the amount of X-coordinates to modify to get the represented block- Returns:
- Amount of X-coordinates to modify
-
getModY
public int getModY()Get the amount of Y-coordinates to modify to get the represented block- Returns:
- Amount of Y-coordinates to modify
-
getModZ
public int getModZ()Get the amount of Z-coordinates to modify to get the represented block- Returns:
- Amount of Z-coordinates to modify
-
getDirection
Gets the normal vector corresponding to this block face.- Returns:
- the normal vector
-
getOppositeFace
-