package net.minecraftforge.common;

public enum ForgeDirection
{
    /** -Y */
    DOWN(0, -1, 0),

    /** +Y */
    UP(0, 1, 0),

    /** -Z */
    NORTH(0, 0, -1),

    /** +Z */
    SOUTH(0, 0, 1),

    /** -X */
    WEST(-1, 0, 0),

    /** +X */
    EAST(1, 0, 0),

    /**
     * Used only by getOrientation, for invalid inputs
     */
    UNKNOWN(0, 0, 0);

    public final int offsetX;
    public final int offsetY;
    public final int offsetZ;
    public final int flag;
    public static final ForgeDirection[] VALID_DIRECTIONS = {DOWN, UP, NORTH, SOUTH, WEST, EAST};
    public static final int[] OPPOSITES = {1, 0, 3, 2, 5, 4, 6};
    public static final int[] TO_LEFT = {0, 1, 5, 4, 3, 2, 6};

    private ForgeDirection(int x, int y, int z)
    {
        offsetX = x;
        offsetY = y;
        offsetZ = z;
        flag = 1 << ordinal();
    }

    public static ForgeDirection getOrientation(int id)
    {
        if (id >= 0 && id < VALID_DIRECTIONS.length)
        {
            return VALID_DIRECTIONS[id];
        }
        return UNKNOWN;
    }

    public ForgeDirection getOpposite()
    {
        return getOrientation(OPPOSITES[ordinal()]);
    }

    public ForgeDirection getLeftRotation()
    {
    	return getOrientation(TO_LEFT[ordinal()]);
    }
}

@@ -647,64 +647,328 @@
     
-public static final int%5B%5D TO_LEFT = %7B0, 1, 5, 4, 3, 2, 6
+// Left hand rule rotation matrix for all possible axes of rotation%0A    public static final int%5B%5D%5B%5D ROTATION_MATRIX = %7B%0A    %09%7B0, 1, 4, 5, 2, 3, 6%7D,%0A    %09%7B0, 1, 5, 4, 3, 2, 6%7D,%0A    %09%7B5, 4, 2, 3, 0, 1, 6%7D,%0A    %09%7B4, 5, 2, 3, 1, 0, 6%7D,%0A    %09%7B2, 3, 0, 1, 4, 5, 6%7D,%0A    %09%7B3, 2, 1, 0, 4, 5, 6%7D,%0A    %09%7B0, 1, 2, 3, 4, 5, 6%7D,%0A    
 %7D;%0A%0A
@@ -1464,20 +1464,16 @@
 tion get
-Left
 Rotation
@@ -1473,16 +1473,35 @@
 otation(
+ForgeDirection axis
 )%0A    %7B%0A
@@ -1531,15 +1531,39 @@
 ion(
-TO_LEFT
+ROTATION_MATRIX%5Baxis.ordinal()%5D
 %5Bord

Change getLeft to getRotation, around any axis.