use of com.fastasyncworldedit.core.queue.IChunkGet in project FastAsyncWorldEdit by IntellectualSites.
the class ChunkHolder method call.
@Override
public synchronized T call(IChunkSet set, Runnable finalize) {
if (set != null) {
IChunkGet get = getOrCreateGet();
boolean postProcess = !(getExtent().getPostProcessor() instanceof EmptyBatchProcessor);
get.setCreateCopy(postProcess);
set = getExtent().processSet(this, get, set);
try {
return get.call(set, finalize);
} finally {
if (postProcess) {
getExtent().postProcess(this, get.getCopy(), set);
}
}
}
return null;
}
use of com.fastasyncworldedit.core.queue.IChunkGet in project FastAsyncWorldEdit by IntellectualSites.
the class ChunkHolder method filterBlocks.
@Override
public synchronized void filterBlocks(Filter filter, ChunkFilterBlock block, @Nullable Region region, boolean full) {
final IChunkGet get = getOrCreateGet();
final IChunkSet set = getOrCreateSet();
set.setFastMode(fastmode);
try {
block.filter(this, get, set, filter, region, full);
} finally {
filter.finishChunk(this);
}
}
Aggregations