Package crazypants.enderio.machine.reservoir.TileReservoir

Examples of crazypants.enderio.machine.reservoir.TileReservoir.Pos


    if(!tr.isMultiblock()) {
      return blockIcon;
    }

    ForgeDirection side = ForgeDirection.getOrientation(blockSide);
    Pos pos = tr.pos;

    if(tr.front == side || tr.front == side.getOpposite()) { // 2x2 area

      boolean isRight;
      if(tr.isVertical()) { // to to flip right and left for back faces of
        // vertical multiblocks
        isRight = !pos.isRight(side);
      } else {
        isRight = pos.isRight(side);
      }
      if(pos.isTop) {
        return isRight ? mbIcons[MbFace.TR.ordinal()] : mbIcons[MbFace.TL.ordinal()];
      } else {
        return isRight ? mbIcons[MbFace.BR.ordinal()] : mbIcons[MbFace.BL.ordinal()];
      }

    }
    if(tr.up == side || tr.up == side.getOpposite()) { // up or down face
      if(tr.isVertical()) {
        if(tr.right.offsetX != 0) {
          return pos.isRight ? mbIcons[MbFace.L.ordinal()] : mbIcons[MbFace.R.ordinal()];
        } else {
          return pos.isRight ? mbIcons[MbFace.T.ordinal()] : mbIcons[MbFace.B.ordinal()];
        }
      } else {
        if(tr.up == side) {
          return pos.isRight ? mbIcons[MbFace.L.ordinal()] : mbIcons[MbFace.R.ordinal()];
        } else {
          return pos.isRight ? mbIcons[MbFace.R.ordinal()] : mbIcons[MbFace.L.ordinal()];
        }
      }

    } else {
      if(tr.isVertical()) {
        return pos.isTop ? mbIcons[MbFace.T.ordinal()] : mbIcons[MbFace.B.ordinal()];
      } else {
        return pos.isTop(side) ? mbIcons[MbFace.L.ordinal()] : mbIcons[MbFace.R.ordinal()];
      }
    }

  }
View Full Code Here

TOP

Related Classes of crazypants.enderio.machine.reservoir.TileReservoir.Pos

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.