Beispiel #1
0
  @UserThread("Any")
  private void loadRegion(DimensionLoader handle, Region r, boolean generate) {
    handle.world.stats.load.requests.increment();

    if (r.getLoadPermit()) {
      handle.tracker.startLoadOp();
      executor.execute(new RegionLoader(handle, r, generate));
    } else if (generate) {
      handle.tracker.startLoadOp();
      handle.world.stats.load.rejected.increment();
      handle.generator.generate(r);
    }
  }
Beispiel #2
0
 @UserThread("Any")
 private void saveRegion(DimensionLoader handle, Region region, CachedRegion cacheHandle) {
   handle.world.stats.save.requests.increment();
   executor.execute(new RegionSaver(handle, region, cacheHandle));
   region.lastSaved = handle.world.getAge();
 }