Archiviert
13
0

Fix incorect timing of mspt

Move oversleep and all task execution back into the timed area...
Dieser Commit ist enthalten in:
Spottedleaf 2020-04-15 18:48:07 -07:00 committet von Aikar
Ursprung 1ca8043428
Commit eb71c5fa3b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
14 geänderte Dateien mit 136 neuen und 122 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From fb60ef200e888ae1e048b84dce79c1f3b74a937e Mon Sep 17 00:00:00 2001
From 0f6b76838fe5cdb40f06b1e5fe44d620481efb5b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -749,7 +749,7 @@ index 1f350e335..35e3f1c78 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b4a0bd795..4dc691775 100644
index b4a0bd795..456d03be2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -809,12 +809,15 @@ index b4a0bd795..4dc691775 100644
});
}
@@ -976,7 +987,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -976,10 +987,18 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
protected void exit() {}
protected void a(BooleanSupplier booleansupplier) {
- SpigotTimings.serverTickTimer.startTiming(); // Spigot
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos();
+ // Paper start - move oversleep into full server tick
+ MinecraftTimings.serverOversleep.startTiming();
+ this.awaitTasks(() -> {
@ -822,10 +825,11 @@ index b4a0bd795..4dc691775 100644
+ });
+ MinecraftTimings.serverOversleep.stopTiming();
+ // Paper end
this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos();
@@ -997,14 +1015,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
+
++this.ticks;
this.b(booleansupplier);
if (i - this.Z >= 5000000000L) {
@@ -997,14 +1016,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
@ -840,17 +844,26 @@ index b4a0bd795..4dc691775 100644
}
this.methodProfiler.enter("snooper");
@@ -1027,30 +1043,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1017,6 +1034,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
+
+ // Paper start - move executeAll() into full server tick timing
+ try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
+ this.executeAll();
+ }
+ // Paper end
+
this.methodProfiler.enter("tallying");
long l = this.f[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
@@ -1027,30 +1051,29 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
this.slackActivityAccountant.tickEnded(l); // Spigot
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
}
@ -884,7 +897,7 @@ index b4a0bd795..4dc691775 100644
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.ticks % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -1058,7 +1078,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1058,7 +1081,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
}
}
@ -893,7 +906,7 @@ index b4a0bd795..4dc691775 100644
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@@ -1101,24 +1121,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1101,24 +1124,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
this.methodProfiler.exitEnter("connection");

Datei anzeigen

@ -1,4 +1,4 @@
From 7d34230f0cb2c4243f6edb286cd1011d6636001f Mon Sep 17 00:00:00 2001
From 4d48a37c0c99a45cff782138493194d06df4dc42 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 14:32:43 -0600
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
index 3f35a28ba1..cf00f35a5b 100644
index 3f35a28ba..cf00f35a5 100644
--- a/src/main/java/net/minecraft/server/EULA.java
+++ b/src/main/java/net/minecraft/server/EULA.java
@@ -70,7 +70,7 @@ public class EULA {
@ -19,10 +19,10 @@ index 3f35a28ba1..cf00f35a5b 100644
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4dc6917759..2b3844ae5a 100644
index 456d03be2..35b226cd5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1340,7 +1340,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1343,7 +1343,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {
@ -32,7 +32,7 @@ index 4dc6917759..2b3844ae5a 100644
public CrashReport b(CrashReport crashreport) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f3eacb1819..99a6b3d443 100644
index f3eacb181..99a6b3d44 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -199,7 +199,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@ -45,7 +45,7 @@ index f3eacb1819..99a6b3d443 100644
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 0d8668d34d..ba0fe4ae2c 100644
index 0d8668d34..ba0fe4ae2 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -201,12 +201,25 @@ public class Main {
@ -76,7 +76,7 @@ index 0d8668d34d..ba0fe4ae2c 100644
MinecraftServer.main(options);
} catch (Throwable t) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 54fa83c127..73fa74e3cc 100644
index 54fa83c12..73fa74e3c 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
@ -116,5 +116,5 @@ index 54fa83c127..73fa74e3cc 100644
log.log( Level.SEVERE, "------------------------------" );
//
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From fa60dfa8abbded975fd2e8345c362951447801b9 Mon Sep 17 00:00:00 2001
From 7c796e60234f3887773d5a6d827c214b1303fdf6 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 11:59:48 -0600
Subject: [PATCH] Optimize explosions
@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 50dec5cb5e..f038d3f7dc 100644
index 50dec5cb5..f038d3f7d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -150,4 +150,10 @@ public class PaperWorldConfig {
@ -25,7 +25,7 @@ index 50dec5cb5e..f038d3f7dc 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
index a063d1bfaa..5583860f15 100644
index a063d1bfa..5583860f1 100644
--- a/src/main/java/net/minecraft/server/Explosion.java
+++ b/src/main/java/net/minecraft/server/Explosion.java
@@ -177,7 +177,7 @@ public class Explosion {
@ -123,10 +123,10 @@ index a063d1bfaa..5583860f15 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7b8c523e6d..3d580a666b 100644
index 91ea693bc..c9eb13119 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1176,6 +1176,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1179,6 +1179,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.exit();
this.methodProfiler.exit();
@ -135,7 +135,7 @@ index 7b8c523e6d..3d580a666b 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 84d7770223..7c95fd6645 100644
index 1bb362015..460463457 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -80,6 +80,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -147,5 +147,5 @@ index 84d7770223..7c95fd6645 100644
public CraftWorld getWorld() {
return this.world;
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From 0283d4c14d3f32472d0471735d3751061ca70090 Mon Sep 17 00:00:00 2001
From ca8bdf972dc165aa852e053bb5912feceead2fad Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/BlockPlant.java b/src/main/java/net/minecraft/server/BlockPlant.java
index ed1da4f4ba..a6891b9fa7 100644
index ed1da4f4b..a6891b9fa 100644
--- a/src/main/java/net/minecraft/server/BlockPlant.java
+++ b/src/main/java/net/minecraft/server/BlockPlant.java
@@ -16,7 +16,7 @@ public class BlockPlant extends Block {
@ -19,7 +19,7 @@ index ed1da4f4ba..a6891b9fa7 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTallPlant.java b/src/main/java/net/minecraft/server/BlockTallPlant.java
index 42e86881bd..6cdce11581 100644
index 42e86881b..6cdce1158 100644
--- a/src/main/java/net/minecraft/server/BlockTallPlant.java
+++ b/src/main/java/net/minecraft/server/BlockTallPlant.java
@@ -55,7 +55,7 @@ public class BlockTallPlant extends BlockPlant {
@ -32,10 +32,10 @@ index 42e86881bd..6cdce11581 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3d580a666b..3094f763ba 100644
index c9eb13119..1d3f1be24 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1142,6 +1142,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1145,6 +1145,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();
@ -44,7 +44,7 @@ index 3d580a666b..3094f763ba 100644
this.methodProfiler.a(() -> {
return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager());
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 6b1ff8f64f..1edd030865 100644
index 6b1ff8f64..1edd03086 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -369,7 +369,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -66,7 +66,7 @@ index 6b1ff8f64f..1edd030865 100644
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 96ed2da1f8..9d0edf5382 100644
index 96ed2da1f..9d0edf538 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -75,6 +75,7 @@ public class WorldServer extends World {
@ -78,5 +78,5 @@ index 96ed2da1f8..9d0edf5382 100644
// Add env and gen to constructor
public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From 01b59448b29692a6c98d7249eb5f9d5e9132506a Mon Sep 17 00:00:00 2001
From 9feee69060416cf7b59158ec4323bc80e2b2f4eb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 Apr 2016 00:57:27 -0400
Subject: [PATCH] remove null possibility for getServer singleton
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index deffa2ddbd..f45c658770 100644
index f82be54cc..54b4172e6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -68,6 +68,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
@ -25,7 +25,7 @@ index deffa2ddbd..f45c658770 100644
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
this.craftingManager = new CraftingManager();
this.tagRegistry = new TagRegistry();
@@ -2181,7 +2183,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2184,7 +2186,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Deprecated
public static MinecraftServer getServer() {
@ -35,5 +35,5 @@ index deffa2ddbd..f45c658770 100644
// CraftBukkit end
}
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From ae37423189520689ed1fa08b3faa834e6940a363 Mon Sep 17 00:00:00 2001
From b0cac0325343f6656dca54c1a48d7fb79176097b Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 9 Jun 2017 19:03:43 +0200
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/pom.xml b/pom.xml
index 3dc6c2a3f5..b1f008738b 100644
index 3dc6c2a3f..b1f008738 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,10 +41,27 @@
@ -75,7 +75,7 @@ index 3dc6c2a3f5..b1f008738b 100644
<groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
new file mode 100644
index 0000000000..cd6e259239
index 000000000..cd6e25923
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
@@ -0,0 +1,40 @@
@ -121,7 +121,7 @@ index 0000000000..cd6e259239
+}
diff --git a/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
new file mode 100644
index 0000000000..685deaa0e5
index 000000000..685deaa0e
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/console/TerminalConsoleCommandSender.java
@@ -0,0 +1,17 @@
@ -143,7 +143,7 @@ index 0000000000..685deaa0e5
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 4b1f8c5373..d34f772fae 100644
index 4b1f8c537..d34f772fa 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -86,6 +86,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -185,7 +185,7 @@ index 4b1f8c5373..d34f772fae 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e41352681a..7016dac2d7 100644
index af2fa93d4..94f9201fc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -57,7 +57,7 @@ import org.apache.commons.lang3.Validate;
@ -234,7 +234,7 @@ index e41352681a..7016dac2d7 100644
} catch (Exception ignored) {
}
// CraftBukkit end
@@ -1470,7 +1474,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1473,7 +1477,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@Override
public void sendMessage(IChatBaseComponent ichatbasecomponent) {
@ -244,7 +244,7 @@ index e41352681a..7016dac2d7 100644
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1eb53f67ef..308bc3baf2 100644
index d8e74e227..55c2cd05b 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -76,8 +76,7 @@ public abstract class PlayerList {
@ -258,7 +258,7 @@ index 1eb53f67ef..308bc3baf2 100644
this.k = new GameProfileBanList(PlayerList.b);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2e0f443d9f..742c21480a 100644
index 2e0f443d9..742c21480 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -42,7 +42,6 @@ import java.util.logging.Level;
@ -284,7 +284,7 @@ index 2e0f443d9f..742c21480a 100644
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 93fcfd5f39..0e76e34664 100644
index 93fcfd5f3..0e76e3466 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,7 @@ import java.util.logging.Logger;
@ -335,7 +335,7 @@ index 93fcfd5f39..0e76e34664 100644
} catch (Throwable t) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
deleted file mode 100644
index fdf2f075e2..0000000000
index fdf2f075e..000000000
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ /dev/null
@@ -1,72 +0,0 @@
@ -412,7 +412,7 @@ index fdf2f075e2..0000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index befcc19f9b..5510266fb1 100644
index befcc19f9..5510266fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -4,20 +4,31 @@ import java.util.Collections;
@ -495,7 +495,7 @@ index befcc19f9b..5510266fb1 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 70f8d42992..449e99d1b6 100644
index 70f8d4299..449e99d1b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -17,7 +17,7 @@ public class ServerShutdownThread extends Thread {
@ -509,7 +509,7 @@ index 70f8d42992..449e99d1b6 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
deleted file mode 100644
index 99564fed7c..0000000000
index 99564fed7..000000000
--- a/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ /dev/null
@@ -1,58 +0,0 @@
@ -573,13 +573,13 @@ index 99564fed7c..0000000000
-}
diff --git a/src/main/resources/log4j2.component.properties b/src/main/resources/log4j2.component.properties
new file mode 100644
index 0000000000..0694b21465
index 000000000..0694b2146
--- /dev/null
+++ b/src/main/resources/log4j2.component.properties
@@ -0,0 +1 @@
+log4j.skipJansi=true
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 722ca84968..620b9490e5 100644
index 722ca8496..620b9490e 100644
--- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml
@@ -1,17 +1,14 @@
@ -617,5 +617,5 @@ index 722ca84968..620b9490e5 100644
</Loggers>
</Configuration>
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From fb720aecd1ee72dabbc49e34c4b1eab26925602a Mon Sep 17 00:00:00 2001
From 3c67be2e0ee75a21eb6cc74199f1992d702f09c1 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 15 Jan 2018 22:11:48 -0500
Subject: [PATCH] Basic PlayerProfile API
@ -429,10 +429,10 @@ index cc495020e..dae1560be 100644
* Calculates distance between 2 entities
* @param e1
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7016dac2d..c15ca642d 100644
index 94f9201fc..ae939c9bd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1296,7 +1296,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1299,7 +1299,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
DispenserRegistry.init();
DispenserRegistry.c();
File s = (File) optionset.valueOf("universe"); // CraftBukkit
@ -441,7 +441,7 @@ index 7016dac2d..c15ca642d 100644
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(s, MinecraftServer.b.getName()));
@@ -1761,6 +1761,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1764,6 +1764,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.H = i;
}

Datei anzeigen

@ -1,4 +1,4 @@
From b4279d84e7e4e55a7582391f805d011d0a27841b Mon Sep 17 00:00:00 2001
From dd7f18e4ff17100f5e82d7b83b4037cf8bec4da2 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Wed, 11 Oct 2017 15:56:26 +0200
Subject: [PATCH] Implement extended PaperServerListPingEvent
@ -6,7 +6,7 @@ Subject: [PATCH] Implement extended PaperServerListPingEvent
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
new file mode 100644
index 0000000000..c1a8e295b6
index 000000000..c1a8e295b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperServerListPingEventImpl.java
@@ -0,0 +1,31 @@
@ -43,7 +43,7 @@ index 0000000000..c1a8e295b6
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
new file mode 100644
index 0000000000..a2a409e635
index 000000000..a2a409e63
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperStatusClient.java
@@ -0,0 +1,11 @@
@ -60,7 +60,7 @@ index 0000000000..a2a409e635
+}
diff --git a/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
new file mode 100644
index 0000000000..a85466bc7e
index 000000000..a85466bc7
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/StandardPaperServerListPingEventImpl.java
@@ -0,0 +1,112 @@
@ -177,7 +177,7 @@ index 0000000000..a85466bc7e
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index c15ca642d0..7c268eb543 100644
index ae939c9bd..b292e5046 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,6 +1,9 @@
@ -190,7 +190,7 @@ index c15ca642d0..7c268eb543 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gson.JsonElement;
@@ -1089,7 +1092,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1090,7 +1093,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
if (i - this.Z >= 5000000000L) {
this.Z = i;
this.serverPing.setPlayerSample(new ServerPing.ServerPingPlayerSample(this.getMaxPlayers(), this.getPlayerCount()));
@ -200,7 +200,7 @@ index c15ca642d0..7c268eb543 100644
for (int k = 0; k < agameprofile.length; ++k) {
diff --git a/src/main/java/net/minecraft/server/PacketStatusListener.java b/src/main/java/net/minecraft/server/PacketStatusListener.java
index 658ea609cb..4bb21c48bd 100644
index 658ea609c..4bb21c48b 100644
--- a/src/main/java/net/minecraft/server/PacketStatusListener.java
+++ b/src/main/java/net/minecraft/server/PacketStatusListener.java
@@ -37,6 +37,8 @@ public class PacketStatusListener implements PacketStatusInListener {
@ -223,7 +223,7 @@ index 658ea609cb..4bb21c48bd 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index aa125a52dc..ea52e89bd9 100644
index aa125a52d..ea52e89bd 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -29,6 +29,7 @@ public class ServerPing {
@ -248,7 +248,7 @@ index aa125a52dc..ea52e89bd9 100644
this.c = agameprofile;
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 6d77bbc5aa..1cf214eaca 100644
index 6d77bbc5a..1cf214eac 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -285,7 +285,7 @@ public class SpigotConfig
@ -261,5 +261,5 @@ index 6d77bbc5aa..1cf214eaca 100644
}
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From e9816376a1d29e4ae9a7bc1d1a9f0d40cab43354 Mon Sep 17 00:00:00 2001
From 4d5cb83b71c21ca399fa9f8c55f8040cc1cbb986 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 2 Nov 2018 23:11:51 -0400
Subject: [PATCH] Optimize World Time Updates
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a3156d0034..2a01e609c6 100644
index e7197f20e..4d604bd0e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1161,12 +1161,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1164,12 +1164,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.
@ -41,5 +41,5 @@ index a3156d0034..2a01e609c6 100644
while (iterator.hasNext()) {
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From d5722f66c199ff95a1b76847328dd2934273e73e Mon Sep 17 00:00:00 2001
From 335fc27d048916fe0dead7f191e5af9c18f5b4ba Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Mar 2019 22:48:45 -0400
Subject: [PATCH] Server Tick Events
@ -6,29 +6,30 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2a01e609c6..2801a3ee69 100644
index 4d604bd0e..2a8e097f9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1086,6 +1086,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1087,6 +1087,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
});
MinecraftTimings.serverOversleep.stopTiming();
// Paper end
this.slackActivityAccountant.tickStarted(); // Spigot
long i = SystemUtils.getMonotonicNanos();
+ new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.ticks+1).callEvent(); // Paper
++this.ticks;
this.b(booleansupplier);
@@ -1137,6 +1138,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.executeAll();
@@ -1130,6 +1131,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
// Paper end
+ // Paper start
+ long endTime = System.nanoTime();
+ long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
+ new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.ticks, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
+ // Paper end
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
}
+
this.methodProfiler.enter("tallying");
long l = this.f[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From 658f9513fa8791f6ad42b16e8b09c2bfd3fbb0c5 Mon Sep 17 00:00:00 2001
From 320210a73ad0e0c324fd29d09da9b7f901af29ee Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 13 May 2019 21:10:59 -0700
Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer
@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
synchronously when the server gets shut down.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2801a3ee69..3ede5ce2a6 100644
index 2a8e097f9..91af25632 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2211,7 +2211,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -2215,7 +2215,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// CraftBukkit start
@Override
public boolean isMainThread() {
@ -29,7 +29,7 @@ index 2801a3ee69..3ede5ce2a6 100644
@Deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 30dd66b81a..0df49581fb 100644
index 30dd66b81..0df49581f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1705,7 +1705,7 @@ public final class CraftServer implements Server {
@ -42,5 +42,5 @@ index 30dd66b81a..0df49581fb 100644
@Override
--
2.25.1
2.26.0

Datei anzeigen

@ -1,11 +1,11 @@
From f1212c1d28b0b35e5da33608445d82ae346049c9 Mon Sep 17 00:00:00 2001
From bdd67599f2d5e1ca906762d34d933441e00656ae Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 9 Jun 2019 03:53:22 +0100
Subject: [PATCH] incremental chunk saving
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 071e5e7f72..4867615215 100644
index 071e5e7f7..486761521 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -487,4 +487,19 @@ public class PaperWorldConfig {
@ -29,7 +29,7 @@ index 071e5e7f72..4867615215 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c263a8250d..1709f9b842 100644
index 23cc0c360..d6637f3dd 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
@ -42,7 +42,7 @@ index c263a8250d..1709f9b842 100644
private long inhabitedTime;
@Nullable
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 0db7b88bdd..462b224dfe 100644
index 0db7b88bd..462b224df 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -434,6 +434,15 @@ public class ChunkProviderServer extends IChunkProvider {
@ -62,7 +62,7 @@ index 0db7b88bdd..462b224dfe 100644
public void close() throws IOException {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index eaa26e1a50..6fa08c60bd 100644
index 660a27f1f..d1ec708a7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -73,7 +73,7 @@ index eaa26e1a50..6fa08c60bd 100644
public File bukkitDataPackFolder;
public CommandDispatcher vanillaCommandDispatcher;
private boolean forceTicks;
@@ -1122,14 +1123,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1123,14 +1124,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.serverPing.b().a(agameprofile);
}
@ -108,7 +108,7 @@ index eaa26e1a50..6fa08c60bd 100644
this.methodProfiler.enter("snooper");
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index b6d3870063..66a389a67e 100644
index b6d387006..66a389a67 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -40,6 +40,9 @@ public class PlayerChunk {
@ -175,7 +175,7 @@ index b6d3870063..66a389a67e 100644
public void a(ProtoChunkExtension protochunkextension) {
for (int i = 0; i < this.statusFutures.length(); ++i) {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index cdab5ab6be..18c71609c0 100644
index cdab5ab6b..18c71609c 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -331,6 +331,64 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -261,7 +261,7 @@ index cdab5ab6be..18c71609c0 100644
return PlayerChunk.getChunkState(playerchunk.getTicketLevel());
});
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 4ccc35d614..741d76967c 100644
index f9c14b9a9..7f9a2f790 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -814,11 +814,44 @@ public class WorldServer extends World {
@ -319,5 +319,5 @@ index 4ccc35d614..741d76967c 100644
this.checkSession();
this.worldProvider.i();
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From 9c89bf80da3a0ca0d30a7de179d8398b12777906 Mon Sep 17 00:00:00 2001
From 8a3efcf27500a2508f1fc63d07e1feb8be44e762 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 27 Apr 2016 22:09:52 -0400
Subject: [PATCH] Optimize Hoppers
@ -11,7 +11,7 @@ Subject: [PATCH] Optimize Hoppers
* Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index f8d8cb8655..3b8488d3ff 100644
index f8d8cb865..3b8488d3f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -638,4 +638,13 @@ public class PaperWorldConfig {
@ -29,7 +29,7 @@ index f8d8cb8655..3b8488d3ff 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index d953cdef14..d6e43313bf 100644
index d953cdef1..d6e43313b 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -482,11 +482,12 @@ public final class ItemStack {
@ -49,10 +49,10 @@ index d953cdef14..d6e43313bf 100644
itemstack.d(this.C());
if (this.tag != null) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index baeaf772be..346664cee0 100644
index 892cb0d06..2f91bbf28 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1225,6 +1225,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1229,6 +1229,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
WorldServer worldserver = (WorldServer) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
@ -61,7 +61,7 @@ index baeaf772be..346664cee0 100644
this.methodProfiler.a(() -> {
return worldserver.getWorldData().getName() + " " + IRegistry.DIMENSION_TYPE.getKey(worldserver.worldProvider.getDimensionManager());
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 958279249f..a8e64dfdab 100644
index 958279249..a8e64dfda 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -62,6 +62,7 @@ public abstract class TileEntity implements KeyedObject { // Paper
@ -81,7 +81,7 @@ index 958279249f..a8e64dfdab 100644
this.world.b(this.position, this);
if (!this.c.isAir()) {
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 907d088c86..4afd33a491 100644
index 907d088c8..4afd33a49 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -168,6 +168,160 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@ -307,5 +307,5 @@ index 907d088c86..4afd33a491 100644
flag = true;
} else if (a(itemstack1, itemstack)) {
--
2.25.1
2.26.0

Datei anzeigen

@ -1,4 +1,4 @@
From d59d2987b177789993dfb2f403ff895ba0097548 Mon Sep 17 00:00:00 2001
From 7e3727cf5bb320d8c43b1fc950736d0deffd38e7 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sun, 5 Apr 2020 22:23:14 -0500
Subject: [PATCH] Add tick times API and /mspt command
@ -6,7 +6,7 @@ Subject: [PATCH] Add tick times API and /mspt command
diff --git a/src/main/java/com/destroystokyo/paper/MSPTCommand.java b/src/main/java/com/destroystokyo/paper/MSPTCommand.java
new file mode 100644
index 0000000000..d0211d4f39
index 000000000..d0211d4f3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/MSPTCommand.java
@@ -0,0 +1,64 @@
@ -75,7 +75,7 @@ index 0000000000..d0211d4f39
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 6916ed30c4..1c4cd36351 100644
index 6916ed30c..1c4cd3635 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -70,6 +70,7 @@ public class PaperConfig {
@ -87,7 +87,7 @@ index 6916ed30c4..1c4cd36351 100644
version = getInt("config-version", 20);
set("config-version", 20);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 936434110c..2686874f26 100644
index bafdc2d91..3dbd75ad0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -106,6 +106,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -102,9 +102,9 @@ index 936434110c..2686874f26 100644
@Nullable
private KeyPair I;
@Nullable
@@ -1175,6 +1180,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.methodProfiler.enter("tallying");
long l = this.f[this.ticks % 100] = SystemUtils.getMonotonicNanos() - i;
@@ -1192,6 +1197,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.av = this.av * 0.8F + (float) l / 1000000.0F * 0.19999999F;
long i1 = SystemUtils.getMonotonicNanos();
+ // Paper start
+ tickTimes5s.add(this.ticks, l);
@ -112,10 +112,10 @@ index 936434110c..2686874f26 100644
+ tickTimes60s.add(this.ticks, l);
+ // Paper end
+
this.av = this.av * 0.8F + (float) l / 1000000.0F * 0.19999999F;
long i1 = SystemUtils.getMonotonicNanos();
@@ -2269,4 +2280,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.circularTimer.a(i1 - i);
this.methodProfiler.exit();
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -2273,4 +2284,30 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return SERVER; // Paper
}
// CraftBukkit end
@ -147,7 +147,7 @@ index 936434110c..2686874f26 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b9a398bc57..53b71b7915 100644
index b9a398bc5..53b71b791 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2052,6 +2052,16 @@ public final class CraftServer implements Server {
@ -168,5 +168,5 @@ index b9a398bc57..53b71b7915 100644
private final Spigot spigot = new Spigot()
--
2.25.1
2.26.0