mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-06-18 00:31:46 +00:00
- Unfortunately jetbrains annotations seem to be exposed transitively via core somewhere, but with the correct IDE settings, annotations can be defaulted to javax - Cleaning up of import order in #1195 - Must be merged before #1195 Co-authored-by: NotMyFault <mc.cache@web.de>
58 lines
1.5 KiB
Java
58 lines
1.5 KiB
Java
package com.fastasyncworldedit.core.extent.processor;
|
|
|
|
import com.fastasyncworldedit.core.queue.IBatchProcessor;
|
|
import com.fastasyncworldedit.core.queue.IChunk;
|
|
import com.fastasyncworldedit.core.queue.IChunkGet;
|
|
import com.fastasyncworldedit.core.queue.IChunkSet;
|
|
import com.sk89q.worldedit.extent.Extent;
|
|
|
|
import javax.annotation.Nonnull;
|
|
import javax.annotation.Nullable;
|
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
import java.util.concurrent.Future;
|
|
|
|
public final class EmptyBatchProcessor implements IBatchProcessor {
|
|
private static final EmptyBatchProcessor instance = new EmptyBatchProcessor();
|
|
|
|
public static EmptyBatchProcessor getInstance() {
|
|
return instance;
|
|
}
|
|
|
|
@Nonnull
|
|
public Extent construct(@Nullable Extent child) {
|
|
return child;
|
|
}
|
|
|
|
@Nonnull
|
|
public IChunkSet processSet(@Nullable IChunk chunk, @Nullable IChunkGet get, @Nullable IChunkSet set) {
|
|
return set;
|
|
}
|
|
|
|
@Override
|
|
@Nonnull
|
|
public Future<IChunkSet> postProcessSet(@Nullable IChunk chunk, @Nullable IChunkGet get, @Nullable IChunkSet set) {
|
|
// Doesn't need to do anything
|
|
return CompletableFuture.completedFuture(set);
|
|
}
|
|
|
|
@Nonnull
|
|
public IBatchProcessor join(@Nullable IBatchProcessor other) {
|
|
return other;
|
|
}
|
|
|
|
@Nonnull
|
|
public IBatchProcessor joinPost(@Nullable IBatchProcessor other) {
|
|
return other;
|
|
}
|
|
|
|
private EmptyBatchProcessor() {
|
|
}
|
|
|
|
@Override
|
|
public ProcessorScope getScope() {
|
|
return ProcessorScope.ADDING_BLOCKS;
|
|
}
|
|
|
|
}
|