mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
[ci skip] add a good chunk of patch identifying comments
This commit is contained in:
@@ -5,14 +5,14 @@ Subject: [PATCH] Lagging threshold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a79a30b951325d046b38b4dc62c4cc6f22db564e..bac36e5798ae92c75c73a0d0bd53d7bd6ddb07a8 100644
|
||||
index e9aaa471c5a21307af9c9c15c59dd98eba1a7675..00808ffd5b9afd16fb0c7353ef834d0479598ac8 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -329,6 +329,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
|
||||
+ public boolean lagging = false; // Purpur
|
||||
+ public boolean lagging = false; // Purpur - Lagging threshold
|
||||
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
@@ -20,27 +20,27 @@ index a79a30b951325d046b38b4dc62c4cc6f22db564e..bac36e5798ae92c75c73a0d0bd53d7bd
|
||||
this.recentTps[0] = tps1.getAverage();
|
||||
this.recentTps[1] = tps5.getAverage();
|
||||
this.recentTps[2] = tps15.getAverage();
|
||||
+ lagging = recentTps[0] < org.purpurmc.purpur.PurpurConfig.laggingThreshold; // Purpur
|
||||
+ lagging = recentTps[0] < org.purpurmc.purpur.PurpurConfig.laggingThreshold; // Purpur - Lagging threshold
|
||||
tickSection = currentTime;
|
||||
}
|
||||
// Paper end - further improve server tick loop
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5c1d968d560cb1caf69549ff03a960a7a960d952..6e4725f49de3ddb74002732b9f462bcfcd161be0 100644
|
||||
index 3259d5796287f2e7886b5742b25d9f1f1bc22d6d..9d330d5e113a19e705d61a7532832d9decdb64f2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -3291,5 +3291,10 @@ public final class CraftServer implements Server {
|
||||
public String getServerName() {
|
||||
@@ -3292,4 +3292,10 @@ public final class CraftServer implements Server {
|
||||
return this.getProperties().serverName;
|
||||
}
|
||||
+
|
||||
// Purpur end
|
||||
+ // Purpur start - Lagging threshold
|
||||
+ @Override
|
||||
+ public boolean isLagging() {
|
||||
+ return getServer().lagging;
|
||||
+ }
|
||||
// Purpur end
|
||||
+ // Purpur end - Lagging threshold
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index df2be3351bcaaf1ffb73261da6c840314f5c11a1..a6c90de7726a264ca44c3e795e9b6a4e1c313bc3 100644
|
||||
index 47ffe5ef0429101414b33a41e91631712a92b32d..bfa985913f3f750a0727a567d3b5951b4d6ed4ca 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -196,6 +196,11 @@ public class PurpurConfig {
|
||||
|
||||
Reference in New Issue
Block a user