From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: NanaChiyo0721 Date: Sun, 26 Jul 2026 20:42:44 +0800 Subject: [PATCH] Fix wrong ticket update determination in RegionizedTaskQueue diff --git a/io/papermc/paper/threadedregions/RegionizedTaskQueue.java b/io/papermc/paper/threadedregions/RegionizedTaskQueue.java index fefec2930716b02b8e14f4b4f0fe3226fe53a617..037697e6364c73057b1fbac354bd78d8bf35bc7b 100644 --- a/io/papermc/paper/threadedregions/RegionizedTaskQueue.java +++ b/io/papermc/paper/threadedregions/RegionizedTaskQueue.java @@ -289,14 +289,17 @@ public final class RegionizedTaskQueue { boolean executeTickTasks = allowedTickTasks > 0; boolean executeChunkTasks = allowedChunkTasks > 0; boolean executeGlobalTasks = true; + boolean processedChunkTask = false; // Shiroha - Fix wrong ticket update determination in RegionizedTaskQueue do { executeTickTasks = executeTickTasks && allowedTickTasks-- > 0 && tickTaskQueue.executeTask(); executeChunkTasks = executeChunkTasks && allowedChunkTasks-- > 0 && chunkTaskQueue.executeTask(); executeGlobalTasks = executeGlobalTasks && this.worldRegionTaskData.executeGlobalChunkTask(); + + processedChunkTask |= (executeChunkTasks | executeGlobalTasks); // Shiroha - Fix wrong ticket update determination in RegionizedTaskQueue } while (executeTickTasks | executeChunkTasks | executeGlobalTasks); - if (allowedChunkTasks > 0) { + if (processedChunkTask) { // Shiroha - Fix wrong ticket update determination in RegionizedTaskQueue // if we executed chunk tasks, we should try to process ticket updates for full status changes this.worldRegionTaskData.world.moonrise$getChunkTaskScheduler().chunkHolderManager.processTicketUpdates(); }