Enum Class BlockFace

java.lang.Object
java.lang.Enum<BlockFace>
org.bukkit.block.BlockFace
All Implemented Interfaces:
Serializable, Comparable<BlockFace>, Constable

public enum BlockFace extends Enum<BlockFace>
Represents the face of a block
Since:
1.0.0
  • Enum Constant Details

    • NORTH

      public static final BlockFace NORTH
      Since:
      1.0.0
    • EAST

      public static final BlockFace EAST
      Since:
      1.0.0
    • SOUTH

      public static final BlockFace SOUTH
      Since:
      1.0.0
    • WEST

      public static final BlockFace WEST
      Since:
      1.0.0
    • UP

      public static final BlockFace UP
      Since:
      1.0.0
    • DOWN

      public static final BlockFace DOWN
      Since:
      1.0.0
    • NORTH_EAST

      public static final BlockFace NORTH_EAST
      Since:
      1.0.0
    • NORTH_WEST

      public static final BlockFace NORTH_WEST
      Since:
      1.0.0
    • SOUTH_EAST

      public static final BlockFace SOUTH_EAST
      Since:
      1.0.0
    • SOUTH_WEST

      public static final BlockFace SOUTH_WEST
      Since:
      1.0.0
    • WEST_NORTH_WEST

      public static final BlockFace WEST_NORTH_WEST
      Since:
      1.0.0
    • NORTH_NORTH_WEST

      public static final BlockFace NORTH_NORTH_WEST
      Since:
      1.0.0
    • NORTH_NORTH_EAST

      public static final BlockFace NORTH_NORTH_EAST
      Since:
      1.0.0
    • EAST_NORTH_EAST

      public static final BlockFace EAST_NORTH_EAST
      Since:
      1.0.0
    • EAST_SOUTH_EAST

      public static final BlockFace EAST_SOUTH_EAST
      Since:
      1.0.0
    • SOUTH_SOUTH_EAST

      public static final BlockFace SOUTH_SOUTH_EAST
      Since:
      1.0.0
    • SOUTH_SOUTH_WEST

      public static final BlockFace SOUTH_SOUTH_WEST
      Since:
      1.0.0
    • WEST_SOUTH_WEST

      public static final BlockFace WEST_SOUTH_WEST
      Since:
      1.0.0
    • SELF

      public static final BlockFace SELF
      Since:
      1.0.0
  • Method Details

    • values

      public static BlockFace[] 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

      public static BlockFace valueOf(String name)
      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 name
      NullPointerException - 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
      Since:
      1.0.0
    • getModY

      public int getModY()
      Get the amount of Y-coordinates to modify to get the represented block
      Returns:
      Amount of Y-coordinates to modify
      Since:
      1.0.0
    • getModZ

      public int getModZ()
      Get the amount of Z-coordinates to modify to get the represented block
      Returns:
      Amount of Z-coordinates to modify
      Since:
      1.0.0
    • getDirection

      @NotNull public @NotNull Vector getDirection()
      Gets the normal vector corresponding to this block face.
      Returns:
      the normal vector
      Since:
      1.13.2
    • isCartesian

      public boolean isCartesian()
      Returns true if this face is aligned with one of the unit axes in 3D Cartesian space (ie NORTH, SOUTH, EAST, WEST, UP, DOWN).
      Returns:
      Cartesian status
      Since:
      1.16.5
    • getOppositeFace

      @NotNull public @NotNull BlockFace getOppositeFace()
      Since:
      1.0.0