diff --git a/divinemc-server/paper-patches/features/0020-SparklyPaper-Parallel-world-ticking.patch b/divinemc-server/paper-patches/features/0020-SparklyPaper-Parallel-world-ticking.patch index 2ccad76..ed685e9 100644 --- a/divinemc-server/paper-patches/features/0020-SparklyPaper-Parallel-world-ticking.patch +++ b/divinemc-server/paper-patches/features/0020-SparklyPaper-Parallel-world-ticking.patch @@ -627,26 +627,28 @@ index e4e2e42d0ca25df7fe9f2dd4275610e45fcb2c84..93bf7beab3b00973a19e51d48a9dfb26 // Paper start - name threads according to running plugin final String nameBefore = thread.getName(); diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index dffff76bf6df39dd26892edc2b4988fafab282e7..26659624c5fcad5f4e05fd9174dab89118ab7be7 100644 +index dffff76bf6df39dd26892edc2b4988fafab282e7..1a26dac92cb48bf892f7524a58e1031e5f83bcfb 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java -@@ -112,6 +112,21 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre +@@ -112,6 +112,23 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(MinecraftServer.getServer().serverThread.threadId(), Integer.MAX_VALUE), logger); logger.log(Level.SEVERE, "------------------------------"); + // DivineMC start - Dump Parallel World Ticking thread -+ logger.log(Level.SEVERE, "Parallel world ticking thread dump"); -+ for (Thread thread : org.apache.commons.lang3.ThreadUtils.getAllThreads()) { -+ if (MinecraftServer.getServer().serverThread == thread || thread instanceof WatchdogThread) { -+ continue; -+ } -+ if (thread instanceof ca.spottedleaf.moonrise.common.util.TickThread tickThread) { -+ if (tickThread instanceof ServerLevelTickThread tickThread1) { -+ WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(tickThread1.threadId(), Integer.MAX_VALUE), logger); ++ if (org.bxteam.divinemc.config.DivineConfig.AsyncCategory.enableParallelWorldTicking) { ++ logger.log(Level.SEVERE, "Parallel world ticking thread dump"); ++ for (Thread thread : org.apache.commons.lang3.ThreadUtils.getAllThreads()) { ++ if (MinecraftServer.getServer().serverThread == thread || thread instanceof WatchdogThread) { ++ continue; ++ } ++ if (thread instanceof ca.spottedleaf.moonrise.common.util.TickThread tickThread) { ++ if (tickThread instanceof ServerLevelTickThread tickThread1) { ++ WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(tickThread1.threadId(), Integer.MAX_VALUE), logger); ++ } + } + } ++ logger.log(Level.SEVERE, "------------------------------"); + } -+ logger.log(Level.SEVERE, "------------------------------"); + // DivineMC end - Dump Parallel World Ticking thread + // Paper start - Only print full dump on long timeouts