Enum ExtendedFacing
- java.lang.Object
-
- java.lang.Enum<ExtendedFacing>
-
- com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ExtendedFacing>
public enum ExtendedFacing extends java.lang.Enum<ExtendedFacing>
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description static ExtendedFacingDEFAULTstatic java.util.Map<net.minecraftforge.common.util.ForgeDirection,java.util.List<ExtendedFacing>>FOR_FACINGstatic intSTATES_COUNTstatic ExtendedFacing[]VALUES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.gtnewhorizon.structurelib.coords.StructureRelativeCoordsasCoordinateSystem()static ExtendedFacingbyIndex(int index)static ExtendedFacingbyName(java.lang.String name)static com.google.common.collect.ImmutableSet<ExtendedFacing>getAllWith(Flip flip)static com.google.common.collect.ImmutableSet<ExtendedFacing>getAllWith(Rotation rotation)static com.google.common.collect.ImmutableSet<ExtendedFacing>getAllWith(net.minecraftforge.common.util.ForgeDirection direction)net.minecraftforge.common.util.ForgeDirectiongetDirection()ExtendedFacinggetDuplicate()Gets the same effective facing achieved by different rot/flip comboFlipgetFlip()intgetIndex()IntegerAxisSwapgetIntegerAxisSwap()java.lang.StringgetLocalizedName()java.lang.StringgetName2()voidgetOffsetABC(double[] point, double[] out)voidgetOffsetABC(int[] point, int[] out)Vec3ImplgetOffsetABC(Vec3Impl xyzOffset)Vec3getOffsetABC(Vec3 xyzOffset)Translates world offset to relative front facing offsetExtendedFacinggetOppositeDirection()ExtendedFacinggetOppositeFlip()ExtendedFacinggetOppositeRotation()net.minecraftforge.common.util.ForgeDirectiongetRelativeBackInWorld()net.minecraftforge.common.util.ForgeDirectiongetRelativeDownInWorld()net.minecraftforge.common.util.ForgeDirectiongetRelativeForwardInWorld()net.minecraftforge.common.util.ForgeDirectiongetRelativeLeftInWorld()net.minecraftforge.common.util.ForgeDirectiongetRelativeRightInWorld()net.minecraftforge.common.util.ForgeDirectiongetRelativeUpInWorld()RotationgetRotation()net.minecraftforge.common.util.ForgeDirectiongetWorldDirection(net.minecraftforge.common.util.ForgeDirection abcDirection)do note the ABC coordinate system is (X, -Y, Z).voidgetWorldOffset(double[] point, double[] out)voidgetWorldOffset(int[] point, int[] out)Vec3ImplgetWorldOffset(Vec3Impl abcOffset)Vec3getWorldOffset(Vec3 abcOffset)Translates relative to front facing offset to world offsetstatic ExtendedFacingof(net.minecraftforge.common.util.ForgeDirection direction)static ExtendedFacingof(net.minecraftforge.common.util.ForgeDirection direction, Rotation rotation, Flip flip)static ExtendedFacingrandom(java.util.Random rand)static ExtendedFacingvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ExtendedFacing[]values()Returns an array containing the constants of this enum type, in the order they are declared.ExtendedFacingwith(Flip flip)ExtendedFacingwith(Rotation rotation)ExtendedFacingwith(net.minecraftforge.common.util.ForgeDirection direction)
-
-
-
Enum Constant Detail
-
DOWN_NORMAL_NONE
public static final ExtendedFacing DOWN_NORMAL_NONE
-
DOWN_NORMAL_HORIZONTAL
public static final ExtendedFacing DOWN_NORMAL_HORIZONTAL
-
DOWN_NORMAL_VERTICAL
public static final ExtendedFacing DOWN_NORMAL_VERTICAL
-
DOWN_NORMAL_BOTH
public static final ExtendedFacing DOWN_NORMAL_BOTH
-
DOWN_CLOCKWISE_NONE
public static final ExtendedFacing DOWN_CLOCKWISE_NONE
-
DOWN_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing DOWN_CLOCKWISE_HORIZONTAL
-
DOWN_CLOCKWISE_VERTICAL
public static final ExtendedFacing DOWN_CLOCKWISE_VERTICAL
-
DOWN_CLOCKWISE_BOTH
public static final ExtendedFacing DOWN_CLOCKWISE_BOTH
-
DOWN_UPSIDE_DOWN_NONE
public static final ExtendedFacing DOWN_UPSIDE_DOWN_NONE
-
DOWN_UPSIDE_DOWN_HORIZONTAL
public static final ExtendedFacing DOWN_UPSIDE_DOWN_HORIZONTAL
-
DOWN_UPSIDE_DOWN_VERTICAL
public static final ExtendedFacing DOWN_UPSIDE_DOWN_VERTICAL
-
DOWN_UPSIDE_DOWN_BOTH
public static final ExtendedFacing DOWN_UPSIDE_DOWN_BOTH
-
DOWN_COUNTER_CLOCKWISE_NONE
public static final ExtendedFacing DOWN_COUNTER_CLOCKWISE_NONE
-
DOWN_COUNTER_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing DOWN_COUNTER_CLOCKWISE_HORIZONTAL
-
DOWN_COUNTER_CLOCKWISE_VERTICAL
public static final ExtendedFacing DOWN_COUNTER_CLOCKWISE_VERTICAL
-
DOWN_COUNTER_CLOCKWISE_BOTH
public static final ExtendedFacing DOWN_COUNTER_CLOCKWISE_BOTH
-
UP_NORMAL_NONE
public static final ExtendedFacing UP_NORMAL_NONE
-
UP_NORMAL_HORIZONTAL
public static final ExtendedFacing UP_NORMAL_HORIZONTAL
-
UP_NORMAL_VERTICAL
public static final ExtendedFacing UP_NORMAL_VERTICAL
-
UP_NORMAL_BOTH
public static final ExtendedFacing UP_NORMAL_BOTH
-
UP_CLOCKWISE_NONE
public static final ExtendedFacing UP_CLOCKWISE_NONE
-
UP_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing UP_CLOCKWISE_HORIZONTAL
-
UP_CLOCKWISE_VERTICAL
public static final ExtendedFacing UP_CLOCKWISE_VERTICAL
-
UP_CLOCKWISE_BOTH
public static final ExtendedFacing UP_CLOCKWISE_BOTH
-
UP_UPSIDE_DOWN_NONE
public static final ExtendedFacing UP_UPSIDE_DOWN_NONE
-
UP_UPSIDE_DOWN_HORIZONTAL
public static final ExtendedFacing UP_UPSIDE_DOWN_HORIZONTAL
-
UP_UPSIDE_DOWN_VERTICAL
public static final ExtendedFacing UP_UPSIDE_DOWN_VERTICAL
-
UP_UPSIDE_DOWN_BOTH
public static final ExtendedFacing UP_UPSIDE_DOWN_BOTH
-
UP_COUNTER_CLOCKWISE_NONE
public static final ExtendedFacing UP_COUNTER_CLOCKWISE_NONE
-
UP_COUNTER_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing UP_COUNTER_CLOCKWISE_HORIZONTAL
-
UP_COUNTER_CLOCKWISE_VERTICAL
public static final ExtendedFacing UP_COUNTER_CLOCKWISE_VERTICAL
-
UP_COUNTER_CLOCKWISE_BOTH
public static final ExtendedFacing UP_COUNTER_CLOCKWISE_BOTH
-
NORTH_NORMAL_NONE
public static final ExtendedFacing NORTH_NORMAL_NONE
-
NORTH_NORMAL_HORIZONTAL
public static final ExtendedFacing NORTH_NORMAL_HORIZONTAL
-
NORTH_NORMAL_VERTICAL
public static final ExtendedFacing NORTH_NORMAL_VERTICAL
-
NORTH_NORMAL_BOTH
public static final ExtendedFacing NORTH_NORMAL_BOTH
-
NORTH_CLOCKWISE_NONE
public static final ExtendedFacing NORTH_CLOCKWISE_NONE
-
NORTH_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing NORTH_CLOCKWISE_HORIZONTAL
-
NORTH_CLOCKWISE_VERTICAL
public static final ExtendedFacing NORTH_CLOCKWISE_VERTICAL
-
NORTH_CLOCKWISE_BOTH
public static final ExtendedFacing NORTH_CLOCKWISE_BOTH
-
NORTH_UPSIDE_DOWN_NONE
public static final ExtendedFacing NORTH_UPSIDE_DOWN_NONE
-
NORTH_UPSIDE_DOWN_HORIZONTAL
public static final ExtendedFacing NORTH_UPSIDE_DOWN_HORIZONTAL
-
NORTH_UPSIDE_DOWN_VERTICAL
public static final ExtendedFacing NORTH_UPSIDE_DOWN_VERTICAL
-
NORTH_UPSIDE_DOWN_BOTH
public static final ExtendedFacing NORTH_UPSIDE_DOWN_BOTH
-
NORTH_COUNTER_CLOCKWISE_NONE
public static final ExtendedFacing NORTH_COUNTER_CLOCKWISE_NONE
-
NORTH_COUNTER_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing NORTH_COUNTER_CLOCKWISE_HORIZONTAL
-
NORTH_COUNTER_CLOCKWISE_VERTICAL
public static final ExtendedFacing NORTH_COUNTER_CLOCKWISE_VERTICAL
-
NORTH_COUNTER_CLOCKWISE_BOTH
public static final ExtendedFacing NORTH_COUNTER_CLOCKWISE_BOTH
-
SOUTH_NORMAL_NONE
public static final ExtendedFacing SOUTH_NORMAL_NONE
-
SOUTH_NORMAL_HORIZONTAL
public static final ExtendedFacing SOUTH_NORMAL_HORIZONTAL
-
SOUTH_NORMAL_VERTICAL
public static final ExtendedFacing SOUTH_NORMAL_VERTICAL
-
SOUTH_NORMAL_BOTH
public static final ExtendedFacing SOUTH_NORMAL_BOTH
-
SOUTH_CLOCKWISE_NONE
public static final ExtendedFacing SOUTH_CLOCKWISE_NONE
-
SOUTH_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing SOUTH_CLOCKWISE_HORIZONTAL
-
SOUTH_CLOCKWISE_VERTICAL
public static final ExtendedFacing SOUTH_CLOCKWISE_VERTICAL
-
SOUTH_CLOCKWISE_BOTH
public static final ExtendedFacing SOUTH_CLOCKWISE_BOTH
-
SOUTH_UPSIDE_DOWN_NONE
public static final ExtendedFacing SOUTH_UPSIDE_DOWN_NONE
-
SOUTH_UPSIDE_DOWN_HORIZONTAL
public static final ExtendedFacing SOUTH_UPSIDE_DOWN_HORIZONTAL
-
SOUTH_UPSIDE_DOWN_VERTICAL
public static final ExtendedFacing SOUTH_UPSIDE_DOWN_VERTICAL
-
SOUTH_UPSIDE_DOWN_BOTH
public static final ExtendedFacing SOUTH_UPSIDE_DOWN_BOTH
-
SOUTH_COUNTER_CLOCKWISE_NONE
public static final ExtendedFacing SOUTH_COUNTER_CLOCKWISE_NONE
-
SOUTH_COUNTER_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing SOUTH_COUNTER_CLOCKWISE_HORIZONTAL
-
SOUTH_COUNTER_CLOCKWISE_VERTICAL
public static final ExtendedFacing SOUTH_COUNTER_CLOCKWISE_VERTICAL
-
SOUTH_COUNTER_CLOCKWISE_BOTH
public static final ExtendedFacing SOUTH_COUNTER_CLOCKWISE_BOTH
-
WEST_NORMAL_NONE
public static final ExtendedFacing WEST_NORMAL_NONE
-
WEST_NORMAL_HORIZONTAL
public static final ExtendedFacing WEST_NORMAL_HORIZONTAL
-
WEST_NORMAL_VERTICAL
public static final ExtendedFacing WEST_NORMAL_VERTICAL
-
WEST_NORMAL_BOTH
public static final ExtendedFacing WEST_NORMAL_BOTH
-
WEST_CLOCKWISE_NONE
public static final ExtendedFacing WEST_CLOCKWISE_NONE
-
WEST_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing WEST_CLOCKWISE_HORIZONTAL
-
WEST_CLOCKWISE_VERTICAL
public static final ExtendedFacing WEST_CLOCKWISE_VERTICAL
-
WEST_CLOCKWISE_BOTH
public static final ExtendedFacing WEST_CLOCKWISE_BOTH
-
WEST_UPSIDE_DOWN_NONE
public static final ExtendedFacing WEST_UPSIDE_DOWN_NONE
-
WEST_UPSIDE_DOWN_HORIZONTAL
public static final ExtendedFacing WEST_UPSIDE_DOWN_HORIZONTAL
-
WEST_UPSIDE_DOWN_VERTICAL
public static final ExtendedFacing WEST_UPSIDE_DOWN_VERTICAL
-
WEST_UPSIDE_DOWN_BOTH
public static final ExtendedFacing WEST_UPSIDE_DOWN_BOTH
-
WEST_COUNTER_CLOCKWISE_NONE
public static final ExtendedFacing WEST_COUNTER_CLOCKWISE_NONE
-
WEST_COUNTER_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing WEST_COUNTER_CLOCKWISE_HORIZONTAL
-
WEST_COUNTER_CLOCKWISE_VERTICAL
public static final ExtendedFacing WEST_COUNTER_CLOCKWISE_VERTICAL
-
WEST_COUNTER_CLOCKWISE_BOTH
public static final ExtendedFacing WEST_COUNTER_CLOCKWISE_BOTH
-
EAST_NORMAL_NONE
public static final ExtendedFacing EAST_NORMAL_NONE
-
EAST_NORMAL_HORIZONTAL
public static final ExtendedFacing EAST_NORMAL_HORIZONTAL
-
EAST_NORMAL_VERTICAL
public static final ExtendedFacing EAST_NORMAL_VERTICAL
-
EAST_NORMAL_BOTH
public static final ExtendedFacing EAST_NORMAL_BOTH
-
EAST_CLOCKWISE_NONE
public static final ExtendedFacing EAST_CLOCKWISE_NONE
-
EAST_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing EAST_CLOCKWISE_HORIZONTAL
-
EAST_CLOCKWISE_VERTICAL
public static final ExtendedFacing EAST_CLOCKWISE_VERTICAL
-
EAST_CLOCKWISE_BOTH
public static final ExtendedFacing EAST_CLOCKWISE_BOTH
-
EAST_UPSIDE_DOWN_NONE
public static final ExtendedFacing EAST_UPSIDE_DOWN_NONE
-
EAST_UPSIDE_DOWN_HORIZONTAL
public static final ExtendedFacing EAST_UPSIDE_DOWN_HORIZONTAL
-
EAST_UPSIDE_DOWN_VERTICAL
public static final ExtendedFacing EAST_UPSIDE_DOWN_VERTICAL
-
EAST_UPSIDE_DOWN_BOTH
public static final ExtendedFacing EAST_UPSIDE_DOWN_BOTH
-
EAST_COUNTER_CLOCKWISE_NONE
public static final ExtendedFacing EAST_COUNTER_CLOCKWISE_NONE
-
EAST_COUNTER_CLOCKWISE_HORIZONTAL
public static final ExtendedFacing EAST_COUNTER_CLOCKWISE_HORIZONTAL
-
EAST_COUNTER_CLOCKWISE_VERTICAL
public static final ExtendedFacing EAST_COUNTER_CLOCKWISE_VERTICAL
-
EAST_COUNTER_CLOCKWISE_BOTH
public static final ExtendedFacing EAST_COUNTER_CLOCKWISE_BOTH
-
-
Field Detail
-
DEFAULT
public static final ExtendedFacing DEFAULT
-
VALUES
public static final ExtendedFacing[] VALUES
-
FOR_FACING
public static final java.util.Map<net.minecraftforge.common.util.ForgeDirection,java.util.List<ExtendedFacing>> FOR_FACING
-
STATES_COUNT
public static final int STATES_COUNT
-
-
Method Detail
-
values
public static ExtendedFacing[] 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 (ExtendedFacing c : ExtendedFacing.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ExtendedFacing 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 namejava.lang.NullPointerException- if the argument is null
-
of
public static ExtendedFacing of(net.minecraftforge.common.util.ForgeDirection direction, Rotation rotation, Flip flip)
-
of
public static ExtendedFacing of(net.minecraftforge.common.util.ForgeDirection direction)
-
getAllWith
public static com.google.common.collect.ImmutableSet<ExtendedFacing> getAllWith(net.minecraftforge.common.util.ForgeDirection direction)
-
getAllWith
public static com.google.common.collect.ImmutableSet<ExtendedFacing> getAllWith(Rotation rotation)
-
getAllWith
public static com.google.common.collect.ImmutableSet<ExtendedFacing> getAllWith(Flip flip)
-
with
public ExtendedFacing with(net.minecraftforge.common.util.ForgeDirection direction)
-
with
public ExtendedFacing with(Rotation rotation)
-
with
public ExtendedFacing with(Flip flip)
-
getOppositeDirection
public ExtendedFacing getOppositeDirection()
-
getOppositeRotation
public ExtendedFacing getOppositeRotation()
-
getOppositeFlip
public ExtendedFacing getOppositeFlip()
-
getDuplicate
public ExtendedFacing getDuplicate()
Gets the same effective facing achieved by different rot/flip combo- Returns:
- same effective facing, but different enum value
-
getIndex
public int getIndex()
-
getName2
public java.lang.String getName2()
-
getLocalizedName
public java.lang.String getLocalizedName()
-
byName
public static ExtendedFacing byName(java.lang.String name)
-
byIndex
public static ExtendedFacing byIndex(int index)
-
random
public static ExtendedFacing random(java.util.Random rand)
-
getDirection
public net.minecraftforge.common.util.ForgeDirection getDirection()
-
getRotation
public Rotation getRotation()
-
getFlip
public Flip getFlip()
-
getWorldOffset
public Vec3 getWorldOffset(Vec3 abcOffset)
Translates relative to front facing offset to world offset- Parameters:
abcOffset- A,B,C offset (facing relativeL-->R,U-->D,F-->B)- Returns:
- X, Y, Z offset in world
-
getWorldOffset
public void getWorldOffset(int[] point, int[] out)
-
getWorldOffset
public void getWorldOffset(double[] point, double[] out)
-
getWorldDirection
public net.minecraftforge.common.util.ForgeDirection getWorldDirection(net.minecraftforge.common.util.ForgeDirection abcDirection)
do note the ABC coordinate system is (X, -Y, Z).
-
getOffsetABC
public Vec3 getOffsetABC(Vec3 xyzOffset)
Translates world offset to relative front facing offset- Parameters:
xyzOffset- X,Y,Z offset in world- Returns:
- A, B, C offset (facing relative
L-->R,U-->D,F-->B)
-
getOffsetABC
public void getOffsetABC(int[] point, int[] out)
-
getOffsetABC
public void getOffsetABC(double[] point, double[] out)
-
getIntegerAxisSwap
public IntegerAxisSwap getIntegerAxisSwap()
-
getRelativeLeftInWorld
public net.minecraftforge.common.util.ForgeDirection getRelativeLeftInWorld()
-
getRelativeRightInWorld
public net.minecraftforge.common.util.ForgeDirection getRelativeRightInWorld()
-
getRelativeDownInWorld
public net.minecraftforge.common.util.ForgeDirection getRelativeDownInWorld()
-
getRelativeUpInWorld
public net.minecraftforge.common.util.ForgeDirection getRelativeUpInWorld()
-
getRelativeBackInWorld
public net.minecraftforge.common.util.ForgeDirection getRelativeBackInWorld()
-
getRelativeForwardInWorld
public net.minecraftforge.common.util.ForgeDirection getRelativeForwardInWorld()
-
asCoordinateSystem
public com.gtnewhorizon.structurelib.coords.StructureRelativeCoords asCoordinateSystem()
-
-