public static void queueCubeLoad(ICubicWorld world,CubeIO loader,CubeProviderServer cache,int x,int y,int z,Consumer<Cube> runnable){
  QueuedCube key=new QueuedCube(x,y,z,world);
  AsyncCubeIOProvider task=cubeTasks.get(key);
  if (task == null) {
    task=new AsyncCubeIOProvider(key,loader);
    task.addCallback(runnable);
    cubeTasks.put(key,task);
    pool.execute(task);
  }
 else {
    task.addCallback(runnable);
  }
  Column loadedColumn;
  if ((loadedColumn=cache.getLoadedColumn(x,z)) == null) {
    cache.asyncGetColumn(x,z,IProviderExtras.Requirement.LIGHT,null);
  }
 else {
    task.setColumn(loadedColumn);
  }
}

public static void queueCubeLoad ( ICubicWorld world , CubeIO loader , CubeProviderServer cache , int x , int y , int z , Consumer < Cube > runnable ) { QueuedCube key = new QueuedCube ( x , y , z , world ) ; AsyncCubeIOProvider task = cubeTasks . get ( key ) ; if ( task == null ) { task = new AsyncCubeIOProvider ( key , loader ) ; task . addCallback ( runnable ) ; cubeTasks . put ( key , task ) ; pool . execute ( task ) ; } else { task . addCallback ( runnable ) ; } Column loadedColumn ; if ( ( loadedColumn = cache . getLoadedColumn ( x , z ) ) == null ) { cache . asyncGetColumn ( x , z , IProviderExtras . Requirement . LIGHT , null ) ; } else { task . setColumn ( loadedColumn ) ; } }
queue a cube load , running the specified callback when the load has finished . this may cause a two tick delay if the column has to be loaded , too ! if you need it faster , consider sync loading either column or both cube and column .
