mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-28 11:29:11 +00:00
fix async mob spawning TRACKED entities not count (#393)
* fix unloaded and TRACKED entities not count #392 * move to archived
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 79eae898539f71a73525ed29d8a752f65f5f67fa..e98279e78c9f5ddbd6dd0cdf48973453304b8e1c 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -124,6 +124,21 @@ 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, "------------------------------");
|
||||
|
||||
+ // 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