示例#1
0
  public EnumFacing rotateFace(EnumFacing p_177523_1_) {
    EnumFacing enumfacing = p_177523_1_;

    for (int i = 0; i < this.quartersX; ++i) {
      enumfacing = enumfacing.rotateAround(EnumFacing.Axis.X);
    }

    if (enumfacing.getAxis() != EnumFacing.Axis.Y) {
      for (int j = 0; j < this.quartersY; ++j) {
        enumfacing = enumfacing.rotateAround(EnumFacing.Axis.Y);
      }
    }

    return enumfacing;
  }
示例#2
0
  public int rotateVertex(EnumFacing facing, int vertexIndex) {
    int i = vertexIndex;

    if (facing.getAxis() == EnumFacing.Axis.X) {
      i = (vertexIndex + this.quartersX) % 4;
    }

    EnumFacing enumfacing = facing;

    for (int j = 0; j < this.quartersX; ++j) {
      enumfacing = enumfacing.rotateAround(EnumFacing.Axis.X);
    }

    if (enumfacing.getAxis() == EnumFacing.Axis.Y) {
      i = (i + this.quartersY) % 4;
    }

    return i;
  }