Advertisement
riking

very nested

Sep 1st, 2013
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. // ed: the lack of braces is me following the project formatting guidelines
  2.  
  3.         for (int sy = 0; sy < 16; sy++)
  4.         {
  5.             if (snap.isSectionEmpty(sy))
  6.                 continue;
  7.             for (int py = sy << 4; py < (sy << 4) + 16; py++)
  8.                 for (int iz = 0; iz < 16; iz++)
  9.                     for (int ix = 0; ix < 16; ix++)
  10.                     {
  11.                         int block = snap.getBlockTypeId(ix, py, iz);
  12.                         if (ArrayUtils.contains(interesting, block))
  13.                         {
  14.                             Vector pos = new Vector(baseX + ix, py, baseZ + iz);
  15.                             if (ArrayUtils.contains(CONTAINER_BLOCKS, block))
  16.                                 master.foundContainers.add(pos);
  17.                             else
  18.                             {
  19.                                 BlockData bd = new BlockData(Material.getMaterial(block), (byte) snap.getBlockData(ix, py, iz));
  20.                                 for (BlockData data : goals)
  21.                                     if (data.equals(bd))
  22.                                         master.found.add(new _Entry<BlockData, Vector>(data, pos));
  23.                             }
  24.                         }
  25.                     }
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement