Enum Direction.Axis

java.lang.Object
java.lang.Enum<Direction.Axis>
net.minecraft.util.math.Direction.Axis
All Implemented Interfaces:
Serializable, Comparable<Direction.Axis>, java.lang.constant.Constable, Predicate<Direction>, StringIdentifiable
Enclosing class:
Direction

public static enum Direction.Axis
extends Enum<Direction.Axis>
implements StringIdentifiable, Predicate<Direction>
  • Enum Constant Details

  • Field Details

  • Constructor Details

    • Axis

      private Axis​(String name)
  • Method Details

    • values

      public static Direction.Axis[] 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

      public static Direction.Axis valueOf​(String name)
      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 name
      NullPointerException - if the argument is null
    • fromName

      @Nullable public static Direction.Axis fromName​(String name)
    • getName

      public String getName()
    • isVertical

      public boolean isVertical()
    • isHorizontal

      public boolean isHorizontal()
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Direction.Axis>
    • pickRandomAxis

      public static Direction.Axis pickRandomAxis​(Random random)
    • test

      public boolean test​(@Nullable Direction direction)
      Specified by:
      test in interface Predicate<Direction>
    • getType

      public Direction.Type getType()
    • asString

      public String asString()
      Specified by:
      asString in interface StringIdentifiable
    • choose

      public abstract int choose​(int x, int y, int z)
    • choose

      public abstract double choose​(double x, double y, double z)