mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-03 22:26:19 +00:00
backport 1.21.8 async mob spawn (#479)
* backport: 1.21.8 async mob spawn * Move into patch * fix * fix build --------- Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Co-authored-by: hayanesuru <hayanesuru@outlook.jp>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: hayanesuru <hayanesuru@outlook.jp>
|
||||
Date: Sat, 7 Jun 2025 20:33:16 +0900
|
||||
Subject: [PATCH] dump pwt thread
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index e45d5da04428c26fc6aa97fba974bde3573d7950..16e5ab49bc96f64143eb9e0dff19b33a7e3b5f3a 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -126,6 +126,21 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
|
||||
WatchdogThread.dumpThread(ManagementFactory.getThreadMXBean().getThreadInfo(MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE), logger);
|
||||
logger.log(Level.SEVERE, "------------------------------");
|
||||
|
||||
+ // Leaf start - dump pwt 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);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ logger.log(Level.SEVERE, "------------------------------");
|
||||
+ // Leaf end - dump pwt thread
|
||||
+
|
||||
// Paper start - Only print full dump on long timeouts
|
||||
if (isLongTimeout) {
|
||||
logger.log(Level.SEVERE, "Entire Thread Dump:");
|
||||
Reference in New Issue
Block a user