package crazypants.enderio.conduit.geom;

import net.minecraftforge.common.util.ForgeDirection;

/**
 * Offset vectors are based on Y up.
 * 
 * @author brad
 */
public enum Offset {

  NONE(0, 0, 0),
  UP(ForgeDirection.UP),
  DOWN(ForgeDirection.DOWN),
  EAST(ForgeDirection.EAST),
  WEST(ForgeDirection.WEST),
  SOUTH(ForgeDirection.SOUTH),
  NORTH(ForgeDirection.NORTH),
  EAST_UP(ForgeDirection.EAST, ForgeDirection.UP),
  WEST_UP(ForgeDirection.WEST, ForgeDirection.UP),
  SOUTH_UP(ForgeDirection.SOUTH, ForgeDirection.UP),
  NORTH_UP(ForgeDirection.NORTH, ForgeDirection.UP),
  EAST_DOWN(ForgeDirection.EAST, ForgeDirection.DOWN),
  WEST_DOWN(ForgeDirection.WEST, ForgeDirection.DOWN),
  SOUTH_DOWN(ForgeDirection.SOUTH, ForgeDirection.DOWN),
  NORTH_DOWN(ForgeDirection.NORTH, ForgeDirection.DOWN),
  NORTH_EAST(ForgeDirection.NORTH, ForgeDirection.EAST), 
  NORTH_WEST(ForgeDirection.NORTH, ForgeDirection.WEST);

  public final int xOffset;
  public final int yOffset;
  public final int zOffset;

  private Offset(ForgeDirection dir) {
    xOffset = dir.offsetX;
    yOffset = dir.offsetY;
    zOffset = dir.offsetZ;
  }

  private Offset(ForgeDirection dir, ForgeDirection yDir) {
    xOffset = dir.offsetX;
    yOffset = yDir.offsetY;
    zOffset = dir.offsetZ;
  }

  private Offset(int xOffset, int yOffset, int zOffset) {
    this.xOffset = xOffset;
    this.yOffset = yOffset;
    this.zOffset = zOffset;
  }

}

@@ -1203,32 +1203,47 @@
 et = dir.offsetX
+ + yDir.offsetX
 ;%0A    yOffset = 
@@ -1241,16 +1241,30 @@
 Offset =
+ dir.offsetY +
  yDir.of
@@ -1287,32 +1287,47 @@
 et = dir.offsetZ
+ + yDir.offsetZ
 ;%0A  %7D%0A%0A  private

Fix non-major axis offsets not working properly