Enum EnumFacing

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<EnumFacing>, IStringSerializable

    public enum EnumFacing
    extends java.lang.Enum<EnumFacing>
    implements IStringSerializable
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Method Detail

      • values

        public static EnumFacing[] 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 (EnumFacing c : EnumFacing.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EnumFacing 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
      • getIndex

        public int getIndex()
        + Get the Index of this Facing (0-5). The order is D-U-N-S-W-E
      • getHorizontalIndex

        public int getHorizontalIndex()
        + Get the index of this horizontal facing (0-3). The order is S-W-N-E
      • getOpposite

        public EnumFacing getOpposite()
        + Get the opposite Facing (e.g. DOWN => UP)
      • rotateAround

        public EnumFacing rotateAround​(EnumFacing.Axis axis)
        + Rotate this Facing around the given axis clockwise. If this facing cannot be rotated around the given axis, returns this facing without rotating.
      • rotateY

        public EnumFacing rotateY()
        + Rotate this Facing around the Y axis clockwise (NORTH => EAST => SOUTH => WEST => NORTH)
      • rotateYCCW

        public EnumFacing rotateYCCW()
        + Rotate this Facing around the Y axis counter-clockwise (NORTH => WEST => SOUTH => EAST => NORTH)
      • getFrontOffsetX

        public int getFrontOffsetX()
        + Returns a offset that addresses the block in front of this facing.
      • getFrontOffsetY

        public int getFrontOffsetY()
      • getFrontOffsetZ

        public int getFrontOffsetZ()
        + Returns a offset that addresses the block in front of this facing.
      • getName2

        public java.lang.String getName2()
        + Same as getName, but does not override the method from Enum.
      • byName

        public static EnumFacing byName​(java.lang.String name)
        + Get the facing specified by the given name
      • getFront

        public static EnumFacing getFront​(int index)
        + Get a Facing by it's index (0-5). The order is D-U-N-S-W-E. Named getFront for legacy reasons.
      • getHorizontal

        public static EnumFacing getHorizontal​(int parInt1)
        + Get a Facing by it's horizontal index (0-3). The order is S-W-N-E.
      • fromAngle

        public static EnumFacing fromAngle​(double angle)
        + Get the Facing corresponding to the given angle (0-360). An angle of 0 is SOUTH, an angle of 90 would be WEST.
      • getFacingFromVector

        public static EnumFacing getFacingFromVector​(float parFloat1,
                                                     float parFloat2,
                                                     float parFloat3)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<EnumFacing>
      • getDirectionVec

        public Vec3i getDirectionVec()
        + Get a normalized Vector that points in the direction of this Facing.