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:
dordsor21
2020-09-28 11:13:02 +01:00
committed by GitHub
parent 2aef0ee27e
commit 82bcc0e9a5
37 changed files with 811 additions and 18 deletions

View File

@@ -23,6 +23,7 @@ import com.boydti.fawe.FaweCache;
import com.boydti.fawe.beta.Filter;
import com.boydti.fawe.beta.IBatchProcessor;
import com.boydti.fawe.beta.implementation.filter.block.ExtentFilterBlock;
import com.boydti.fawe.config.Settings;
import com.boydti.fawe.object.changeset.AbstractChangeSet;
import com.boydti.fawe.object.clipboard.WorldCopyClipboard;
import com.boydti.fawe.object.exception.FaweException;
@@ -671,8 +672,16 @@ public interface Extent extends InputExtent, OutputExtent {
return processor.construct(this);
}
default Extent addPostProcessor(IBatchProcessor processor) {
return processor.construct(this);
}
default Extent enableHistory(AbstractChangeSet changeSet) {
return addProcessor(changeSet);
if (Settings.IMP.EXPERIMENTAL.SEND_BEFORE_HISTORY) {
return addPostProcessor(changeSet);
} else {
return addProcessor(changeSet);
}
}
default Extent disableHistory() {