Ensure forceSync is provided when constructing chunk coordinators (#3657)

* Ensure forceSync is provided when constructing chunk coordinators

* Re-add old factory create method and deprecate for removal

* Remove old create method that Guice doesn't like
This commit is contained in:
Jordan
2022-06-12 09:47:43 +01:00
committed by GitHub
parent a238ff19bf
commit b9479405e1
5 changed files with 27 additions and 10 deletions

View File

@ -92,9 +92,9 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
@Assisted final @NonNull Collection<BlockVector2> requestedChunks,
@Assisted final @NonNull Runnable whenDone,
@Assisted final @NonNull Consumer<Throwable> throwableConsumer,
@Assisted final boolean unloadAfter,
@Assisted("unloadAfter") final boolean unloadAfter,
@Assisted final @NonNull Collection<ProgressSubscriber> progressSubscribers,
@Assisted final boolean forceSync
@Assisted("forceSync") final boolean forceSync
) {
this.requestedChunks = new LinkedBlockingQueue<>(requestedChunks);
this.availableChunks = new LinkedBlockingQueue<>();

View File

@ -235,6 +235,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
.withConsumer(consumer)
.unloadAfter(isUnloadAfter())
.withProgressSubscribers(getProgressSubscribers())
.forceSync(isForceSync())
.build();
return super.enqueue();
}