2020-09-17 20:31:55 +00:00
|
|
|
package com.boydti.fawe.beta.implementation.processors;
|
|
|
|
|
|
|
|
import com.boydti.fawe.beta.IBatchProcessor;
|
|
|
|
import com.boydti.fawe.beta.IChunk;
|
|
|
|
import com.boydti.fawe.beta.IChunkGet;
|
|
|
|
import com.boydti.fawe.beta.IChunkSet;
|
|
|
|
import com.sk89q.worldedit.extent.Extent;
|
|
|
|
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
|
2020-09-28 10:13:02 +00:00
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
import java.util.concurrent.Future;
|
|
|
|
|
2020-09-17 20:31:55 +00:00
|
|
|
public final class EmptyBatchProcessor implements IBatchProcessor {
|
|
|
|
private static final EmptyBatchProcessor instance = new EmptyBatchProcessor();
|
|
|
|
|
|
|
|
public static EmptyBatchProcessor getInstance() {
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
public Extent construct(@Nullable Extent child) {
|
|
|
|
return child;
|
|
|
|
}
|
|
|
|
|
|
|
|
@NotNull
|
|
|
|
public IChunkSet processSet(@Nullable IChunk chunk, @Nullable IChunkGet get, @Nullable IChunkSet set) {
|
|
|
|
return set;
|
|
|
|
}
|
|
|
|
|
2020-09-28 10:13:02 +00:00
|
|
|
@Override
|
|
|
|
@NotNull
|
|
|
|
public Future<IChunkSet> postProcessSet(@Nullable IChunk chunk, @Nullable IChunkGet get, @Nullable IChunkSet set) {
|
|
|
|
// Doesn't need to do anything
|
|
|
|
return CompletableFuture.completedFuture(set);
|
|
|
|
}
|
|
|
|
|
2020-09-17 20:31:55 +00:00
|
|
|
@NotNull
|
|
|
|
public IBatchProcessor join(@Nullable IBatchProcessor other) {
|
|
|
|
return other;
|
|
|
|
}
|
|
|
|
|
2020-09-28 10:13:02 +00:00
|
|
|
@NotNull
|
|
|
|
public IBatchProcessor joinPost(@Nullable IBatchProcessor other) {
|
|
|
|
return other;
|
|
|
|
}
|
|
|
|
|
2020-09-17 20:31:55 +00:00
|
|
|
private EmptyBatchProcessor() {
|
|
|
|
}
|
|
|
|
|
2021-01-11 19:29:16 +00:00
|
|
|
@Override
|
|
|
|
public ProcessorScope getScope() {
|
|
|
|
return ProcessorScope.ADDING_BLOCKS;
|
|
|
|
}
|
|
|
|
|
2020-09-17 20:31:55 +00:00
|
|
|
}
|