mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:58:35 +00:00
Allow "post processing" of chunks (#658)
* begin allowing "post processing" of chunks - restores legacy capability to continue saving edits in the background after sending the chunks - speeds up the edit clientside - nail in the coffin of the terrible and staticly coded coreedit - We should totally make IronGolem work so Core* is no longer used by anyone * begin allowing background history saving * Handle post processors in queues properly * Use futures for postprocessing so we're not waiting for them needlessly * better use of closed boolean * Reword
This commit is contained in:
@ -37,6 +37,8 @@ import com.sk89q.worldedit.world.World;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Future;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
@ -350,6 +352,12 @@ public interface Region extends Iterable<BlockVector3>, Cloneable, IBatchProcess
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
default Future<IChunkSet> postProcessSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
// Doesn't need to do anything
|
||||
return CompletableFuture.completedFuture(set);
|
||||
}
|
||||
|
||||
@Override
|
||||
default Extent construct(Extent child) {
|
||||
if (isGlobal()) {
|
||||
|
@ -34,6 +34,8 @@ import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
@ -170,6 +172,12 @@ public class RegionIntersection extends AbstractRegion {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<IChunkSet> postProcessSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
// Doesn't need to do anything
|
||||
return CompletableFuture.completedFuture(set);
|
||||
}
|
||||
|
||||
public List<Region> getRegions() {
|
||||
return regions;
|
||||
}
|
||||
|
Reference in New Issue
Block a user