Skip to content

Commit

Permalink
fix: use new lighting sync method added in 1.21.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Oct 26, 2024
1 parent 3c6c78b commit ffe2dc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@ public interface IServerLightingProvider {
@Invoker
void invokeUpdateChunkStatus(ChunkPos pos);

@Invoker
void invokeEnqueue(int x, int z, IntSupplier completedLevelSupplier, ServerLightingProvider.Stage stage, Runnable task);

}
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,11 @@ private CompletionStage<Void> asyncSave(ServerChunkLoadingManager tacs, Chunk ch
}
}

protected CompletionStage<Void> syncWithLightEngine(ChunkLoadingContext context) {
final CompletableFuture<Void> future = new CompletableFuture<>();
((IServerLightingProvider) ((IThreadedAnvilChunkStorage) context.tacs()).getLightingProvider()).invokeEnqueue(
protected CompletionStage<?> syncWithLightEngine(ChunkLoadingContext context) {
return ((IThreadedAnvilChunkStorage) context.tacs()).getLightingProvider().enqueue(
context.holder().getKey().x,
context.holder().getKey().z,
() -> 0,
ServerLightingProvider.Stage.POST_UPDATE,
() -> future.complete(null)
context.holder().getKey().z
);
return future;
}

@Override
Expand Down

0 comments on commit ffe2dc0

Please sign in to comment.