Enum Direction

    • Field Detail

      • data3d

        private final int data3d
      • oppositeIndex

        private final int oppositeIndex
      • data2d

        private final int data2d
      • name

        private final java.lang.String name
      • VALUES

        private static final Direction[] VALUES
      • BY_NAME

        private static final java.util.Map<java.lang.String,​Direction> BY_NAME
      • BY_3D_DATA

        private static final Direction[] BY_3D_DATA
      • BY_2D_DATA

        private static final Direction[] BY_2D_DATA
      • BY_NORMAL

        private static final it.unimi.dsi.fastutil.longs.Long2ObjectMap<Direction> BY_NORMAL
    • Method Detail

      • values

        public static Direction[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Direction c : Direction.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Direction valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • orderedByNearest

        public static Direction[] orderedByNearest​(Entity p_196054_0_)
      • get3DDataValue

        public int get3DDataValue()
      • get2DDataValue

        public int get2DDataValue()
      • getOpposite

        public Direction getOpposite()
      • getClockWise

        public Direction getClockWise()
      • getCounterClockWise

        public Direction getCounterClockWise()
      • getStepX

        public int getStepX()
      • getStepY

        public int getStepY()
      • getStepZ

        public int getStepZ()
      • getName

        public java.lang.String getName()
      • byName

        @Nullable
        public static Direction byName​(@Nullable
                                       java.lang.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_)
      • toYRot

        public float toYRot()
      • getRandom

        public static Direction getRandom​(java.util.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<Direction>
      • getNormal

        public Vector3i getNormal()
      • isFacingAngle

        public boolean isFacingAngle​(float p_243532_1_)