Update upstream B/CB/S

This commit is contained in:
Zach Brown 2016-07-15 17:36:53 -05:00
commit f1691b34c5
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
20 changed files with 107 additions and 106 deletions

View file

@ -1,4 +1,4 @@
From 1f95abb8e7716c606dfdb71a97e94808cc2fc238 Mon Sep 17 00:00:00 2001
From a1736bd08470fa83ab378b446396c85282b78180 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 1 Mar 2016 23:09:29 -0600
Subject: [PATCH] Further improve server tick loop
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index fab855c..31d2a10 100644
index 37d25c1..8ca0022 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -114,17 +114,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -109,17 +109,11 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@ -34,7 +34,7 @@ index fab855c..31d2a10 100644
public MinecraftServer(OptionSet options, Proxy proxy, DataConverterManager dataconvertermanager, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache) {
io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable
@@ -529,12 +523,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -524,12 +518,54 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
this.isRunning = false;
}
@ -94,7 +94,7 @@ index fab855c..31d2a10 100644
public void run() {
try {
@@ -548,24 +584,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
@@ -543,24 +579,41 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
// Spigot start
Arrays.fill( recentTps, 20 );
@ -211,5 +211,5 @@ index be2e31d..6d21c32 100644
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
--
2.9.0
2.9.0.windows.1