Skip to content

Commit

Permalink
fix: prevent stalling when syncing player tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
ishland committed Dec 26, 2024
1 parent 9502f87 commit 867397f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private int fakeLevel(ChunkHolder instance) {
@WrapOperation(method = "<init>", at = @At(value = "NEW", target = "(Lnet/minecraft/util/thread/TaskExecutor;Ljava/util/concurrent/Executor;I)Lnet/minecraft/server/world/ThrottledChunkTaskScheduler;"))
private ThrottledChunkTaskScheduler syncPlayerTickets(TaskExecutor<Runnable> executor, Executor dispatchExecutor, int maxConcurrentChunks, Operation<ThrottledChunkTaskScheduler> original, Executor workerExecutor, Executor mainThreadExecutor) {
if (Config.syncPlayerTickets) {
return original.call(executor, mainThreadExecutor, maxConcurrentChunks); // improve player ticket consistency
return original.call(executor, (Executor) Runnable::run, maxConcurrentChunks); // improve player ticket consistency
} else {
return original.call(executor, dispatchExecutor, maxConcurrentChunks);
}
Expand Down

0 comments on commit 867397f

Please sign in to comment.