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 74afd31 commit 7f5e813
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private int fakeLevel(ChunkHolder instance) {

@WrapOperation(method = "<init>", at = @At(value = "NEW", target = "(Ljava/util/List;Ljava/util/concurrent/Executor;I)Lnet/minecraft/server/world/ChunkTaskPrioritySystem;"))
private ChunkTaskPrioritySystem syncPlayerTickets(List actors, Executor executor, int maxQueues, Operation<ChunkTaskPrioritySystem> original) {
if (Config.syncPlayerTickets && this instanceof ITACSTicketManager itacsTicketManager) {
return original.call(actors, ((IThreadedAnvilChunkStorage) itacsTicketManager.getField_17443()).getWorld().getServer(), maxQueues); // improve player ticket consistency
if (Config.syncPlayerTickets) {
return original.call(actors, (Executor) Runnable::run, maxQueues); // improve player ticket consistency
} else {
return original.call(actors, executor, maxQueues);
}
Expand Down

0 comments on commit 7f5e813

Please sign in to comment.