From 763f7681a727f20ecddcaa817860bbfbf718e399 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 7 Jun 2022 16:41:36 +0100 Subject: [PATCH] Re-add old factory create method and deprecate for removal --- .../factory/ChunkCoordinatorFactory.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorFactory.java b/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorFactory.java index 5be3a5421..87392ef54 100644 --- a/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorFactory.java +++ b/Core/src/main/java/com/plotsquared/core/inject/factory/ChunkCoordinatorFactory.java @@ -37,6 +37,36 @@ import java.util.function.Consumer; public interface ChunkCoordinatorFactory { + /** + * @deprecated Use {@link ChunkCoordinatorFactory#create(long, int, Consumer, World, Collection, Runnable, Consumer, boolean, Collection, boolean)} + */ + @Deprecated(forRemoval = true, since = "TODO") + @NonNull + default ChunkCoordinator create( + final long maxIterationTime, + final int initialBatchSize, + final @NonNull Consumer chunkConsumer, + final @NonNull World world, + final @NonNull Collection requestedChunks, + final @NonNull Runnable whenDone, + final @NonNull Consumer throwableConsumer, + final boolean unloadAfter, + final @NonNull Collection progressSubscribers + ) { + return create( + maxIterationTime, + initialBatchSize, + chunkConsumer, + world, + requestedChunks, + whenDone, + throwableConsumer, + unloadAfter, + progressSubscribers, + false + ); + } + @NonNull ChunkCoordinator create( final long maxIterationTime, final int initialBatchSize,