package net.aeronica.mods.mxtune.util;

import net.minecraft.util.EnumFacing;

public enum EnumRelativeSide
{
    BACK(0, "back"),
    RIGHT(1, "right"),
    FRONT(2, "front"),
    LEFT(3, "left"),
    TOP(4, "top"),
    BOTTOM(5, "bottom"),
    ERROR(6, "error");

    private int index;
    private String name;

    EnumRelativeSide(int index, String name)
    {
        this.index = index;
        this.name = name;
    }

    @Override
    public String toString()
    {
        return this.name;
    }

    public String getName()
    {
        return this.name;
    }

    public static final EnumRelativeSide[] ENUM_RELATIVE_SIDES = new EnumRelativeSide[]{
            FRONT, LEFT, BACK, RIGHT,
            RIGHT, FRONT, LEFT, BACK,
            BACK, RIGHT, FRONT, LEFT,
            LEFT, BACK, RIGHT, FRONT,
            };

    /**
     * Given the capability EnumFacing side and EnumFacing facing direction of the block return the side relative to
     * the front of block in terms of BACK, RIGHT, FRONT, LEFT, TOP, and BOTTOM. This makes ie easier to keep track of
     * the sides of a block relative to its front for automated slot access.
     * @param side getCapability EnumFacing side
     * @param facing horizontal EnumFacing property facing of the block
     * @return BACK, RIGHT, FRONT, LEFT, TOP, BOTTOM or ERROR if side and/or facing are null
     */
    public static EnumRelativeSide getRelativeSide(EnumFacing side, EnumFacing facing)
    {
        EnumRelativeSide enumRelativeSide;
        int index = -1;

        if (side == null || facing == null)
            enumRelativeSide = ERROR;
        else if (side == EnumFacing.UP)
            enumRelativeSide = TOP;
        else if (side == EnumFacing.DOWN)
            enumRelativeSide = BOTTOM;
        else
        {
            index = facing.getHorizontalIndex() * 4 + side.getHorizontalIndex();
            enumRelativeSide = ENUM_RELATIVE_SIDES[Math.abs(index % ENUM_RELATIVE_SIDES.length)];
        }
        ModLogger.info("getRelativeSide index: %d, location: %s", index, enumRelativeSide);
        return enumRelativeSide;
    }
}

@@ -263,24 +263,16 @@
 );%0A%0A    
-private 
 int inde
@@ -282,16 +282,8 @@
     
-private 
 Stri
@@ -1492,32 +1492,8 @@
 ide;
-%0A        int index = -1;
 %0A%0A  
@@ -1764,16 +1764,20 @@
         
+int 
 index = 
@@ -1935,16 +1935,16 @@
 ngth)%5D;%0A
+
         
@@ -1949,100 +1949,8 @@
   %7D%0A
-        ModLogger.info(%22getRelativeSide index: %25d, location: %25s%22, index, enumRelativeSide);%0A
     

Remove logging. cleanup.