aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2024-02-23 13:54:52 +0000
committerShane Freeder <[email protected]>2024-02-23 13:54:52 +0000
commite3bc4c4107c2f9574a9bc5db9211b32ac0d0ab5a (patch)
treea7081be8569b6fa13f817a14286756d099844b8c
parent71c84c8132a463ca26978b852bbbf33ae42cd4ce (diff)
downloadPaper-e3bc4c4107c2f9574a9bc5db9211b32ac0d0ab5a.tar.gz
Paper-e3bc4c4107c2f9574a9bc5db9211b32ac0d0ab5a.zip
Make debug mode print current configuration phase
-rw-r--r--patches/server/0364-misc-debugging-dumps.patch15
-rw-r--r--patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch4
2 files changed, 15 insertions, 4 deletions
diff --git a/patches/server/0364-misc-debugging-dumps.patch b/patches/server/0364-misc-debugging-dumps.patch
index 5495434652..23c37105f1 100644
--- a/patches/server/0364-misc-debugging-dumps.patch
+++ b/patches/server/0364-misc-debugging-dumps.patch
@@ -71,10 +71,21 @@ index e5ecca5ae9e37e4d4d6d2adfd5f487a869ab775d..390bc01c19d5fed7ed455ddf98236974
this.running = false;
if (waitForShutdown) {
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
-index 04a728a16bb629adbae1cd8586764a6dbc22b5dc..d130f843975236018df4fa2ccc3ca6aaca7a06b8 100644
+index 04a728a16bb629adbae1cd8586764a6dbc22b5dc..e2537760becdd5b3f3561f7159ed7fc2755e6260 100644
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
-@@ -131,6 +131,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
+@@ -57,6 +57,10 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
+
+ @Override
+ public void onDisconnect(Component reason) {
++ // Paper start - Debugging
++ if (net.minecraft.server.MinecraftServer.getServer().isDebugging()) {
++ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile, reason.getString(), currentTask != null ? currentTask.type().id() : "null");
++ } else // Paper end
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, reason.getString());
+ super.onDisconnect(reason);
+ }
+@@ -131,6 +135,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
this.connection.resumeInboundAfterProtocolChange();
} catch (Exception exception) {
ServerConfigurationPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
diff --git a/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
index 0a587ebe4d..8444599d8b 100644
--- a/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
+++ b/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
@@ -557,10 +557,10 @@ index 28fe088d97bd5fbfcc29dcc7d2a657d54578b2be..c41c53ee3b1a8b5c2c41fc9846f557ee
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
-index d130f843975236018df4fa2ccc3ca6aaca7a06b8..76f31845fe50200d09e5ab6a6c08da00444414ad 100644
+index e2537760becdd5b3f3561f7159ed7fc2755e6260..87c5690774363edc1b7ebff10b041e48c0a6d56d 100644
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
-@@ -133,7 +133,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
+@@ -137,7 +137,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
ServerConfigurationPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
// Paper start - Debugging
if (MinecraftServer.getServer().isDebugging()) {