private List<EndIsland> findSurroundingIslands(int chunkX,int chunkY,int chunksPerFragmentX,int chunksPerFragmentY){
  List<EndIsland> result=new LinkedList<EndIsland>();
  for (int y=-SURROUNDING_CHUNKS; y <= chunksPerFragmentY + SURROUNDING_CHUNKS; y++) {
    for (int x=-SURROUNDING_CHUNKS; x <= chunksPerFragmentX + SURROUNDING_CHUNKS; x++) {
      EndIsland island=tryCreateEndIsland(chunkX + x,chunkY + y);
      if (island != null) {
        result.add(island);
      }
    }
  }
  return result;
}

private List < EndIsland > findSurroundingIslands ( int chunkX , int chunkY , int chunksPerFragmentX , int chunksPerFragmentY ) { List < EndIsland > result = new LinkedList < EndIsland > ( ) ; for ( int y = - SURROUNDING_CHUNKS ; y <= chunksPerFragmentY + SURROUNDING_CHUNKS ; y ++ ) { for ( int x = - SURROUNDING_CHUNKS ; x <= chunksPerFragmentX + SURROUNDING_CHUNKS ; x ++ ) { EndIsland island = tryCreateEndIsland ( chunkX + x , chunkY + y ) ; if ( island != null ) { result . add ( island ) ; } } } return result ; }
returns a list of all islands that might be touching a chunk - area .
