Enum Class DirectionCorner

java.lang.Object
java.lang.Enum<DirectionCorner>
org.cyclops.cyclopscore.client.model.DirectionCorner
All Implemented Interfaces:
Serializable, Comparable<DirectionCorner>, Constable

public enum DirectionCorner extends Enum<DirectionCorner>
An equivalent to Direction for being able to also refer to block positions that are at a euclidian distance of maximum 2.
See Also:
  • Direction
  • Enum Constant Details

  • Field Details

    • offsetX

      public final int offsetX
      The offset in the X axis.
    • offsetY

      public final int offsetY
      The offset in the Y axis.
    • offsetZ

      public final int offsetZ
      The offset in the Z axis.
    • flag

      public final int flag
      The bitwise identifier for this direction, used for bitwise toggling of directions.
    • VALID_DIRECTIONS

      public static final DirectionCorner[] VALID_DIRECTIONS
      All the valid directions.
  • Method Details

    • values

      public static DirectionCorner[] 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 DirectionCorner 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
    • getOrientation

      public static DirectionCorner getOrientation(int id)
      Get the direction of the given value, inverse of the @see DirectionCorner#ordinal() method.
      Parameters:
      id - The ordinal value of a direction.
      Returns:
      The direction for the given ordinal value.
    • fromOffset

      public net.minecraft.core.BlockPos fromOffset(net.minecraft.core.BlockPos pos)
      Offset from the given position with the current corner.
      Parameters:
      pos - The position.
      Returns:
      The offsetted position.