private void print(int x, int y, int z) {
    ReikaJavaLibrary.pConsole(
        "================================================================================================");

    for (int n = 0; n <= ANCHORS; n++) {

      world.clear();
      for (int i = 0; i < MAX_SIZE_X; i++) {
        for (int k = 0; k < MAX_SIZE_Z; k++) {
          Point pt = new Point(i, k);
          if (!anchorRadii.containsKey(pt)) {
            MazePiece p = new MazePiece(this, partSize, pt);
            for (ForgeDirection dir : dirs) {
              if (locationCache[n].get(pt).contains(dir)) p.connect(dir, true);
            }
            int dx = x + i * partSize;
            int dz = z + k * partSize;

            p.generate(world, dx, y, dz);
          }
        }
      }

      ReikaJavaLibrary.pConsole(
          "------------------------------------------------------------------------------------");
      int r = MAX_SIZE_X * partSize;
      char[][] data = new char[r][r];
      for (int i = 0; i < r; i++) {
        for (int k = 0; k < r; k++) {
          int dx = x + i;
          int dz = z + k;
          BlockKey bk = world.getBlock(dx, y + 1, dz); // +1 to not be floor
          char c = '?';
          if (bk != null) {
            if (bk.blockID == Blocks.air) {
              c = ' ';
            } else if (bk.blockID == ChromaBlocks.STRUCTSHIELD.getBlockInstance()) {
              c = '#';
            }
          }
          data[i][k] = c;
        }
      }
      for (int i = 0; i < r; i++) {
        String s = new String(data[i]);
        ReikaJavaLibrary.pConsole(s);
      }
      ReikaJavaLibrary.pConsole(
          "------------------------------------------------------------------------------------");
    }

    ReikaJavaLibrary.pConsole(
        "================================================================================================");
  }
 @Override
 public void generate(ChunkSplicedGenerationCache world, int x, int y, int z) {
   for (int i = 0; i <= size; i++) {
     for (int j = 0; j <= size; j++) {
       for (int k = 0; k <= size; k++) {
         int dx = x + i;
         int dy = y + j;
         int dz = z + k;
         boolean c0 = j == 0 && i != 0 && i != size && k != 0 && k != size;
         boolean c1 = j == size && i != 0 && i != size && k != 0 && k != size;
         boolean c2 = k == 0 && j != 0 && j != size && i != 0 && i != size;
         boolean c3 = k == size && j != 0 && j != size && i != 0 && i != size;
         boolean c4 = i == 0 && j != 0 && j != size && k != 0 && k != size;
         boolean c5 = i == size && j != 0 && j != size && k != 0 && k != size;
         boolean tunnel0 = connections[0] && c0;
         boolean tunnel1 = connections[1] && c1;
         boolean tunnel2 = connections[2] && c2;
         boolean tunnel3 = connections[3] && c3;
         boolean tunnel4 = connections[4] && c4;
         boolean tunnel5 = connections[5] && c5;
         boolean window0 = windows[0] && c0;
         boolean window1 = windows[1] && c1;
         boolean window2 = windows[2] && c2;
         boolean window3 = windows[3] && c3;
         boolean window4 = windows[4] && c4;
         boolean window5 = windows[5] && c5;
         boolean tunnel = tunnel0 || tunnel1 || tunnel2 || tunnel3 || tunnel4 || tunnel5;
         boolean window = window0 || window1 || window2 || window3 || window4 || window5;
         boolean fill =
             !tunnel && (i == 0 || i == size || j == 0 || j == size || k == 0 || k == size);
         boolean light0 = lights && i == 0 && j == size / 2 && k == size / 2;
         boolean light1 = lights && i == size && j == size / 2 && k == size / 2;
         boolean light2 = lights && j == 0 && i == size / 2 && k == size / 2;
         boolean light3 = lights && j == size && i == size / 2 && k == size / 2;
         boolean light4 = lights && k == 0 && j == size / 2 && i == size / 2;
         boolean light5 = lights && k == size && j == size / 2 && i == size / 2;
         boolean light = light0 || light1 || light2 || light3 || light4 || light5;
         Block b = fill ? ChromaBlocks.STRUCTSHIELD.getBlockInstance() : Blocks.air;
         int meta = fill ? (light ? BlockType.LIGHT.metadata : BlockType.STONE.metadata) : 0;
         if (window) meta = BlockType.GLASS.metadata;
         world.setBlock(dx, dy, dz, b, meta);
       }
     }
   }
 }