Enum Class Direction

All Implemented Interfaces:
Serializable, Comparable<Direction>, Constable, IStringSerializable

public enum Direction extends Enum<Direction> implements IStringSerializable
  • Enum Constant Details

  • Field Details

    • data3d

      private final int data3d
    • oppositeIndex

      private final int oppositeIndex
    • data2d

      private final int data2d
    • name

      private final String name
    • axis

      private final Direction.Axis axis
    • axisDirection

      private final Direction.AxisDirection axisDirection
    • normal

      private final Vector3i normal
    • VALUES

      private static final Direction[] VALUES
    • BY_NAME

      private static final Map<String,Direction> BY_NAME
    • BY_3D_DATA

      private static final Direction[] BY_3D_DATA
    • BY_2D_DATA

      private static final Direction[] BY_2D_DATA

      private static final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Direction> BY_NORMAL
  • Constructor Details

  • Method Details

    • values

      public static Direction[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Direction 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • orderedByNearest

      public static Direction[] orderedByNearest(Entity p_196054_0_)
    • makeDirectionArray

      private static Direction[] makeDirectionArray(Direction p_196053_0_, Direction p_196053_1_, Direction p_196053_2_)
    • rotate

      public static Direction rotate(Matrix4f p_229385_0_, Direction p_229385_1_)
    • getRotation

      public Quaternion getRotation()
    • get3DDataValue

      public int get3DDataValue()
    • get2DDataValue

      public int get2DDataValue()
    • getAxisDirection

      public Direction.AxisDirection getAxisDirection()
    • getOpposite

      public Direction getOpposite()
    • getClockWise

      public Direction getClockWise()
    • getCounterClockWise

      public Direction getCounterClockWise()
    • getStepX

      public int getStepX()
    • getStepY

      public int getStepY()
    • getStepZ

      public int getStepZ()
    • step

      public Vector3f step()
    • getName

      public String getName()
    • getAxis

      public Direction.Axis getAxis()
    • byName

      @Nullable public static Direction byName(@Nullable String p_176739_0_)
    • from3DDataValue

      public static Direction from3DDataValue(int p_82600_0_)
    • from2DDataValue

      public static Direction from2DDataValue(int p_176731_0_)
    • fromNormal

      @Nullable public static Direction fromNormal(int p_218383_0_, int p_218383_1_, int p_218383_2_)
    • fromYRot

      public static Direction fromYRot(double p_176733_0_)
    • fromAxisAndDirection

      public static Direction fromAxisAndDirection(Direction.Axis p_211699_0_, Direction.AxisDirection p_211699_1_)
    • toYRot

      public float toYRot()
    • getRandom

      public static Direction getRandom(Random p_239631_0_)
    • getNearest

      public static Direction getNearest(double p_210769_0_, double p_210769_2_, double p_210769_4_)
    • getNearest

      public static Direction getNearest(float p_176737_0_, float p_176737_1_, float p_176737_2_)
    • toString

      public String toString()
      toString in class Enum<Direction>
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface IStringSerializable
    • get

      public static Direction get(Direction.AxisDirection p_181076_0_, Direction.Axis p_181076_1_)
    • getNormal

      public Vector3i getNormal()
    • isFacingAngle

      public boolean isFacingAngle(float p_243532_1_)