Search in sources :

Example 1 with IChunkGet

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;
}
Also used : IChunkGet(com.fastasyncworldedit.core.queue.IChunkGet) EmptyBatchProcessor(com.fastasyncworldedit.core.extent.processor.EmptyBatchProcessor)

Example 2 with IChunkGet

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);
    }
}
Also used : IChunkGet(com.fastasyncworldedit.core.queue.IChunkGet) IChunkSet(com.fastasyncworldedit.core.queue.IChunkSet)

Aggregations

IChunkGet (com.fastasyncworldedit.core.queue.IChunkGet)2 EmptyBatchProcessor (com.fastasyncworldedit.core.extent.processor.EmptyBatchProcessor)1 IChunkSet (com.fastasyncworldedit.core.queue.IChunkSet)1